An AI-powered mobile and backend system that automates the conversion of printed or handwritten multiple-choice question (MCQ) papers into interactive, digital quizzes. The project bridges the gap between traditional paper-based assessments and modern digital learning environments.
-
MCQ Paper Scanning
Upload or capture handwritten/printed MCQ papers through the mobile app. -
AI Text Extraction
Extracts question statements and options using Google Gemini API. -
Automatic Quiz Structuring
Converts scanned text into structured, digital quiz format. -
Quiz Evaluation
Enables users to take quizzes and view results instantly. -
Quiz History Tracking
Stores and retrieves user quiz results. -
Offline Fallback
Uses a rule-based parser if Gemini AI is unavailable.
![]() |
![]() |
![]() |
| Splash Screen | Upload Screen | Quiz Generated |
![]() |
![]() |
![]() |
| Select Answer | Evaluation Report | History |
- Frontend: Flutter
^3.9.2 - State Management: GetX
^4.7.2 - Backend: Flask
^3.0.0 - AI Model: Google Gemini (
gemini-2.5-flash) - Database: SQLite (for backend history) and SharedPreferences (for app cache)
mcq_scanner/
├── mcq_scanner_app/ # Flutter mobile application
│ ├── lib/
│ │ ├── core/ # Constants, themes, routes
│ │ ├── data/ # Models
│ │ ├── modules/ # Screens (Home, Scan, Quiz, etc.)
│ │ └── services/ # OCR and API services
│ └── assets/
│ └── images/app-ui/ # App screenshots
└── mcq_scanner_backend/ # Flask backend server
├── app/
│ ├── routes.py # API endpoints
│ ├── services/ # AI processing logic
│ └── models/ # Database operations
└── run.py # Server entry point
- Flutter SDK
^3.9.2 - Python
^3.10 - Google Gemini API Key
-
Navigate to the backend folder:
cd mcq_scanner_backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # For Linux/Mac venv\Scripts\activate # For Windows
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Copy
.env.exampleto.env - Add your GEMINI_API_KEY
- Copy
-
Run the server:
python run.py
-
Navigate to the app folder:
cd mcq_scanner_app -
Install dependencies:
flutter pub get
-
Configure API URL:
- Update the
baseUrlinlib/core/constants/app_constants.dartwith your machine's local IP address.
- Update the
-
Run the app:
flutter run
| Endpoint | Method | Description |
|---|---|---|
/api/process_text |
POST | Extracts questions and options from raw text. |
/api/evaluate_quiz |
POST | Evaluates quiz answers using AI or self-assessment. |
/api/quiz_history |
GET | Retrieves user's previous quiz attempts. |
dependencies:
get: ^4.7.2
google_mlkit_text_recognition: ^0.15.0
image_picker: ^1.2.0
http: ^1.5.0
camera: ^0.11.2Flask==3.0.0
python-dotenv==1.0.0
google-generativeai==0.3.2
Abdul Sami
- GitHub: @5-abdulsami
- Website: abdulsami.live
- Email: 5abdulsami2004@gmail.com
- LinkedIn: Abdul Sami





