QuEstAI is an intelligent exam question generator designed for the Indian education system (CBSE-style). It uses advanced NLP techniques to analyze educational content and generate Bloom's taxonomy-aligned questions with source context tracking.
๐ Live Demo: https://quest-ai-green.vercel.app/login
- AI-Powered Question Generation: Uses spaCy and T5 transformer models
- Multiple Question Types: MCQ, Short Answer, and True/False questions
- Bloom's Taxonomy Alignment: Questions categorized by cognitive levels
- Source Context Tracking: "Why is this wrong?" feature shows original text
- Printable Exports: Generate Word documents for classroom use
- User Authentication: JWT-based secure authentication
- Data Isolation: Users only see their own quizzes
- FastAPI (Python 3.11) - Modern, fast web framework
- SQLite with SQLAlchemy ORM - Database management
- spaCy (
en_core_web_sm) - Natural language processing - HuggingFace Transformers (T5-small) - Question generation
- PyMuPDF - PDF text extraction with page tracking
- python-docx - Word document generation
- JWT with Passlib - Authentication and security
- React 18 with Vite - Modern React development
- Tailwind CSS - Utility-first styling
- React Router - Client-side routing
- Axios - HTTP client
- Lucide React - Beautiful icons
- Recharts - Data visualization
- React Hot Toast - Notifications
- Python 3.11+
- Node.js 18+
- npm or yarn
-
Navigate to backend directory
cd backend -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Download spaCy model
python -m spacy download en_core_web_sm
-
Set up environment variables
# Update .env file with your settings SECRET_KEY=your-super-secret-key-here ALGORITHM=HS256 ACCESS_TOKEN_EXPIRE_MINUTES=30 DATABASE_URL=sqlite:///./questai.db -
Run the backend server
python run.py
The API will be available at
http://localhost:8000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Start development server
npm run dev
The frontend will be available at
http://localhost:3000
- Create an account with username, email, and password
- Login to access the dashboard
- Click "Generate New Quiz" from dashboard
- Upload a PDF file (educational content)
- Configure question types and counts:
- Multiple Choice Questions (4 options each)
- Short Answer Questions (open-ended)
- True/False Questions (binary choice)
- Click "Generate Quiz" and wait for AI processing
- Navigate through questions using the sidebar
- Answer questions in any order
- Submit when complete
- See overall score and performance metrics
- View Bloom's taxonomy breakdown
- For incorrect answers, click "Why is this wrong?" to see source context
- Export results or retake quiz
- Download Word documents with:
- Formatted exam paper with answer spaces
- Separate answer key with source references
- Professional layout ready for printing
- User: Authentication and user management
- Quiz: Quiz metadata and scoring
- Question: Individual questions with source tracking
- Text Extraction: PyMuPDF extracts text with page numbers
- Content Analysis: spaCy processes text for entities and complexity
- Question Generation:
- Rule-based approach for MCQ and True/False
- T5 transformer for Short Answer questions
- Source Mapping: Track which text generated each question
- JWT tokens for stateless authentication
- Password hashing with bcrypt
- Protected routes with user isolation
config = {
"mcq_count": 5,
"short_answer_count": 3,
"true_false_count": 2,
"difficulty_distribution": {"Easy": 30, "Medium": 50, "Hard": 20},
"bloom_levels": ["Remember", "Understand", "Apply", "Analyze"]
}SECRET_KEY=your-secret-key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
DATABASE_URL=sqlite:///./questai.dbPOST /auth/register- User registrationPOST /auth/login- User login
POST /quiz/generate- Generate quiz from PDFGET /quiz/- Get user's quizzesGET /quiz/{id}- Get specific quizPOST /quiz/{id}/submit- Submit quiz answersGET /quiz/{id}/export/docx- Export as Word document
- Remember: Factual recall questions
- Understand: Comprehension and explanation
- Apply: Using knowledge in new situations
- Analyze: Breaking down complex information
- Professional exam paper layout
- Proper marking scheme
- Answer key with source references
- Space for student details
- JWT-based authentication
- Password hashing with bcrypt
- User data isolation
- Input validation and sanitization
- CORS protection
- Update environment variables for production
- Use PostgreSQL instead of SQLite (recommended for cloud deployments)
- Set up reverse proxy (nginx) or use a managed load balancer
- Enable HTTPS
- Configure proper CORS origins
This repository is pre-configured with Docker for both backend and frontend and a docker-compose.yml to run everything together.
In the backend directory, create a .env file:
SECRET_KEY=your-production-secret-key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
DATABASE_URL=sqlite:///./questai.db # Or your PostgreSQL URL in production
# Comma-separated list of allowed frontend URLs (for CORS)
FRONTEND_ORIGINS=http://localhost,http://localhost:80,https://your-frontend-domain.comFrom the project root:
docker-compose build
docker-compose up -d- Backend API will be available at
http://localhost:8000 - Frontend UI will be available at
http://localhost
You can now point your browser to the frontend URL and it will talk to the backend container.
On a server (Ubuntu, etc.):
- Install Docker and Docker Compose
- Clone this repository
- Set your production
.envinbackend/.env - Run:
docker-compose build
docker-compose up -dThen configure your DNS to point to the server and optionally terminate HTTPS using a reverse proxy (e.g., nginx + certbot or a cloud load balancer).
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the API endpoints
- Support for more file formats (DOCX, TXT)
- Advanced question types (Fill-in-the-blanks, Matching)
- Collaborative quiz creation
- Analytics dashboard for teachers
- Integration with Learning Management Systems
- Multi-language support
- Advanced AI models (GPT-4, Claude)
QuEstAI - Transforming education through intelligent question generation! ๐โจ