Deckio
AI that turns study material into a full exam-prep practice system.
- FUNCTION
- Source → review-ready practice + SRS
- STATUS
- Live, actively shipping
- IN SERVICE
- 2024 – present
- ROLE
- Solo · design → support
01The problem
Students paste notes or upload a PDF and get nothing back they can actually study with. Generating cards is fast; building a practice habit with them is not.
Deckio converts arbitrary source material — text, PDF, DOCX, PPTX, image, YouTube — into review-ready content, then schedules it forward with spaced repetition so hard material resurfaces exactly when memory is fading.
02Approach
The generation layer runs Gemini Flash with per-mode prompt tuning — flashcards, long-form Q&A, and MCQ are separate calls with different density ranges. Large documents fan across multiple calls with deduplication rather than one giant context window.
Signed-in state lives in Supabase. A separate Python/Flask sidecar on Railway handles the binary work that can't run cleanly in serverless JS: Anki .apkg assembly via genanki, PyMuPDF page rendering, python-pptx extraction.
Deliberately no in-house ML inference, no vector store, no RAG pipeline. Gemini's context window is the retrieval layer — fewer moving parts, less to operate alone.
03How it works
- User submits a source — text, PDF, DOCX, PPTX, image, or YouTube URL.
- Flask sidecar extracts raw text; large PDFs are rendered to images for the vision path.
- Next.js API routes the Gemini Flash call with mode, density, and language params.
- Cards stream back; the user reviews inline or saves the deck to Supabase.
- SM-2 schedules each card; the SRS queue resurfaces due cards daily.
- Study Spaces wrap materials into an exam countdown with an AI topic path and a readiness model built from practice events.
04Capabilities
- PDF / DOCX / PPTX / image / YouTube → cards
- SM-2 spaced repetition, per-card ease tracking
- Anki
.apkgexport — cloze + basic - Image-occlusion card editor
- Study Spaces: countdown + topic path + heatmap
- Math rendering — KaTeX inline & block
- Mermaid diagrams in notes
- Output-language picker with RTL rendering
05Stack
- LANGUAGE
- TypeScript (Next.js) · Python (Flask sidecar)
- FRONTEND
- Next.js 16 · React 19 · Tailwind CSS 4 · Framer Motion · Expo 55 / RN 0.83 (Android)
- BACKEND / DATA
- Supabase (Postgres + Auth) · Gemini 3 Flash · DB-backed rate limiting
- SERVICES
- DodoPayments · Resend · PostHog · Sentry
- INFRA / DEPLOY
- Vercel · Railway · EAS OTA · Supabase managed Postgres
06Engineering notes
-
Large-PDF vision path. Pages are rendered individually to images by PyMuPDF on the sidecar and sent as separate vision calls to stay under token limits — a 300s fluid-compute window, 10 images per call. A single 500-page request fans into ~50 sequential calls.
-
Quota consistency. Generation uses a DB-level consume-then-refund pattern (
consumeUsageQuota+refundUsageQuota) so a timed-out Gemini call never silently drains a user's monthly allowance. -
Profiles as billing source of truth. The
subscriptionstable is unused; all tier logic resolves fromprofiles.subscription_status+has_pro_limits+purchased_card_credits— collapsing pack buyers and trial-to-paid into a single row read. -
SM-2 with Anki-style learning steps. New cards run a short-interval learning phase before graduating to the ease schedule; "Hard" ×0.8, "Easy" ×1.3, lapses reset to learning — matching Anki's real behaviour, not a simplified version.
07In service
08What's next
- Public deck gallery as an SEO / GEO acquisition engine for long-tail exam keywords.
- iOS App Store launch — pending Apple developer enrollment.