ExamPrepBack to Projects
apps

ExamPrep

Turn course materials into grounded practice: MCQ, short answer, and structured items with timed exams, safe in-exam payloads, and rubric-aware grading behind a FastAPI + Next.js stack.

Next.jsFastAPISQLAlchemyPydanticPostgreSQLSQLiteLLMsDockeruv

Deep dive

Case Study

Problem
Generic question banks don't know your syllabus. Handcrafting quiz items from notes takes hours. And AI-generated practice often feels repetitive or ungrounded — same idea, different punctuation. This project asks: can we turn your actual course materials into varied, trustworthy practice — MCQ, short answer, and structured items — with timed exams, immediate feedback, and grading that respects what each question is actually testing?
Approach
Product flow Users create courses, upload PDF / DOCX / TXT, and generate question banks with control over composition (mixed, MCQ-only, scenario-style, etc.) and difficulty. They take timed exams tied to a document or a specific bank; the API returns sanitized exam payloads (no leaked answers mid-exam), then graded results after submit. Technical architecture FastAPI backend with clear separation between HTTP layer and services (documents, chunking, generation, exams, grading, analytics). SQLAlchemy + Pydantic for persistence and validation; designed so SQLite works locally and PostgreSQL drops in via configuration for deployment. LLM abstraction so generation and rubric-style grading can swap providers (including a mock path for local/CI work). Frontend (Next.js) talks to the API via a single configurable base URL for local vs production. Quality & deduplication To avoid “same question, new punctuation,” generation and exam assembly use a hybrid dedupe strategy: lexical overlap plus semantic similarity, with an extra cross-check on borderline pairs—so banks and exam draws stay diverse without manually auditing every stem. Operations Backend packaged with uv and lockfiles; containerized API for cloud deploys; environment-driven CORS, auth, and limits so the same codebase can run dev → staging → prod.
Results
Delivered a complete study workflow — upload materials, generate varied question banks, sit a timed exam, and receive rubric-graded feedback with explanations — in a single deployable product Hybrid deduplication (lexical plus semantic with borderline cross-check) ensures question banks and exam draws feel like coverage, not repetition — even across repeated generation runs Rubric-aware grading treats MCQ and written items differently, giving feedback that matches what each question was actually testing rather than a binary right/wrong score Safe exam payload design strips sensitive fields during live sessions and releases full graded results only on submission — deliberate API security, not an afterthought Single codebase deploys across dev, staging, and production via environment-driven configuration — SQLite locally, PostgreSQL in production, same API contract throughout
Learnings
Shipping a demo is not the same as shipping a product: safe payloads, environment parity, grounded generation, and deduped sampling are invisible when they work and immediately felt when they don't. The engineering is in the details nobody sees.