Skip to content

About

pdf to quiz generator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LearnWithMe 📚

Upload a PDF → generate an AI quiz → play 20 random questions → see your score and solutions → download results as PDF.

Stack

  • Next.js 14 (App Router) + MongoDB (Mongoose)
  • Auth: GitHub OAuth + email/password with JWT (httpOnly cookie)
  • Quiz generation: OpenAI API
  • PDF: pdf-parse for extraction, jspdf for results download

Setup

  1. Install dependencies

    npm install
  2. Configure environment — copy .env.example to .env.local and fill in:

  3. Run

    npm run dev

    Open http://localhost:3000

How it works

  • Home — upload a PDF; text is extracted server-side and sent to OpenAI, which returns up to 30 MCQs stored in MongoDB.
  • Play — /play/[id] serves 20 random questions (answers stay server-side).
  • Results — answers are graded on the server; the solutions page shows correct answers + explanations and offers a PDF download with your score.
  • About — edit app/about/page.js to personalize.

Notes

  • Scanned/image-only PDFs won't work (no OCR).
  • Quiz generation costs a small amount per upload via the OpenAI API.

About

pdf to quiz generator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages