You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exam Hub uses AI to analyze documents (PDF, DOCX), detect images/tables, and automatically generate multiple-choice questions.
System Architecture
flowchart TB
subgraph Client["🌐 Client"]
FE[React App<br/>Port 5173]
end
subgraph Server["⚙️ Backend API - FastAPI"]
API[REST API<br/>Port 5001]
subgraph Services["📦 Services"]
AUTH[Auth Service]
EXAM[Exam Service]
GENAI[GenAI Service]
VISION[Vision Service]
UPLOAD[Upload Service]
end
subgraph AI["🤖 AI Providers"]
OPENAI[OpenAI GPT-4]
GEMINI[Google Gemini]
end
end
subgraph ML["🧠 ML Models"]
DETR[Deformable DETR<br/>DocLayNet]
GEMINI_VISION[Gemini Vision<br/>Image Analysis]
end
subgraph Data["💾 Data Layer"]
DB[(SQLite<br/>PostgreSQL)]
REDIS[(Redis)]
FILES[File Storage<br/>./uploads]
end
FE <-->|HTTP/REST| API
API <--> AUTH
API <--> EXAM
API <--> UPLOAD
EXAM <--> GENAI
GENAI <--> OPENAI
GENAI <--> GEMINI
EXAM <--> VISION
VISION <--> DETR
VISION <--> GEMINI_VISION
AUTH <--> DB
EXAM <--> DB
UPLOAD <--> DB
UPLOAD <--> FILES
GENAI <--> REDIS
VISION <--> REDIS
Loading
Exam Generation Flow
sequenceDiagram
participant User
participant FE as Frontend
participant API as FastAPI
participant SVC as Services
participant GENAI as GenAI
participant VISION as Vision
participant AI as OpenAI/Gemini
participant DB as Database
User->>FE: Upload PDF document
FE->>API: POST /upload
API->>DB: Save file metadata
Note over API,DB: File saved to ./uploads
User->>FE: Generate exam<br/>(Vision enabled)
FE->>API: POST /exam/generate<br/>enable_vision=true<br/>file_id=xxx
API->>SVC: generate_exam_from_text()
SVC->>VISION: analyze_document()
rect rgb(0.9, 0.9, 1)
Note over VISION: Vision Pipeline
VISION->>VISION: Render PDF to images
VISION->>DETR: Detect figures/tables
VISION->>VISION: Extract images
VISION->>GEMINI_VISION: Analyze with AI
VISION-->>SVC: vision_context + image_refs
end
SVC->>GENAI: generate_exam(prompt + vision_context)
GENAI->>AI: Send prompt
AI-->>GENAI: Questions JSON
GENAI-->>SVC: Normalized questions
Note over SVC: Inject image_refs into questions
SVC->>DB: Save exam
DB-->>SVC: exam_id
SVC-->>API: Questions with images
API-->>FE: Success + questions
User->>FE: Take exam
FE->>API: GET /exam/{id}
API-->>FE: Exam with image descriptions
Note over FE: Display images in questions
Loading
✨ Features
AI Exam Generation
Multi-Provider: OpenAI GPT-4, Google Gemini, Mock (testing)
A flexible and customizable exam application platform for various subjects and tools. Build, manage, and deliver interactive examinations with support for multiple question types, subject-specific testing, and extensible modules for different educational tools.