MCQForge — Automated Document-to-MCQ Assessment Platform
Full-stack assessment platform extracting MCQs and answer keys from multi-column PDF, DOCX, and TXT study documents.
Engineered a full-stack assessment platform that extracts multiple-choice questions and answer keys from multi-column PDF, DOCX, and TXT study documents with OCR fallback, confidence scoring, and duplicate detection. Built session-isolated question review and timed/untimed exam workflows backed by Upstash Redis atomic Lua scripts, strict Zod schema validation, 113+ Vitest unit tests, and Playwright E2E tests.
Operational Challenge
Training providers and educators spend hours manually retyping multiple-choice questions and answer keys out of multi-column PDFs, scanned handouts, and DOCX banks into online quiz tools.
Intended Audience & Use Case
Certification academies, training companies, instructors, and students preparing structured practice exams from existing study documents.
System Design & Data Flow
Next.js App Router frontend with PDF.js and Mammoth document parsers plus OCR fallback, feeding a structured extraction pipeline with confidence scoring and duplicate detection, backed by Upstash Redis atomic Lua scripts for session-isolated review and exam state.
Important Technical Decisions
- —Used Upstash Redis atomic Lua scripts to guarantee race-free session isolation, timer state, and exam submissions without heavy database overhead.
- —Added multi-column layout detection and OCR fallback so both digital and scanned PDFs parse cleanly with per-question confidence scores.
- —Enforced strict Zod schema validation across extraction outputs, API boundaries, and exam state transitions.
Features Implemented
- Engineered a full-stack assessment platform that extracts multiple-choice questions and answer keys from multi-column PDF, DOCX, and TXT study documents with OCR fallback, confidence scoring, and duplicate detection
- Built session-isolated question review and timed/untimed exam workflows backed by Upstash Redis atomic Lua scripts, strict Zod schema validation, 113+ Vitest unit tests, and Playwright E2E tests
Testing & Engineering Notes
- —113+ Vitest unit tests covering PDF/DOCX parsing heuristics, duplicate detection, confidence scoring, and exam scoring.
- —Playwright end-to-end tests verifying document upload, question review, and timed/untimed exam completion flows.
- —Explicit error boundaries and schema guards for malformed documents or incomplete answer keys.