This project is from the Modern Application Development - II course which is offered by IITM BS Degree during the Diploma in Programming. It is a multi-user app that acts as an exam preparation site for multiple courses. The platform provides both practice and exam modes for students to test their knowledge across various subjects and allows admins to create, manage, and analyse the quiz.
🔗 Demo URL: https://exambhai.vercel.app
👤 Demo Student Login: user@email.com
| 🔐 Password: 12345678
👤 Demo Admin Login: admin@email.com
| 🔐 Password: 12345678
|
- Vue.js 3 (Composition API) - JavaScript framework for building user interfaces
- Bootstrap 5 - CSS framework for responsive design
- Chart.js - JavaScript library for data visualization
- Axios - HTTP client for API requests
- Vue Router - Navigation management
- Notivue - Notification system
- Pinia - State management library for Vue 3
- Simple Datatables - Lightweight JavaScript HTML table library
- Flask - Python web framework
- Flask-RESTx - API development extension for Flask
- Flask-SQLAlchemy - ORM for database interaction
- Flask-JWT-Extended - Authentication handling with JWT
- Flask-Mail - Email functionality
- Flask-Migrate - Database migration
- Flask-Bcrypt - Password hashing
- Flask-Caching - Response caching
- Celery - Distributed task queue
- Redis - Message broker for Celery and caching
Clone the repository:
git clone https://github.com/mynkpdr/mad2project.git
cd mad2project
- Navigate to the backend folder:
cd backend
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On macOS/Linux
- Install dependencies:
pip install -r requirements.txt
- Run the backend server:
flask run
- Run the Celery beat and worker:
celery -A app.worker.celery worker --beat
- Navigate to the frontend folder:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm run dev
To populate the database with sample data for testing, you can use the populatedb.py script. This will insert some sample data into the database.
Note: You need to make sure API is running because it uses API calls to send POST requests.
Run the following command in the backend to populate the database:
python populatedb.py
The application uses a relational database with the following key models:
- Core user information (id, name, email, password, ...)
- Role-based access control (ADMIN, STUDENT)
- Account status tracking
- Email verification
- Notification preferences
- Oauth Logins
- Quiz metadata (name, description, date_of_quiz, date_created)
- Settings (difficulty_level, time_duration)
- Quiz mode (PRACTICE, EXAM)
- Relationship to chapters and subjects
- Question metadata (question_statement, marks, ...)
- Different question types (MCQ, MSQ, Numerical)
- Scoring information
- Optional images and answer explanations
- Represents an attempt at a quiz by a student
- Tracks completion status
- Timestamps for analytics
- JSON storage of student's answers
- Result state for scoring and review
- Timestamp information
- Hierarchical organization of content
- Many-to-many relationships
- Frontend-Backend Separation:
- Vue.js frontend consuming REST API
- Flask backend providing RESTful endpoints
- JWT authentication for secure communication
- Task Processing Pipeline:
- Celery workers for asynchronous tasks
- Redis as message broker
- Background processing for reports and emails
- Scheduled tasks for notifications and analytics
- Caching Strategy:
- RedisCache for API response caching
- Optimized dashboard data retrieval
- Time-based cache invalidation
- Dual Quiz Interfaces:
- Exam Mode: Formal, assessment with strict rules similar to the IITM BS Degree quiz exams.
- Practice Mode: Self-paced learning with immediate feedback.
- Comprehensive Dashboard:
- Performance analytics and visualization
- Subject-wise average scores
- Time vs. score analysis
- Points tracking and history
- Comparison between exam and practice performance
- Quiz Experience:
- Multiple question types (MCQ, MSQ, Numerical)
- Question navigation and review marking
- Scientific calculator for complex problems in exams
- Time tracking and automatic submission
- Detailed results and feedback
- Personalization:
- Profile management
- Performance tracking over time
- Upcoming quiz notifications
- Weekly/monthly activity reports via email
- Password reset functionality and email alerts for password resets
- Dashboard Analytics:
- Student activity monitoring
- Quiz completion statistics
- Performance metrics by subject/chapter
- Difficulty level distribution
- Growth tracking (students and quiz attempts)
- Content Management:
- Quiz creation and scheduling
- Question bank management
- Subject and chapter organization
- CRUD the quizzes, subjects, chapters and the questions
- User Management:
- Student registration approval
- Account profile management
- Student quiz summary
- Adaptive User Interface:
- Night mode toggle
- Real-time Data Visualization:
- Interactive charts and graphs
- Filterable date ranges
- Comparative analysis tools
- Background Task Processing:
- Automated email reports (weekly/monthly)
- Quiz reminders and notifications
- Data aggregation for analytics
- Security Features:
- JWT authentication with token expiry
- Password hashing with bcrypt
- Role-based access control
- Email verification
Solution: Implemented a robust state management system with timer using Pinia store with automatic saving and restoration of exam progress, allowing students to resume interrupted exams.
Solution: Integrated Celery with Redis to handle background tasks such as email notifications, report generation, and scheduled activities.
Solution: Implemented caching strategies and optimized database queries to improve dashboard loading times.
Solution: Designed a flexible question model that accommodates different question types (MCQ, MSQ, Numerical) with appropriate validation and scoring logic for each type.
Solution: The quiz results are calculated and stored efficiently using the following steps:
1. Score Calculation:
- Each question is evaluated based on its type (MCQ, MSQ, Numerical).
- Correct answers are awarded marks, while incorrect answers will result in zero marks.
- Partial credit is given for MSQ questions based on the number of correct options selected.
2. Feedback Generation:
- Detailed feedback is provided for each question, including the correct answer and an explanation if available.
- Overall performance metrics such as total score, percentage, time taken and comparision with others are displayed.
3. Result Storage:
- Results are stored in the
Score
model, which includes the student's scores, time taken and other details. - The
QuizState
model is used to save the state of the quiz, allowing students to review their answers and feedback.
4. Analytics and Reporting:
- Performance data is aggregated to generate insights for both students and admins.
- Visualizations such as score distributions and time vs. score analysis are provided on the dashboard.
5. Result Display:
- For practice mode, results are shown to students immediately after quiz submission.
- For exam mode, results are shown after twice the time duration of the exam. For example, an exam is set to start at 10:00 AM with duration of 30 minutes, then the result will be shown at 11:00 AM.
Solution: Leaderboard scores are calculated using a weighted formula that considers average score, average time taken, and the total number of quizzes completed. The formula ensures a balanced evaluation of performance, efficiency, and participation.
1. Advanced Analytics: Implement machine learning algorithms to provide personalized study recommendations based on performance patterns.
2. Offline Support: Add Progressive Web App functionality to allow practice mode quizzes without internet connectivity.