A Rails-based payment management system for the NELP (New England Literature Program) application process. This application handles user registration, payment processing, and administrative management for program fees and application costs.
- User Registration & Authentication - Secure user accounts with Devise
- Payment Processing - Integrated payment system with Nelnet payment gateway
- Payment History - View all payment transactions and receipts
- Balance Tracking - Real-time balance calculations for program fees
- Static Content - Access to program information, privacy policy, and terms
- ActiveAdmin Interface - Comprehensive admin dashboard
- User Management - View and manage user accounts
- Payment Administration - Monitor and manage all payments
- Program Settings - Configure program years, fees, and schedules
- Content Management - Manage static pages and program instructions
- Ruby: 3.4.4
- Rails: 7.2.2.1
- Database: PostgreSQL
- Authentication: Devise
- Admin Interface: ActiveAdmin
- Payment Gateway: Nelnet
- Asset Pipeline: dartsass-rails (SCSS compilation)
- Frontend: Stimulus, Turbo, Importmap
- Testing: RSpec, FactoryBot, Capybara
- Ruby 3.4.4
- PostgreSQL
- Node.js (for asset compilation)
- Git
git clone https://github.com/lsa-mis/nelp_application
cd nelp_applicationbundle install# Create and setup the database
bin/rails db:create
bin/rails db:migrate
bin/rails db:seedCopy the example environment files and configure your credentials:
# Configure your database credentials in config/database.yml
# Set up your Nelnet payment gateway credentials in Rails credentials# Start the Rails server
bin/rails server
# Or use the development script
bin/devThe application will be available at http://localhost:3000
Configure your Nelnet payment gateway credentials in Rails credentials:
# config/credentials.yml.enc
NELNET_SERVICE:
DEVELOPMENT_KEY: your_dev_key
DEVELOPMENT_URL: your_dev_url
PRODUCTION_KEY: your_prod_key
PRODUCTION_URL: your_prod_url
ORDERTYPE: your_order_type
SERVICE_SELECTOR: QA # or PRODCreate an admin user in the Rails console:
the seed file will create the admin user
The application uses RSpec for testing. Run the test suite:
# Run all tests
bundle exec rspec
# Run specific test files
bundle exec rspec spec/models/
bundle exec rspec spec/controllers/
bundle exec rspec spec/features/- Model validations and associations
- Controller actions and authorization
- Payment processing workflows
- User authentication flows
- Admin functionality
app/
βββ admin/ # ActiveAdmin configurations
βββ controllers/ # Application controllers
βββ models/ # ActiveRecord models
βββ views/ # ERB templates
βββ assets/ # SCSS stylesheets and images
βββ javascript/ # Stimulus controllers
config/
βββ initializers/ # Application configuration
βββ locales/ # Internationalization files
βββ routes.rb # Application routes
spec/ # Test files
βββ models/ # Model tests
βββ controllers/ # Controller tests
βββ features/ # Integration tests
βββ factories/ # FactoryBot factories
- Development: Uses test payment gateway
- Staging: Uses test payment gateway with production-like setup
- Production: Uses live payment gateway
- Handles authentication and user management
- Tracks payment history and balances
- Manages user sessions and preferences
- Stores payment transaction details
- Calculates balances and payment status
- Integrates with Nelnet payment gateway
- Manages program years and fee structures
- Controls program availability windows
- Stores program-specific instructions
- Provides administrative access
- Manages application settings and content
- Authentication: Secure user login with Devise
- Authorization: Role-based access control
- Payment Security: Secure hash generation for payment processing
- Data Protection: Encrypted credentials and sensitive data
- CSRF Protection: Built-in Rails CSRF protection
-
Payment Gateway Errors
- Verify Nelnet credentials are correctly configured
- Check that the service selector matches your environment
-
Database Connection Issues
- Ensure PostgreSQL is running
- Verify database credentials in
config/database.yml
-
Asset Compilation Issues
- Run
bin/rails assets:precompilefor production - Check that dartsass-rails is properly configured
- Run
- Check the application logs in
log/directory - Review the test suite for expected behavior
- Consult Rails and gem documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
For technical support or questions about the NELP application, please contact the development team.