DEV Community

Cover image for I kept rewriting the same quiz + spaced-repetition code. So I packaged it into an API.
limack0
limack0

Posted on

I kept rewriting the same quiz + spaced-repetition code. So I packaged it into an API.

While building my own medical edtech product, I wrote the same "text → quizzes + flashcards + review schedule" plumbing at least three times. Every new feature, same chore: call an LLM, parse the output, schedule the next review, and avoid paying twice for the same input.
So I cleaned it up into one small API — QuizForge:

  • POST /generate — text, a URL, or a PDF → MCQs, short questions, flashcards (in the language you ask).
  • POST /grade — score a free-text answer 0–5 with feedback.
  • POST /review/next — SM-2 spaced repetition, the next due date for a card. Two things I cared about:
  • Don't pay twice. Identical input is served from a content-hash cache — no second LLM call.
  • Make it testable. The LLM is injected, so the whole thing runs offline — 29 tests, no network. It's live as a hosted API with a free tier to try it, and there's a self-host version (Docker, bring your own LLM key) for people who'd rather run it themselves. Full disclosure: I build with AI assistance (I pair with Claude), and I'm a solo founder — a maxillofacial surgeon who got into shipping software, not a team. Support is email-only, but I answer everything. Happy to dig into the design — and I'd genuinely like to hear how you'd price the hosted version. Hosted (free tier): https://rapidapi.com/limack0/api/quizforge Self-host (source + Docker): https://limack.gumroad.com/l/quizforge

Top comments (0)