Project Type: Django-based Quiz Generator (Generative AI)
GENAI_P3_QUIZ_GENERATOR is a web application built on Django that generates custom quizzes (MCQs) from user-provided text input. Using the OpenAI GPT-3.5 Turbo API, it creates questions and answers on-the-fly and stores the results in both the database and downloadable text files.
- Quiz generation on any user-provided topic
- Results saved both in Django database and as
.txtfiles - Clean web interface using HTML, CSS, Django templating
- Built on Django—robust backend framework trusted by apps like Instagram and Pinterest
See the app in action via this YouTube demo:
.
├── manage.py
├── quiz_generator/
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py # Quiz/Question models
│ ├── views.py # Handles quiz generation & saving
│ ├── templates/
│ │ ├── quiz_form.html
│ │ └── quiz_results.html
│ ├── static/ # CSS & JS assets
│ └── urls.py
├── project_name/ # Django project settings
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── requirements.txt
└── README.md # This file
-
Clone the repository
git clone <repo-url> cd GENAI_P3_QUIZ_GENERATOR
-
Create & activate a virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Set your OpenAI API key (via environment or settings.py)
python manage.py migrate
-
Set your OpenAI API key (via environment or settings.py)
-
Apply database migrations
python manage.py migrate- Run the development server
python manage.py runserver
- Access the app at http://127.0.0.1:8000/ and submit topic text to generate quizzes.
- You input a topic or paragraph.
- The backend sends this to GPT-3.5 Turbo via OpenAI API.
- The AI returns MCQs with correct answers.
- Results display on the web and are saved to both the database and a .txt file for download.
- Quiz Customization: Specify number of questions, choose between MCQ and true/false formats
- User Management & History: Enable login, quiz history access, and personalized dashboards
- Admin Analytics: Track export stats, quiz frequency, and popular topics
- Export Features: Add PDF/CSV download support
- UI Improvement: Responsive design and richer front-end interactivity
- Requires a valid OpenAI API key
- Optimized for educational and demonstration purposes
- Do not hard-code API keys—use secure environment variables
Developer: [Tejas Desai]
LinkedIn: [https://www.linkedin.com/in/tejasddesaiindia/]
License: Released under the MIT License
