A specialized web application for managing and correcting quiz questions in a database. The application provides an intuitive interface for editing questions, managing choices, and maintaining question quality with AI-powered explanations.
- 🎯 Interactive dashboard for managing quiz questions
- 🔍 Advanced search and filtering by file path, status, and category
- ✏️ Edit questions, add/remove choices, and select correct answers
- 🤖 Auto-generated explanations using Google Gemini AI
- 🖼️ Image management capabilities with AWS S3/CloudFront
- 📊 Question status tracking (verified, likely correct, needs review)
- 🗄️ PostgreSQL database integration via Supabase
- Python 3.8+
- PostgreSQL database (via Supabase)
- Google Gemini API key
- AWS account for S3/CloudFront
- Node.js and npm (for frontend development)
Create a .env file in the root directory with the following variables:
SUPABASE_USER=your_user
SUPABASE_PASSWORD=your_password
SUPABASE_HOST=your_host
SUPABASE_PORT=your_port
SUPABASE_DBNAME=your_dbname
GEMINI_API_KEY=your_gemini_api_key
AWS_ACCESS_KEY_ID=your_aws_key_id
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_REGION=your_aws_region
S3_BUCKET=your_bucket_name
CLOUDFRONT_DOMAIN=your_cloudfront_domain- Clone the repository:
git clone https://github.com/yourusername/consensus-dashboard.git
cd consensus-dashboard- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt-
Run migrations (if applicable)
-
Start the development server:
python app.pyOr with Gunicorn:
gunicorn app:appconsensus-dashboard/
├── app.py # Application entry point
├── config.py # Configuration settings
├── models.py # Database models
├── routes.py # API routes
├── services/ # Service modules
│ ├── gemini_service.py
│ ├── image_service.py
│ └── question_service.py
├── static/ # Static files (JS, CSS)
├── templates/ # HTML templates
└── tests/ # Test cases
The application can be deployed using Gunicorn as the WSGI server. Example deployment command:
gunicorn app:app --workers 4 --bind 0.0.0.0:8000Run the test suite:
python -m pytest tests/- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.