cd /news/ai-tools/what-i-learned-building-an-ai-study-… · home › topics › ai-tools › article
[ARTICLE · art-175842] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

What I learned building an AI study app with Next.js 16, Supabase and FSRS

Kashif, an independent developer, built StudyCove, a Next.js 16 and Supabase study app that converts lecture PDFs into flashcards, quizzes, mock exams, mind maps and daily study plans. He reports that switching from a hand-rolled SM-2 variant to FSRS via ts-fsrs stabilized scheduling intervals, and that validating LLM-generated questions against a strict schema, moving long mock-exam generation into a Postgres job table with a claim/dispatch pattern, and adding settle-timeout retries and revision-numbered autosaves fixed reliability problems in production.

recommendation

Schema-validate LLM-generated questions and discard or regenerate failures, and run long generations as claimed jobs in Postgres rather than inside a request.

more in playbook: Verifying model output
by read2 min views2 publishedNov 25, 2026

I'm Kashif, and for the last few months I've been building StudyCove, an app that turns lecture PDFs into flashcards, practice quizzes, timed mock exams, mind maps and a daily study plan.

This isn't a launch post. It's the handful of things that bit me while building it, in case they save you a weekend.

My first version used a hand-rolled SM-2 variant. It "worked", but intervals drifted in weird ways once people skipped a few days. Switching to FSRS via ts-fsrs fixed it, and the library handles the awkward cases (lapses, relearning, overdue cards) better than I would have. Store the full card state, not just the next due date, so you can re-schedule if you ever change parameters.

LLMs will happily return a multiple-choice question with two correct answers, an answer that isn't in the options, or a duplicate of question 3. I now validate each question against a strict schema and drop or regenerate anything that fails, instead of trusting the response. Users notice one broken question far more than they notice ten good ones.

Generating a 40-question mock exam from a 90-page PDF can take a while. Doing it inside a request meant timeouts and stuck spinners. Moving generation to a job table with a claim/dispatch pattern in Postgres (and an index on the dispatch query) made it reliable, and lets the UI poll for progress.

I hit cases where a Server Action promise never settled after a network blip, leaving buttons disabled forever. Wrapping UI-side calls in a small "settle within N seconds or show a retry" helper made the app feel far more solid on bad connections, which is exactly where students are (library Wi-Fi, buses).

Rendering mind maps on a canvas myself was a time sink. Mind Elixir gave me editing, drag and keyboard shortcuts for free. The catch: its change events plus my autosave created a save loop. An inFlight guard and a revision number on every save fixed it, and revision numbers also stopped two tabs from overwriting each other.

I'm working on making mock exams feel closer to real papers (sections, marks, time per question). If you've built something similar, or you're a student with opinions, I'd love to hear what you'd do differently.

You can try it at studycove.pro.

── more in #ai-tools 4 stories · sorted by recency
── more on @studycove 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-i-learned-build…] indexed:0 read:2min 2026-11-25 · —