A Flask-based exam registration platform with separate student and admin areas. Students can browse exams, register for available slots, and download hall tickets as PDFs. Admins can create and manage exams, view registrations, and export registration data as CSV.
- User registration and login with role-based access control
- Student dashboard with upcoming exams and personal registrations
- Exam registration with seat tracking and deadline enforcement
- PDF hall ticket generation
- Admin dashboard with exam management
- CSV export for exam registrations
- Automated tests with
pytest
- Flask
- Flask-SQLAlchemy
- Flask-Login
- Flask-WTF
- ReportLab
- pytest
run.pystarts the applicationconfig.pyholds app and test configurationapp/contains the Flask package, models, routes, forms, templates, and utilitiestests/contains the test suite
- Python 3.10+ recommended
pip
-
Create and activate a virtual environment.
python -m venv .venv .venv\Scripts\activate
-
Install dependencies.
pip install -r requirements.txt
-
Run the application.
python run.py
The app will create the database tables automatically on startup. By default, data is seeded with sample exams and an admin account.
The seeded admin account is:
- Username:
admin - Email:
admin@example.com - Password:
admin12345
Change these credentials before deploying the app anywhere public.
You can override the default settings with environment variables:
SECRET_KEYDATABASE_URL
If DATABASE_URL is not set, the app uses a SQLite database at instance/exam.db.
pytest/auth/registerand/auth/loginfor account access/student/dashboard,/student/exams, and/student/registrationsfor student actions/admin/dashboardand/admin/examsfor admin management
- The app uses CSRF protection in normal mode.
- Hall tickets are generated as PDF files.
- Exam registrations are protected by a unique student/exam constraint.