A comprehensive web-based quiz management system built with Flask and SQLAlchemy. This application allows professors to create and manage quizzes, while students can take these quizzes and view their results.
You can access a live demo of this application at: shloksitare.pythonanywhere.com
- Create and manage quizzes with multiple-choice questions
- Set time limits and deadlines for quizzes
- Generate quizzes using AI (Gemini API integration)
- View detailed quiz results and analytics
- Export quiz results to CSV
- Regrade quizzes and manage student submissions
- Release results to students
- Take quizzes with a user-friendly interface
- View quiz results and feedback
- Track time remaining during quizzes
- Auto-save progress during quiz taking
- View historical quiz attempts
- Python 3.7+
- pip (Python package manager)
- Git
- A Gemini API key (for AI quiz generation)
-
Clone the repository
git clone https://github.com/shlok-0007/Quzo.git cd Quzo -
Create a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the project root with the following content:SECRET_KEY=your-secret-key-here DATABASE_URI=sqlite:///app.db GEMINI_API_KEY=your-gemini-api-key -
Initialize the database
flask db init flask db migrate -m "Initial migration" flask db upgrade
-
API Keys
- Create a
api_keys.jsonfile in the project root with your Gemini API key:{ "keys": ["your-gemini-api-key-here"], "key_status": { "your-gemini-api-key-here": { "is_active": true, "usage_count": 0 } } }
- Create a
-
Database
- The application uses SQLite by default, which will be created automatically
- For production, consider using PostgreSQL or MySQL by updating the
SQLALCHEMY_DATABASE_URIinconfig.py
-
Start the development server
python app1.py
or
flask run
-
Access the application
- Open your web browser and go to
http://localhost:5000 - Register as a professor or student
- Open your web browser and go to
.
├── app1.py # Main application file
├── config.py # Configuration settings
├── models.py # Database models
├── api_utils.py # Utility functions for API integration
├── requirements.txt # Python dependencies
├── migrations/ # Database migrations
├── static/ # Static files (CSS, JS, images)
└── templates/ # HTML templates
This application integrates with the Google Gemini API for AI-powered quiz generation. To use this feature:
- Get a Gemini API key from Google AI Studio
- Add the key to your
api_keys.jsonfile - The AI will be available when creating new quizzes
- Always keep your
SECRET_KEYand API keys private - Use environment variables for sensitive information
- Regularly update your dependencies
- Use HTTPS in production
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Flask
- Uses SQLAlchemy for database operations
- AI features powered by Google Gemini
- Frontend built with Bootstrap 5