Skip to content

Ashutosh3021/PrepIQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PrepIQ β€” AI-Powered Exam Preparation Platform

Predict exam questions. Generate smart mock tests. Learn with a Socratic AI tutor.

Frontend Backend Database AI License


What is PrepIQ?

PrepIQ analyzes your past exam papers using a pipeline of 11+ ML and NLP models to surface high-probability questions, generate personalized mock tests, and guide your revision with an AI tutor that teaches β€” not just answers.

Built for students who want to study smarter, not just harder.


Full System Architecture

flowchart TD
    User["πŸ‘€ Student"]

    subgraph Frontend["Frontend β€” Next.js 16 + React 19 + TypeScript"]
        UI_Dashboard["Dashboard"]
        UI_Upload["Upload Papers"]
        UI_Predictions["Predictions"]
        UI_Tests["Mock Tests"]
        UI_Tutor["AI Tutor Chat"]
        UI_Analytics["Analytics"]
    end

    subgraph Backend["Backend β€” FastAPI + Python"]
        Auth["Auth Router\n(Supabase JWT)"]
        UploadRouter["Upload Router"]
        PredictRouter["Predictions Router"]
        TestRouter["Test Generator"]
        ChatRouter["AI Tutor Router"]
        AnalysisRouter["Analysis Router"]

        subgraph MLPipeline["ML Pipeline"]
            OCR["EasyOCR\n(Text Extraction)"]
            Layout["YOLOv8\n(Layout Detection)"]
            QImportance["Question Importance\nPredictor (TF-IDF + Transformer)"]
            QAnalyzer["Question Analyzer\n(TF-IDF + LDA + KMeans)"]
            Correlation["Correlation Analyzer\n(scikit-learn)"]
            SyllabusMap["Syllabus Analyzer\n(NLP)"]
            FocusID["Focus Area Identifier\n(Random Forest)"]
            TopicRec["Topic Recommender\n(Hybrid CF)"]
            ProgressFc["Progress Forecaster\n(LSTM/RNN)"]
        end

        subgraph AILayer["AI / LLM Layer"]
            Gemini["Google Gemini 2.5 Flash\n(Tutor Β· Summarize Β· Generate Β· Translate)"]
            subgraph Bytez["Bytez API Gateway (175k+ models)"]
                RoBERTa["deepset/roberta-base-squad2\n(QA)"]
                BART["facebook/bart-large-cnn\n(Summarization)"]
                FinBERT["ProsusAI/finbert\n(Classification)"]
                Llama3["meta-llama/Llama-3-8B\n(Generation)"]
                EmbGemma["google/embeddinggemma-300m\n(Similarity)"]
                Madlad["google/madlad400-3b-mt\n(Translation)"]
                BLIP["Salesforce/blip-large\n(Image Captioning)"]
                Llama2["meta-llama/Llama-2-7b-chat\n(Conversation)"]
            end
        end
    end

    subgraph Data["Data Layer β€” Supabase"]
        PG["PostgreSQL"]
        SupaAuth["Supabase Auth"]
        Storage["File Storage"]
    end

    User -->|interacts| Frontend
    Frontend -->|REST API calls| Backend
    Auth --> SupaAuth
    UploadRouter --> OCR
    UploadRouter --> Layout
    UploadRouter --> Storage
    OCR --> QImportance
    Layout --> QImportance
    QImportance --> Correlation
    QImportance --> QAnalyzer
    QAnalyzer --> SyllabusMap
    Correlation --> PredictRouter
    SyllabusMap --> PredictRouter
    FocusID --> AnalysisRouter
    TopicRec --> AnalysisRouter
    ProgressFc --> AnalysisRouter
    PredictRouter --> Gemini
    ChatRouter --> Gemini
    ChatRouter --> RoBERTa
    TestRouter --> Llama3
    AnalysisRouter --> FinBERT
    AnalysisRouter --> EmbGemma
    Backend --> PG
Loading

Features

  • Question Prediction β€” ML pipeline analyzes historical papers to surface recurring patterns with confidence scores
  • Smart Mock Tests β€” Generates practice tests weighted by prediction probability
  • AI Tutor β€” Socratic chatbot powered by Gemini 2.5 Flash that guides you to answers without giving them away
  • Analytics Dashboard β€” Visualizes weak areas, topic frequency, and revision progress
  • Subject Management β€” Organize subjects, papers, and study plans in one place

AI Models Used

Google Gemini 2.5 Flash

Task Details
AI Tutor Socratic teaching persona β€” guides students without revealing answers
Summarization Condenses study materials into concise notes
Text Generation Creates mock questions and concept explanations
Translation Translates study materials between languages

Bytez API (serverless model gateway)

Model Task
deepset/roberta-base-squad2 Question answering from document context
facebook/bart-large-cnn Long-form text summarization
ProsusAI/finbert Text classification and topic analysis
meta-llama/Llama-3-8B Question and content generation
google/embeddinggemma-300m Semantic similarity for duplicate detection
google/madlad400-3b-mt Multi-language translation
Salesforce/blip-image-captioning-large Image captioning for diagram extraction
meta-llama/Llama-2-7b-chat Conversational AI interactions

Local ML Engines (Python)

Engine Task
Question Importance Predictor (TF-IDF + Transformer) Ranks questions by exam likelihood
Question Analyzer (TF-IDF + LDA + KMeans) Topic modeling and clustering
Correlation Analyzer (scikit-learn) Patterns in historical exam data
Syllabus Analyzer (NLP) Maps syllabus topics to question bank
Focus Area Identifier (Random Forest) Identifies student weak areas
Topic Recommender (Hybrid CF) Personalized topic suggestions
Progress Forecaster (LSTM/RNN) Predicts future learning progress

Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS
Backend FastAPI, Python, SQLAlchemy
Database PostgreSQL via Supabase
Auth Supabase Auth + JWT
AI / LLM Google Gemini 2.5 Flash, Bytez API
ML / NLP RoBERTa, YOLOv8, EasyOCR, scikit-learn, LSTM

API Endpoints

Method Endpoint Description
POST /auth/signup User registration
POST /auth/login User login
GET /subjects List subjects
POST /upload/ Upload question paper
GET /predictions/{id}/latest Get predictions with confidence scores
POST /tests/generate Generate weighted mock test
POST /chat/tutor AI tutor session
GET /wizard/status Setup wizard status

Project Structure

PrepIQ/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ routers/       # API route handlers
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic + ML pipeline
β”‚   β”‚   β”œβ”€β”€ core/          # Config & security
β”‚   β”‚   β”œβ”€β”€ models.py      # Database models
β”‚   β”‚   β”œβ”€β”€ schemas.py     # Pydantic schemas
β”‚   β”‚   └── main.py        # FastAPI entry point
β”‚   └── requirements.txt
β”‚
└── frontend/
    β”œβ”€β”€ app/
    β”‚   β”œβ”€β”€ page.tsx           # Landing page
    β”‚   └── protected/         # Auth-gated routes
    β”‚       β”œβ”€β”€ dashboard/
    β”‚       β”œβ”€β”€ subjects/
    β”‚       β”œβ”€β”€ predictions/
    β”‚       β”œβ”€β”€ tests/
    β”‚       β”œβ”€β”€ chat/
    β”‚       └── upload/
    └── src/
        β”œβ”€β”€ components/
        β”œβ”€β”€ lib/               # API client + utilities
        └── hooks/

Quick Start

# Backend
cd backend
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload

# Frontend
cd frontend
npm install
cp .env.example .env.local
npm run dev

Environment Variables

Backend .env

DATABASE_URL=postgresql://...
SUPABASE_URL=https://...
SUPABASE_SERVICE_KEY=...
JWT_SECRET=...
GEMINI_API_KEY=...
BYTEZ_API_KEY=...

Frontend .env.local

NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_SUPABASE_URL=https://...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...

Deployment

Service Platform
Frontend Vercel
Backend Railway
Database Supabase

License

MIT Β© Ashutosh Patra

About

PrepIQ is an intelligent platform that uses AI-driven pattern analysis to predict question papers and guide students through strategic exam preparation. It analyzes previous year question papers (PYQs), identifies recurring patterns, and generates high-probability predicted questions tailored to specific universities and courses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors