A comprehensive Django web application for managing college fee payments with MongoDB integration and Razorpay payment gateway.
- Registration & Authentication: Secure student registration with profile picture upload
- Dashboard: Modern dark-themed interface showing profile and fee information
- Fee Payment: Integration with Razorpay for secure online payments
- Payment History: View all past transactions with detailed information
- Receipt Generation: Download PDF receipts for completed payments
- Profile Management: View and manage student profile information
- Admin Dashboard: Overview of students, payments, and revenue statistics
- Student Management: View all registered students with search and filter options
- Fee Management: Update fee amounts for individual students based on admission type
- Payment Monitoring: View payment histories and transaction details
- Reporting: Generate reports on fee collections and student payments
- Backend: Django 4.2.7
- Database: MongoDB with djongo adapter
- Payment Gateway: Razorpay
- Frontend: Bootstrap 5 with dark theme
- PDF Generation: ReportLab
- Authentication: Django sessions with custom user models
-
Clone the repository
git clone <repository-url> cd college_fee_system
-
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Environment Configuration
cp .env.example .env
Update the
.envfile with your configuration:SECRET_KEY=your-secret-key-here DEBUG=True MONGO_URI=mongodb://localhost:27017 MONGO_DB_NAME=college_fee_system RAZORPAY_KEY_ID=your-razorpay-key-id RAZORPAY_KEY_SECRET=your-razorpay-secret -
Database Setup
python manage.py makemigrations python manage.py migrate
-
Create Admin User
python manage.py shell
In the Django shell:
from admins.models import Admin admin = Admin( username='admin', email='[email protected]', full_name='System Administrator', is_super_admin=True ) admin.set_password('admin123') admin.save()
-
Run the application
python manage.py runserver
- Install MongoDB on your system
- Start MongoDB service
- Update
MONGO_URIin your.envfile
- Create a Razorpay account at https://razorpay.com
- Get your API keys from the dashboard
- Update
RAZORPAY_KEY_IDandRAZORPAY_KEY_SECRETin your.envfile
- Registration: Students register with college ID, email, and personal details
- Login: Login using college ID and password
- Dashboard: View profile and available fee payment options
- Payment: Select fee type and pay using Razorpay
- Receipt: Download PDF receipt after successful payment
- Login: Admin login with username and password
- Dashboard: View system statistics and recent activities
- Student Management: View, search, and manage student accounts
- Fee Management: Update fee amounts for students
- Monitoring: Track payments and generate reports
POST /students/register/- Student registrationPOST /students/login/- Student loginGET /students/dashboard/- Student dashboardGET /students/profile/- Student profileGET /students/payment-history/- Payment history
POST /payments/create-order/- Create Razorpay orderPOST /payments/verify-payment/- Verify payment signatureGET /payments/download-receipt/<id>/- Download receipt
POST /admins/login/- Admin loginGET /admins/dashboard/- Admin dashboardGET /admins/students/- Students listPOST /admins/students/<id>/fees/- Update student fees
- College ID (unique)
- Email (unique)
- Full Name
- Phone Number
- Profile Picture
- Admission Type (Counseling/Management)
- Fee Amounts (College, Exam, Bus)
- Student (Foreign Key)
- Fee Type
- Amount
- Razorpay Order/Payment IDs
- Status
- Receipt Number
- Username (unique)
- Email (unique)
- Full Name
- Password (hashed)
- Super Admin flag
- Password hashing using Django's built-in hashers
- CSRF protection on all forms
- Session-based authentication
- Razorpay signature verification
- Input validation and sanitization
- SQL injection prevention through ORM
- Set
DEBUG=Falsein production - Configure proper
ALLOWED_HOSTS - Use environment variables for sensitive data
- Set up proper MongoDB authentication
- Configure email settings for notifications
- Set up SSL/HTTPS for secure payments
python manage.py collectstatic- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please contact the development team or create an issue in the repository.