Gist — a GCSE revision app
Gist is a UK GCSE study app that combines spaced-repetition practice, AI-generated exam papers with mark schemes, per-topic mastery tracking, and staff-curated content. Built with Django 5, PostgreSQL, and Google Gemini. Free tier available; runs as an installable PWA.
What Gist is
Gist helps GCSE students revise across multiple subjects. It builds a daily mixed-subject session tailored to each student's exam dates, weightings, and per-topic accuracy, then tracks progress with a spaced-repetition schedule and AI-marked practice papers. Content covers AQA and Edexcel Sciences, Maths, English Language & Literature, History, Geography, Religious Studies, Computer Science, PE, Business Studies, Sociology, and MFL (French, Spanish, German).
Core features
- **Adaptive daily session** — a mixed multi-subject plan whose slice sizes are weighted by exam proximity and per-topic weakness.
- **SM-2 spaced repetition** for wrong answers and reviewable questions, with a 3-day "wobble day" grace before new mistakes enter the queue.
- **AI-generated practice exam papers** — staff-reviewed templates per subject with realistic AQA-style structure (7-10 major questions × 30-45 sub-parts for sciences, 20-25 numbered questions for Maths, extract-based essays for English Literature, etc.).
- **AI paper marker** — point-based and level-of-response marking following AQA General Marking Principles, with structured feedback (what went well, could improve, red flags, matched marking-scheme points, and a full-mark exemplar answer).
- **Weakness paper** compiled from all published exam templates for a subject, weighted by the student's per-topic accuracy.
- **Calculator vs non-calculator popup** on paper start for Maths; sciences auto-allow the calculator; English/History/Geography/RS/CS never show it.
- **Notes drawer** with a scratchpad, scientific calculator, and per-question explanation panel — hidden during exams so the practice matches the real thing.
- **Ask Gist AI** — an in-context tutor pill on every question surface plus a dashboard chat, question-anchored so it explains without giving the answer away.
- **Flashcards + Quiz decks** with manual creation, AI generation, Quizlet/CSV import, and public/shareable decks browsable via Search.
- **Progress calendar** showing per-day study plan, streak, time-in-sessions, key exam dates, and a forgetting-curve chart with pinnable topics.
- **Mastery forecasts** — "at this pace, you'll hit 80% on Electrolysis in 6 days" — surfaced on session complete and profile.
- **Guided welcome tour** across dashboard → subjects → deck generation → progress calendar.
- **PWA install** with offline shell, stale-while-revalidate service worker, and per-platform install instructions.
- **Push notifications** for due reviews via VAPID-signed Web Push.
Subjects covered
Biology, Chemistry, Physics, Mathematics, English Language, English Literature, History, Geography, Religious Studies, Computer Science, Business Studies, Sociology, PE, French, Spanish, German. Exam boards: AQA and Edexcel (primary), with a generic "GCSE" fallback shape for others.
For each science subject the paper generator knows the required practicals, the 6-marker level-of-response ladder, and the maths-percent target. For Maths it knows the higher/foundation distinction and the calculator-vs-non-calc paper split. For English Literature it knows the 30-mark extract-based essay ladder. For History it knows the 16-mark "How far do you agree" essay with SPaG bonus.
Adaptive algorithms
- **SM-2 spaced repetition** — ease factor 2.5 default, floor 1.30, 1-day/6-day/prev×ease intervals; binary quality mapping (wrong = 2, correct = 4).
- **Mastery EMA scoring** — hint-adjusted target (50 or 100 depending on whether the student saw a hint), difficulty weight `0.25 × (difficulty / 3)`.
- **Priority-weighted daily queue** combining weakness, overdue-ness, novelty, difficulty, exam weight, and blind-spot signal.
- **Blind-spot detection** — fast-and-wrong pattern flags overconfidence on specific topics.
- **Weakness computation** — `(1 - accuracy)²` floored at 0.2 so mastered topics still get some airtime.
- **Proximity weighting** for exam dates — exponential ramp with a 1.5× priority multiplier and post-exam decay.
- **Auto daily-plan builder** with per-date proximity weighting and a 2-day lockdown to the imminent exam.
- **Numeric marker** accepting fractions, decimals, thousands separators, currency symbols, unit suffixes, and spelled-out numbers.
- **Break recommender** — 45-minute baseline with 60% early-break on fatigue.
- **Pace estimation** in questions-per-minute, overall and per-subject.
- **Two-pass session builder** — first pass skips MCQ cover, second pass respects the student's cover setting.
- **Similar-question injection** after a wrong answer for immediate reinforcement.
- **Mastery forecast projection** — 21-day pace model with 12-week horizon cap.
- **Predicted grade calculation** with per-qualification grade bands and confidence labels.
AI features (Google Gemini)
- **Exam paper generation** — subject-aware prompt reads paper-format specs (major-question count, sub-part total, type mix, six-marker rules, required practicals, maths percent, examiner persona) and emits nested JSON. Extend-retry when the model under-supplies parts.
- **Exam paper marking** — point-based system for short/extended/calculation parts, level-of-response system for six-mark essays. AQA General Marking Principles baked in: phonetic spelling, right + wrong = wrong, unambiguous pronoun reference, ignore vs do-not-accept, subject terminology, British spelling.
- **Structured marker feedback contract** — every marked part returns: `justification`, `feedback`, `what_went_well` (2-4 bullets), `could_improve` (2-4 bullets), `red_flags` (0-3 bullets), `matched_points` (index list of mark-scheme hits), `improved_answer` (rewrite of the student's response), `level` + `level_reasoning` for essays.
- **Ask Gist AI** — question-context-aware tutor with a 120-word cap and 6-turn conversation memory. Falls back to the pre-stored explanation when the API key is missing.
- **Flashcard AI generator** — 3-50 cards per call, auto-detects the target specification from the user's prompt.
- **Quiz AI generator** — same shape, MCQ questions.
- **Mindmap AI branches** — 3-8 topic branches suggested per node.
- **Curriculum authoring commands** — AI-generate questions, lessons, worked steps, literature quote-based questions, question diagrams, and anthology text bodies.
- **Per-user 24-hour rate limit** (60 calls/day default, staff bypass, cache-backed).
- **Global daily circuit breaker** (1400 calls/day default) protects the shared free-tier quota.
- **Prompt-injection defence** — zero-width character scrub, 2000-char cap, jailbreak pattern reject, leak-response detection.
- **AI usage dashboard** for staff — day/week/month rollups per feature, top errors, heaviest users, per-user quota headroom.
Content and curriculum
- Hierarchical curriculum model: Subject → ExamBoard → Qualification → Specification → Topic (parent/child hierarchy) → Question.
- Question types: multiple-choice, multi-answer MCQ, numeric, working-shown, graph, source-analysis, short-answer, extended-answer, six-mark, essay.
- Every question is topic-labelled, so mastery aggregates roll up naturally.
- Per-question fields include mark scheme, working steps (Dr Frost-style), image + alt text, exam-year provenance, simple + detailed explanations, and misconception tags.
- **Poem annotations** for English Literature — per-user notes, highlights, guide-step walkthroughs, and mindmap saves, all persisted as JSON on a per-user TopicAnnotation model.
- **Lesson stages** — multi-stage teacher-style walkthroughs of a topic before the questions.
- **Lesson checkpoints** — mid-lesson comprehension checks that gate progress.
- **Diagram library** — 30+ inline SVGs (leaf cross-section, animal cell, mitosis, right triangle, series/parallel circuits, atom + electron shells, ionic bonding, human eye/heart, DNA, digestive system, Punnett square, reflex arc, alveoli, covalent water, electrolysis, EM spectrum, velocity-time, linear/quadratic graphs, probability tree, mitochondrion, chloroplast, bacterial cell, neuron, synapse, photosynthesis, and more).
- **Immutable topic revisions** — every save writes a snapshot for full audit history.
Sessions and question surface
- Focus-mode sidebar that collapses navigation on `/session/` pages.
- Wide progress bar with subject-transition markers between different-subject blocks.
- Clickable progress-bar dots so students can jump to a prior question.
- Full keyboard shortcuts: `1`-`9` (option pick), `N` / `Enter` (next), `R` (report), `E` (explain), `?` (info modal), arrow keys.
- MCQ tap microinteraction — green pulse for correct, red pulse for wrong.
- Bookmark toggle on every question.
- Report question modal (typo, wrong answer, ambiguous, offensive, other).
- Injected similar questions after a wrong answer.
- Hint button (reduced mastery target).
- Explain button (records as wrong; reveals detailed explanation in the notes drawer).
- Answer exclusions (misclick, lucky guess, not-in-syllabus, unfamiliar) that reverse the mastery and SRS state.
- Sound effects and confetti celebrations, both toggleable in Settings.
Exam papers
- **Templates-only** — every exam paper is drawn from staff-published ExamTemplates. No AI at request time; the "start exam paper" button never generates a new paper on the fly.
- **Weakness paper** — compiled from parts spanning every published template for the subject, weighted by per-topic accuracy, grouped so each major question targets one weak topic.
- **Calculator / non-calculator popup** on start for Maths.
- **Notes drawer disabled** in exams so the practice matches the real thing.
- **Mock exam mode** (strict) — hides topic labels, disables bookmark/report icons, timer forced visible, page-leave warning.
- **Standard-time sentinel** resolves to the template's `real_exam_minutes` or the subject default.
- **Split-screen review** — student's paper on the left, mark scheme + AI marker feedback on the right, with the full-mark exemplar answer always shown per part.
Gamification
- **XP curve** — 50 levels, plateau of 100k XP/level past level 20.
- **Streaks** — pace-adjusted daily quota, auto-consume streak freezes on gap days.
- **Streak freezes** — earned every 7 streak days, capped at 3 in inventory.
- **Daily quests** — 3 tiers (quick, medium, hard) across 8 families (answer, correct, breadth, sessions, combo, reviews, mistakes, accuracy).
- **60+ achievements** across starter / bronze / silver / gold / platinum / diamond tiers, with a claim system separating unlocked from claimed.
- **Combo multipliers** on correct answers (1.25× at 3-streak, 1.5× at 5, 2.0× at 10).
- **Celebration queue** — session-stored, drained on next render, fires confetti + sound for level-ups, quests done, streak milestones, badge unlocks.
- **Leaderboards** with auto-generated class codes for opt-in class-based ranking.
- **Share tokens** for read-only parent/tutor URLs.
Aesthetics
- Brand green pairing — bright `#70fa7c` for light mode, darker `#10ad22` for dark mode. Green reserved for correctness signals; slate/glass/brand-blue used elsewhere.
- Aurora hero backgrounds with radial-gradient blobs.
- Glass cards with backdrop blur (Raycast/Arc/visionOS-inspired).
- Fredoka 700 wordmark for the "Gist" logo; Inter for body copy.
- KaTeX for inline and block math rendering.
- Dark, "mid", and light themes with pre-Tailwind inline script to avoid flash of unstyled content.
- Mobile bottom-nav pill with backdrop blur, matching the desktop pill's grey/near-black recipe.
- Sidebar collapsible to a 4rem icon-only rail.
- Reduced-motion respect on all pulse animations.
Progress and calendar
- Month-grid revision timetable with auto-suggested topics per day.
- Topic pinning per day, rest days, per-day notes.
- Upcoming exam key-dates panel with per-exam countdown chips.
- Subject-progress accordion with per-topic mastery cells.
- Forgetting-curve chart with pinnable topics (up to 8).
- Time-in-sessions counter aggregating active minutes.
- Roll-forward after a holiday pause distributes overdue reviews across the next 7 days.
Notifications and email
- Weekly summary composer writes a per-user markdown digest.
- Review reminder push notifications dispatch daily.
- Web Push via VAPID-signed `pywebpush`.
- Password reset via Django's built-in flow.
Accounts and authentication
- Username/password with strong validators (min 10 chars, ≥3 character classes, common-password check).
- Google + Microsoft OAuth via django-allauth (silent link on email match).
- Under-13 parental consent flow (COPPA / UK GDPR Article 8).
- Auto year-group advancement on 1 September each academic year.
- Observer mode for parents/teachers with whitelist-based routing to the teacher dashboard.
- Demo mode with a seeded user and write-blocking middleware.
- Referral system with 8-char URL-safe codes.
- Profanity blocklist on display names and leaderboard names.
Security and privacy
- CSP headers enforced plus a stricter report-only policy with a `/csp-report/` endpoint.
- Permissions-Policy header denies camera, microphone, geolocation, payment, USB, sensors, autoplay.
- Cross-origin isolation (COOP + CORP set to same-origin).
- CSRF on every write endpoint.
- HSTS with 1-year max-age, preload, and subdomains.
- Admin login POST throttle (10 attempts / 5 min per IP).
- File upload caps (5 MiB per file, 5 MiB per request).
- Prompt-injection defence on all AI inputs.
- Sentry optional error tracking with PII scrubbed.
- GDPR Article 15/20 data export and Article 17 account delete flows.
- Auth audit log with rotating file handler.
- DMCA takedown intake with honeypot and rate-limit.
- Content moderation queues for question reports, feedback, and user-generated content (decks, display names).
Infrastructure
- Django 5.1 with PostgreSQL in production, SQLite in dev.
- Whitenoise for static file serving with compressed manifest storage.
- Gunicorn (2 workers × 2 threads) on Render or PythonAnywhere.
- dj-database-url for connection-string configuration.
- Sentry optional via `DJANGO_SENTRY_DSN`.
- LocMem cache backend with 5-minute default TTL.
- Rotating file logs (spec.log 5 MB × 3, audit.log 2 MB × 10).
- Nightly database backup command (SQLite online-backup or pg_dump).
- Web manifest, service worker, and per-platform PWA install instructions.
- Stale-while-revalidate service worker caches the shell + static assets; never caches admin, staff, session, or AI endpoints.
Contact and licensing
Gist is a private project. For content questions or a takedown notice see the `/legal/` pages on the running site.