A web application built with Flask and Vue.js where teachers can create and manage quizzes, and students can take tests and track their performance.
- Subject and Chapter Management: Create and organize subjects and chapters
- Quiz Creation: Create quizzes with multiple choice questions for specific subjects and chapters
- Scheduled Tests: Set quiz dates and time limits
- Performance Analytics: View student results and create performance reports
- User Management: Approve or reject student registrations
- Take Quizzes: Attempt scheduled quizzes within the time limit
- View Results: Check quiz scores and results
- Monthly Reports: Get monthly performance summaries via email
- Subject Access: Take quizzes for enrolled subjects
- Backend: Flask, Flask-RESTful, Flask-SQLAlchemy, Flask-Security
- Frontend: Vue.js 3, Vue Router, Pinia
- Database: SQLite
- Task Queue: Celery with Redis
- Authentication: Token-based with Flask-Security
- Python 3.8 or higher
- Node.js 16 or higher
- Redis Server
# Go to backend folder
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install required packages
pip install -r requirements.txt
# Set up database
python app.py# Go to frontend folder
cd frontend
# Install required packages
npm install
# Run development server
npm run dev# Terminal 1: Start Redis
redis-server
# Terminal 2: Start Celery Worker
cd backend
celery -A celery_worker.celery worker --loglevel=info
# Terminal 3: Start Celery Beat (for scheduled tasks)
celery -A celery_worker.celery beat --loglevel=info
# Terminal 4: Start Flask Backend
cd backend
python app.py
# Terminal 5: Start Vue Frontend
cd frontend
npm run devOpen the application at http://localhost:5173
All endpoints require authentication token in header (except login and register):
Authentication-Token: <token>
Authentication:
POST /user-login- Login to get tokenPOST /user-register- Register new user
Subjects:
GET /api/subject- Get all subjectsPOST /api/subject- Create subject (Admin only)
Chapters:
GET /api/chapter/<subject_id>- Get chapters for a subjectPOST /api/chapter/<subject_id>- Create chapter (Admin only)
Quizzes:
GET /api/quiz- Get all quizzesPOST /api/quiz- Create quiz (Admin only)GET /api/question/<quiz_id>- Get questions for a quizPOST /api/submit-quiz/<quiz_id>- Submit quiz answers
Results:
GET /api/result- Get my results (Student)GET /api/all-results- Get all student results (Admin only)POST /api/trigger-monthly-report- Send monthly report email
Admin User Management:
GET /api/pending-users- Get users waiting for approvalPOST /api/approve-user/<user_id>- Approve a userPOST /api/reject-user/<user_id>- Reject a user
├── backend/
│ ├── app.py # Main Flask application
│ ├── models.py # Database models
│ ├── resources.py # API resources
│ ├── celery_worker.py # Celery tasks
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # Vue components
│ │ ├── views/ # Page views
│ │ ├── router/ # Route definitions
│ │ └── stores/ # Pinia stores
│ └── package.json
└── readme.md
- Admin:
[email protected]/adminpass - Student: Register first (requires admin approval)
This project is developed as part of MAD-2 course work.