WALEED.
Back to All Case StudiesIndependent Engineering Project
SECTION 02/ AI / ML // 2026

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.

PLATE 02MCQForge — Automated Document-to-MCQ Assessment Platform
[ SYSTEM PREVIEW // 02 ]PRODUCTION BUILD
PDF.JS + MAMMOTH + OCR
Multi-Column MCQ & Key Extractor
CONFIDENCE + DEDUP
UPSTASH REDIS LUA113+ VITEST + E2E
Session-Isolated Review & Timed Exam Engine
STRICT ZOD SCHEMA VALIDATION
VERIFIED ARCHITECTUREWALEED // 02
CASE STUDY SPECIFICATION2026

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.

TECHNOLOGIES USED
Next.jsTypeScriptUpstash Redis (Lua)PDF.jsMammothZodVitestPlaywright
01 // PROBLEM IT ADDRESSES

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.

02 // TARGET USERS

Intended Audience & Use Case

Certification academies, training companies, instructors, and students preparing structured practice exams from existing study documents.

03 // SOLUTION ARCHITECTURE

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.

04 // ARCHITECTURE CHOICES

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.
05 // CAPABILITIES

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
06 // QUALITY & RIGOR

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.
NEED A SIMILAR SYSTEM BUILT FOR YOUR BUSINESS?

Let's Architect Your Custom Solution