Skip to content

This is a webapp where students can give quizes of their subjects and many more features.

License

Notifications You must be signed in to change notification settings

AnantLuthra/quizmaster-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuizMaster WebApp

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.

Features

Admin Features

  • 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

Student Features

  • 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

Tech Stack

  • 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

Installation

Prerequisites

  • Python 3.8 or higher
  • Node.js 16 or higher
  • Redis Server

Backend Setup

# 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

Frontend Setup

# Go to frontend folder
cd frontend

# Install required packages
npm install

# Run development server
npm run dev

Start Services

# 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 dev

Open the application at http://localhost:5173

API Documentation

Authentication

All endpoints require authentication token in header (except login and register):

Authentication-Token: <token>

Main Endpoints

Authentication:

  • POST /user-login - Login to get token
  • POST /user-register - Register new user

Subjects:

  • GET /api/subject - Get all subjects
  • POST /api/subject - Create subject (Admin only)

Chapters:

  • GET /api/chapter/<subject_id> - Get chapters for a subject
  • POST /api/chapter/<subject_id> - Create chapter (Admin only)

Quizzes:

  • GET /api/quiz - Get all quizzes
  • POST /api/quiz - Create quiz (Admin only)
  • GET /api/question/<quiz_id> - Get questions for a quiz
  • POST /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 approval
  • POST /api/approve-user/<user_id> - Approve a user
  • POST /api/reject-user/<user_id> - Reject a user

Project Structure

├── 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

Default Login Details

License

This project is developed as part of MAD-2 course work.

About

This is a webapp where students can give quizes of their subjects and many more features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors