Skip to content

Shahid6174/QBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 QBC - Quiz Based Challenge 🌟

QBC Logo


⭐ Overview

QBC (Quiz-Based Challenge) is a web app designed to boost learning through structured, subject- and chapter-wise quizzes. It enables effective preparation with analytics, an anti-cheat environment, and both admin and user features.


⭐ Features

👨‍🎓 For Users

  • Subject-Wise Quizzes – Practice by subjects to strengthen your base.
  • Chapter-Wise Quizzes – Focused learning on individual chapters.
  • Performance Analytics – Know your strengths and weak spots.
  • Real-Time Tracking – Monitor your quiz journey.
  • Anti-Cheat Environment – Fullscreen mode and tab-switch detection.

🛠️ For Administrators

  • Content Management – Create/manage subjects, chapters, quizzes, and questions.
  • Quiz Publishing Controls – Decide availability timings.
  • Student Analytics – Monitor student performance and trends.
  • User Management – Track user verification and activity.

🧰 Tech Stack

  • Backend: Python Flask
  • Database: SQLAlchemy + SQLite
  • Authentication: Flask-Login
  • Email: Flask-Mailman
  • Frontend: Bootstrap 5, HTML, CSS, JS
  • Analytics: Chart.js

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/Shahid6174/QBC.git cd QBC

2. Create and Activate Virtual Environment

python -m venv venv

Activate on Windows:

venv\Scripts\activate

On Linux/macOS:

source venv/bin/activate

3. Install Dependencies using poetry

pip install poetry poetry install --no-root

4. Update .env variables

  1. Create file .env
  2. cp .env.example .env
  3. Update the variables in .env: SECRET_KEY='your_secret_key' ADMIN_EMAIL='your_admin_email' ADMIN_PASSWORD='your_admin_password' SQLITE_DB='qbc.db'

📧 Email Setup (Optional)

To avoid issues:

app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USERNAME'] = ADMIN_EMAIL app.config['MAIL_PASSWORD'] = ADMIN_PASSWORD app.config['MAIL_USE_TLS'] = False app.config['MAIL_USE_SSL'] = True


🔐 Setup App Password for Gmail

Go to: App Passwords

Log in → Choose "Mail" as app → Get app password.

Add it in your .env as MAIL_PASSWORD.


👨‍💻 Create Default Admin User

In create_database(app) method:

admin = User( email="your_email", password=generate_password_hash("your_password"), full_name="Admin QBC", is_admin=True, is_verified=True )


🧱 Database Setup

export FLASK_APP=website:create_app # On Windows: set FLASK_APP=website:create_app flask db init flask db migrate -m "initial migration" flask db upgrade


Run the Application

python app.py

Then visit: http://127.0.0.1:5000

⭐Technical Stack

  • Backend: Python Flask
  • Database: SQLAlchemy with SQLite
  • Authentication: Flask-Login
  • Email Services: Flask-Mailman
  • Frontend: Bootstrap 5, HTML, CSS, JavaScript
  • Charts: Chart.js for analytics visualization

⭐Installation and Setup

For more detailed installation instructions and usage guide, please check the Installation & Usage Guide.

📊 Database Models

  • User: Stores user information, authentication details, and verification status
  • Subject: Represents a subject area with multiple chapters.
  • Chapter: Represents a chapter within a subject with multiple quizzes
  • Quiz: Contains questions and settings for a specific quiz
  • Question: Stores question text, options, and correct answer
  • Score: Shows User Quizz Score Analysis in Proper Diagrams

🧾 Usage Guide

Admin:

  • Login with Admin Credentials so that they can add Tests.
  • Create new subjects with descriptions and qualification levels.
  • View and delete existing subjects.
  • Manage Subjects and Chapters.
  • Create quizzes for specific chapters.
  • Set time duration and remarks.

User:

  • Sign up with email and password and verify your email.
  • Browse available quizzes based on your qualification.
  • Start a quiz and answer questions within the time limit.
  • Submit answers for evaluation.

✨ Some Features of This App

  • Add multiple-choice questions to quizzes.
  • Edit and delete questions.
  • Set correct answers.
  • View comprehensive statistics about users, subjects, and performance.
  • Monitor qualification distribution and subject performance.

📱Project Screenshots

User Module

User Dashboard

image

User Analytics

image

User Quiz Mode

image

Admin Module

Admin Dashboard

image

Admin Analytics

image

Admin Subjects Panel

image

Subject's Quizzes Page

image

Quiz Editor

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors