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.
- 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.
- 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.
- Backend: Python Flask
- Database: SQLAlchemy + SQLite
- Authentication: Flask-Login
- Email: Flask-Mailman
- Frontend: Bootstrap 5, HTML, CSS, JS
- Analytics: Chart.js
git clone https://github.com/Shahid6174/QBC.git cd QBC
python -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install poetry poetry install --no-root
- Create file .env
- cp .env.example .env
- Update the variables in .env: SECRET_KEY='your_secret_key' ADMIN_EMAIL='your_admin_email' ADMIN_PASSWORD='your_admin_password' SQLITE_DB='qbc.db'
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
Go to: App Passwords
Log in → Choose "Mail" as app → Get app password.
Add it in your .env as MAIL_PASSWORD.
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 )
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
python app.py
Then visit: http://127.0.0.1:5000
- 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
For more detailed installation instructions and usage guide, please check the Installation & Usage Guide.
- 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
- 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.
- 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.
- 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.








