Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MCQ Scanner — AI-Powered Quiz Digitizer

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.


Features

  • 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.


Screenshots

Splash Screen Upload Screen Quiz Generated
Splash Screen Upload Screen Quiz Generated
Select Answer Evaluation Report History Screen
Select Answer Evaluation Report History

Tech Stack

  • 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)

Project Structure

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

Getting Started

Prerequisites

  • Flutter SDK ^3.9.2
  • Python ^3.10
  • Google Gemini API Key

Installation & Setup

1. Backend Setup (Flask)

  1. Navigate to the backend folder:

    cd mcq_scanner_backend
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate    # For Linux/Mac
    venv\Scripts\activate       # For Windows
  3. Install dependencies:

    pip install -r requirements.txt
  4. Configure environment variables:

    • Copy .env.example to .env
    • Add your GEMINI_API_KEY
  5. Run the server:

    python run.py

2. Frontend Setup (Flutter)

  1. Navigate to the app folder:

    cd mcq_scanner_app
  2. Install dependencies:

    flutter pub get
  3. Configure API URL:

    • Update the baseUrl in lib/core/constants/app_constants.dart with your machine's local IP address.
  4. Run the app:

    flutter run

API Endpoints

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

Flutter App

dependencies:
  get: ^4.7.2
  google_mlkit_text_recognition: ^0.15.0
  image_picker: ^1.2.0
  http: ^1.5.0
  camera: ^0.11.2

Flask Backend

Flask==3.0.0
python-dotenv==1.0.0
google-generativeai==0.3.2

Author

Abdul Sami

About

An MCQ Scanner App for students developed using Flutter and Flask. Students can take a picture of a physical MCQs exam paper and the app gives them an interactive quiz experience where they can solve those mcqs on the app and AI evaluates them.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages