Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

320 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NELP Application

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.

More info...

πŸš€ Features

User Features

  • 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

Administrative Features

  • Custom Admin Interface - Bootstrap admin dashboard (replaces ActiveAdmin)
  • 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

πŸ›  Technology Stack

  • Ruby: 4.0.6
  • Rails: 8.1.3
  • Database: PostgreSQL (primary DB also hosts Solid Queue / Cache / Cable)
  • Authentication: Devise
  • Admin Interface: Custom Admin:: MVC
  • Payment Gateway: Nelnet
  • Asset Pipeline: dartsass-rails (SCSS compilation)
  • Frontend: Stimulus, Turbo, Importmap
  • Background jobs / cache / cable: Solid Queue, Solid Cache, Solid Cable
  • Testing: RSpec, FactoryBot, Capybara

πŸ“‹ Prerequisites

  • Ruby 4.0.6
  • PostgreSQL
  • Node.js (for asset compilation)
  • Git

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/lsa-mis/nelp_application
cd nelp_application

2. Install Dependencies

bundle install

3. Database Setup

# Create and setup the database
bin/rails db:create
bin/rails db:migrate
bin/rails db:seed

4. Environment Configuration

Copy 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

5. Start the Application

# Start the Rails server
bin/rails server

# Or use the development script
bin/dev

The application will be available at http://localhost:3000

πŸ”§ Configuration

Payment Gateway Setup

Configure your Nelnet payment gateway credentials in Rails credentials:

# config/credentials/<environment>.yml.enc
NELNET_SERVICE:
  DEVELOPMENT_KEY: your_dev_key
  DEVELOPMENT_URL: https://auth-interstitial-qa-authorize.auth.it.umich.edu/nelnetApi/payment/
  DEVELOPMENT_REDIRECT_URL: https://auth-interstitial-qa-authorize.auth.it.umich.edu/nelnetApi/redirect/
  PRODUCTION_KEY: your_prod_key
  PRODUCTION_URL: https://auth-interstitial-authorize.auth.it.umich.edu/nelnetApi/payment/
  PRODUCTION_REDIRECT_URL: https://auth-interstitial-authorize.auth.it.umich.edu/nelnetApi/redirect/
  ORDERTYPE: your_order_type
  SERVICE_SELECTOR: QA # or PROD

Development and staging use the QA payment/redirect URLs. Production uses the production URLs.

Admin Access

Create an admin user in the Rails console:

the seed file will create the admin user

πŸ§ͺ Testing

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/

Test Coverage

  • Model validations and associations
  • Controller actions and authorization
  • Payment processing workflows
  • User authentication flows
  • Admin functionality

πŸ“ Project Structure

app/
β”œβ”€β”€ controllers/
β”‚   └── admin/            # Custom admin MVC controllers
β”œβ”€β”€ queries/              # Query objects (e.g. admin dashboard)
β”œβ”€β”€ models/               # ActiveRecord models
β”œβ”€β”€ views/
β”‚   └── admin/            # Admin 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

Environment-Specific Configuration

  • Development: Uses test payment gateway
  • Staging: Uses test payment gateway with production-like setup
  • Production: Uses live payment gateway

πŸ“Š Key Models

User

  • Handles authentication and user management
  • Tracks payment history and balances
  • Manages user sessions and preferences

Payment

  • Stores payment transaction details
  • Calculates balances and payment status
  • Integrates with Nelnet payment gateway

ProgramSetting

  • Manages program years and fee structures
  • Controls program availability windows
  • Stores program-specific instructions

AdminUser

  • Provides administrative access
  • Manages application settings and content

πŸ” Security Features

  • 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

πŸ› Troubleshooting

Common Issues

  1. Payment Gateway Errors

    • Verify Nelnet credentials are correctly configured
    • Check that the service selector matches your environment
  2. Database Connection Issues

    • Ensure PostgreSQL is running
    • Verify database credentials in config/database.yml
  3. Asset Compilation Issues

    • Run bin/rails assets:precompile for production
    • Check that dartsass-rails is properly configured

Getting Help

  • Check the application logs in log/ directory
  • Review the test suite for expected behavior
  • Consult Rails and gem documentation

πŸ“ License

MIT License

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

πŸ“ž Support

For technical support or questions about the NELP application, please contact the development team.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages