Skip to content

IRONalways17/Quiz-Master-APP

Repository files navigation

Quiz Master V2 - Advanced Quiz Management Platform

Quiz Master V2 i## System Requirements a sophisticated, full-stack web application designed for educational institutions, training organizations, and online lear## API Documentationing platforms. Built with modern technologies, it provides a comprehensive solution for creating, managing, and conducting interactive quizzes with detailed ana## Development Workflowytics and user management capabilities.

Project Overview

This appli## Learning Resourcesation serves as a complete quiz manage## Support & Contactent ecosystem, enabling educators to create structured learning assessments while providing students with an intuitive interface for taking quizzes and tracking their academic progress. The system is architected to handle multiple subjects, chapters, and quiz variations while maintaining detailed performance analytics.

Core Features

Student Interface

  • Interactive Quiz Engine: Responsive quiz-taking interface with real-time feedback
  • Performance Analytics: Comprehensive dashboard showing quiz history, scores, and improvement trends
  • Progress Tracking: Visual progress indicators across subjects and chapters
  • Leaderboard System: Competitive rankings to encourage engagement
  • Profile Management: Personalized user profiles with achievement tracking
  • Search Functionality: Quick access to specific subjects, chapters, or quizzes

Administrative Panel

  • Content Management: Create and organize subjects, chapters, and quiz questions
  • User Administration: Monitor student registrations, activity, and performance
  • Analytics Dashboard: System-wide statistics, usage patterns, and performance metrics
  • Quiz Builder: Intuitive interface for creating multiple-choice questions with explanations
  • Bulk Operations: Import/export capabilities for questions and user data
  • Reporting System: Generate detailed reports on student performance and system usage

System Capabilities

  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Real-time Scoring: Instant feedback and score calculation
  • Data Security: JWT-based authentication with secure password handling
  • Scalable Architecture: Designed to handle hundreds of concurrent users
  • Database Optimization: Efficient queries and data management

Technology Stack

Backend Framework

  • Flask 2.3+: Lightweight yet powerful Python web framework
  • SQLAlchemy: Advanced ORM for database operations and migrations
  • Flask-JWT-Extended: Secure token-based authentication system
  • Flask-CORS: Cross-origin resource sharing for frontend integration
  • Flask-Limiter: Rate limiting for API protection
  • Werkzeug: WSGI utility library for security features

Frontend Framework

  • Vue.js 3: Progressive JavaScript framework with Composition API
  • Vue Router: Client-side routing for single-page application experience
  • Vuex: State management for complex application state
  • Axios: Promise-based HTTP client for API communications
  • Bootstrap 5: Modern CSS framework for responsive design
  • Vite: Fast build tool and development server

Database Systems

  • PostgreSQL: Production database (Heroku deployment)
  • SQLite: Development database for local testing
  • Database Migrations: Version-controlled schema management

Development Tools

  • Git: Version control with GitHub integration
  • Heroku: Cloud platform for production deployment
  • Node.js: JavaScript runtime for frontend build processes
  • Python Virtual Environment: Isolated Python package management

Educational Purpose

This project demonstrates advanced full-stack development practices including:

  • RESTful API Design: Well-structured endpoints following REST principles
  • Authentication & Authorization: Secure user management with role-based access
  • Database Design: Normalized schema with proper relationships
  • Frontend-Backend Integration: Seamless communication between Vue.js and Flask
  • Production Deployment: Complete CI/CD pipeline with Heroku integration
  • Code Organization: Modular structure following best practices

� System Requirements

Development Environment

  • Python: 3.8 or higher
  • Node.js: 16.0 or higher
  • npm: 8.0 or higher
  • Git: Latest version
  • Modern Web Browser: Chrome, Firefox, Safari, or Edge

Quick Start Guide

1. Repository Setup

git clone https://github.com/IRONalways17/Quiz-Master-APP.git
cd Quiz-Master-APP

2. Backend Configuration

Virtual Environment Setup

cd backend
python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Environment Configuration

Create a .env file in the backend directory:

# Application Settings
FLASK_ENV=development
SECRET_KEY=your-development-secret-key
JWT_SECRET_KEY=your-jwt-secret-key

# Database Configuration
DATABASE_URL=sqlite:///quizmaster.db

# Admin Account
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=your-secure-password

# Rate Limiting
API_RATE_LIMIT=100 per hour

Database Initialization

python -c "from app import create_app; from app.database import db; from app.utils.init_db import create_default_admin; app = create_app(); app.app_context().push(); db.create_all(); create_default_admin()"

Start Backend Server

python run.py

3. Frontend Setup

Install Node Dependencies

cd frontend
npm install

Development Server

npm run dev

4. Production Build

# Build frontend for production
npm run build

# Copy build files to backend static folder
cp -r dist/* ../backend/static/

Live Application

Production URL: https://quiz-master-app.herokuapp.com

Admin Access

Demo User Account

Students can register their own accounts or use the following test credentials:

Project Architecture

Screenshot 2025-08-27 110109 Screenshot 2025-08-27 110126 Screenshot 2025-08-27 110118 image image
Quiz-Master-APP/
├── backend/                    # Flask API Server
│   ├── app/
│   │   ├── models/            # Database Models
│   │   │   ├── user.py        # User authentication model
│   │   │   ├── admin.py       # Administrator model
│   │   │   ├── subject.py     # Subject categorization
│   │   │   ├── chapter.py     # Chapter organization
│   │   │   ├── quiz.py        # Quiz structure
│   │   │   ├── question.py    # Question management
│   │   │   └── score.py       # Performance tracking
│   │   ├── routes/            # API Endpoints
│   │   │   ├── auth.py        # Authentication endpoints
│   │   │   ├── user.py        # Student operations
│   │   │   ├── admin.py       # Administrative functions
│   │   │   ├── quiz.py        # Quiz operations
│   │   │   └── common.py      # Shared utilities
│   │   └── utils/             # Helper Functions
│   │       ├── auth.py        # Authentication utilities
│   │       ├── cache.py       # Caching mechanisms
│   │       └── init_db.py     # Database initialization
│   ├── static/                # Compiled frontend assets
│   ├── instance/              # Database files
│   ├── config.py              # Application configuration
│   ├── requirements.txt       # Python dependencies
│   └── run.py                 # Application entry point
├── frontend/                   # Vue.js Client Application
│   ├── src/
│   │   ├── views/             # Page Components
│   │   │   ├── auth/          # Login/Registration
│   │   │   ├── user/          # Student interface
│   │   │   ├── admin/         # Administrative panel
│   │   │   └── common/        # Shared components
│   │   ├── services/          # API Communication
│   │   ├── router/            # Application routing
│   │   ├── store/             # State management
│   │   └── assets/            # Static resources
│   ├── package.json           # Node.js dependencies
│   └── vite.config.js         # Build configuration
└── README.md                  # Project documentation

� API Documentation

Authentication Endpoints

Method Endpoint Description Authentication
POST /api/auth/register User registration None
POST /api/auth/login User/Admin login None
POST /api/auth/refresh Token refresh Refresh Token
DELETE /api/auth/logout User logout Access Token

Student Endpoints

Method Endpoint Description Authentication
GET /api/user/profile Get user profile User Token
PUT /api/user/profile Update profile User Token
GET /api/user/subjects List all subjects User Token
GET /api/user/chapters/<subject_slug> Get subject chapters User Token
GET /api/user/quizzes/<chapter_slug> Get chapter quizzes User Token
GET /api/user/quiz/<quiz_slug>/info Quiz information User Token
POST /api/user/quiz/<quiz_slug>/submit Submit quiz answers User Token
GET /api/user/scores User score history User Token
GET /api/user/dashboard Dashboard statistics User Token

Administrative Endpoints

Method Endpoint Description Authentication
GET /api/admin/dashboard Admin dashboard Admin Token
GET /api/admin/users List all users Admin Token
GET /api/admin/subjects Manage subjects Admin Token
POST /api/admin/subjects Create subject Admin Token
GET /api/admin/chapters Manage chapters Admin Token
POST /api/admin/chapters Create chapter Admin Token
GET /api/admin/quizzes Manage quizzes Admin Token
POST /api/admin/quizzes Create quiz Admin Token
GET /api/admin/questions Manage questions Admin Token
POST /api/admin/questions Create question Admin Token

Database Schema

Core Entities

Users Table

users (
    id: INTEGER PRIMARY KEY,
    username: VARCHAR(80) UNIQUE,
    email: VARCHAR(120) UNIQUE,
    password_hash: VARCHAR(255),
    full_name: VARCHAR(100),
    qualification: VARCHAR(100),
    is_active: BOOLEAN DEFAULT TRUE,
    created_at: DATETIME,
    last_login: DATETIME
)

Subjects Table

subjects (
    id: INTEGER PRIMARY KEY,
    title: VARCHAR(100),
    slug: VARCHAR(100) UNIQUE,
    description: TEXT,
    is_active: BOOLEAN DEFAULT TRUE,
    created_at: DATETIME
)

Quizzes Table

quizzes (
    id: INTEGER PRIMARY KEY,
    title: VARCHAR(200),
    slug: VARCHAR(200) UNIQUE,
    description: TEXT,
    chapter_id: INTEGER FOREIGN KEY,
    time_limit: INTEGER,
    total_questions: INTEGER,
    is_active: BOOLEAN DEFAULT TRUE,
    created_at: DATETIME
)

Scores Table

scores (
    id: INTEGER PRIMARY KEY,
    user_id: INTEGER FOREIGN KEY,
    quiz_id: INTEGER FOREIGN KEY,
    score: INTEGER,
    max_score: INTEGER,
    percentage: FLOAT,
    time_taken: INTEGER,
    completed_at: DATETIME
)

Security Features

Authentication Security

  • JWT Tokens: Secure, stateless authentication
  • Password Hashing: bcrypt for password security
  • Token Expiration: Configurable token lifetimes
  • Refresh Tokens: Secure token renewal mechanism

API Security

  • Rate Limiting: Prevents API abuse
  • CORS Configuration: Controlled cross-origin access
  • Input Validation: Comprehensive request validation
  • SQL Injection Protection: SQLAlchemy ORM protection

Data Protection

  • Password Requirements: Enforced strong passwords
  • Session Management: Secure session handling
  • Data Sanitization: Input/output data cleaning
  • Access Control: Role-based permissions

Deployment Guide

Heroku Deployment

Prerequisites

  • Heroku CLI installed
  • Git repository initialized
  • Heroku account created

Deployment Steps

# Login to Heroku
heroku login

# Create Heroku application
heroku create your-app-name

# Add PostgreSQL database
heroku addons:create heroku-postgresql:hobby-dev

# Set environment variables
heroku config:set FLASK_ENV=production
heroku config:set SECRET_KEY=your-production-secret
heroku config:set ADMIN_PASSWORD=SecureAdmin123!

# Deploy application
git push heroku main

Environment Variables

# Required production environment variables
FLASK_ENV=production
SECRET_KEY=your-secure-production-key
JWT_SECRET_KEY=your-jwt-production-key
[email protected]
ADMIN_PASSWORD=SecureAdmin123!
DATABASE_URL=postgresql://... (auto-set by Heroku)

Local Development Setup

Backend Development

cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
python run.py

Frontend Development

cd frontend
npm install
npm run dev

Development URLs

�️ Development Workflow

Code Quality Standards

  • Python: Follow PEP 8 style guidelines
  • JavaScript: ESLint and Prettier configuration
  • Git: Conventional commit messages
  • Documentation: Comprehensive inline comments

Testing Strategy

# Backend unit tests
cd backend
python -m pytest tests/ -v

# Frontend component tests
cd frontend
npm run test

# End-to-end testing
npm run test:e2e

Contributing Guidelines

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/new-feature
  3. Commit changes: git commit -m "feat: add new feature"
  4. Push to branch: git push origin feature/new-feature
  5. Submit pull request with detailed description

Troubleshooting

Common Development Issues

Database Connection Errors

# Reset database
rm backend/instance/quizmaster.db
python -c "from app import create_app; from app.database import db; app = create_app(); app.app_context().push(); db.create_all()"

Frontend Build Issues

# Clear node modules and reinstall
rm -rf frontend/node_modules
cd frontend
npm install
npm run dev

API Authentication Problems

  • Verify JWT tokens are properly formatted
  • Check token expiration times
  • Ensure CORS settings allow frontend domain

Performance Optimization

Backend Optimization

  • Database query optimization with SQLAlchemy
  • Implement proper indexing on frequently queried columns
  • Use database connection pooling for production

Frontend Optimization

  • Lazy loading for Vue.js components
  • Image optimization and compression
  • Bundle size analysis with Vite

Monitoring and Logging

Production Monitoring

# View Heroku logs
heroku logs --tail --app your-app-name

# Monitor database performance
heroku pg:info --app your-app-name

Development Debugging

  • Use Flask debug mode for backend debugging
  • Vue.js DevTools for frontend state inspection
  • Browser network tab for API request monitoring

Future Enhancements

Planned Features

  • Advanced Analytics: Detailed performance insights and learning patterns
  • Question Types: Support for essay questions, drag-and-drop, and multimedia
  • Certification System: Automated certificate generation upon quiz completion
  • Mobile Application: Native iOS and Android applications
  • Integration APIs: LMS integration capabilities (Moodle, Canvas, etc.)
  • AI-Powered Insights: Machine learning-based performance predictions

Scalability Improvements

  • Microservices Architecture: Break down monolithic structure
  • Container Deployment: Docker and Kubernetes support
  • CDN Integration: Static asset delivery optimization
  • Database Sharding: Handle larger user bases
  • Real-time Features: WebSocket integration for live quizzes

� Learning Resources

Technologies Used

Educational Value

This project demonstrates real-world application development including:

  • Full-stack JavaScript and Python development
  • RESTful API design and implementation
  • Database design and optimization
  • Authentication and authorization systems
  • Production deployment and DevOps practices

Contributing

We welcome contributions from developers of all skill levels! Here's how you can help:

Ways to Contribute

  • Bug Reports: Submit detailed bug reports with reproduction steps
  • Feature Requests: Propose new features with use cases
  • Code Contributions: Submit pull requests for bug fixes or new features
  • Documentation: Improve existing documentation or add tutorials
  • Testing: Help expand test coverage

Development Setup

  1. Star ⭐ the repository
  2. Fork the project
  3. Clone your fork: git clone https://github.com/yourusername/Quiz-Master-APP.git
  4. Create a feature branch: git checkout -b feature/amazing-feature
  5. Make your changes and commit: git commit -m "feat: add amazing feature"
  6. Push to your branch: git push origin feature/amazing-feature
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License Summary

  • Commercial use allowed
  • Modification allowed
  • Distribution allowed
  • Private use allowed
  • No warranty provided
  • No liability accepted

Acknowledgments

Special Thanks

  • Flask Community: For the excellent web framework
  • Vue.js Team: For the progressive JavaScript framework
  • Heroku: For providing accessible cloud hosting
  • Open Source Community: For the countless libraries and tools

Inspiration

This project was inspired by the need for accessible, modern quiz management systems in educational environments. It aims to bridge the gap between complex enterprise solutions and simple quiz tools.

� Support & Contact

Getting Help

  • Documentation: Check this README and inline code comments
  • Issues: Report bugs or request features via GitHub Issues
  • Discussions: Join community discussions in GitHub Discussions

Contact Information


Built with care for the education community

This project represents a commitment to open-source education technology and modern web development practices. We believe in making quality educational tools accessible to everyone.

About

Online Quizzes for Practice of Exams

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published