DEV Community

Cover image for Recap Buddy: An Open-Source Study Buddy Where Gemma 4 Checks What You Teach
Tejas Nalawade
Tejas Nalawade

Posted on

Recap Buddy: An Open-Source Study Buddy Where Gemma 4 Checks What You Teach

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

Recap Buddy home screen

What I Built

Recap Buddy is a free, open-source study companion built around the Feynman technique: if you can explain something simply, you understand it.

A student picks a topic and explains it out loud, the way they would teach a friend. The browser transcribes them live. An open-weight Gemma 4 model then reviews the explanation, judging concepts only (never grammar, accent or filler words), and sorts every idea into four categories:

Category What the student gets
Got it right Concepts explained correctly
Almost there The right idea, stated imprecisely, with the fix
Needs fixing What they said, struck through, with the correct version
You skipped Important concepts they never mentioned, and why each matters

Each review comes with a score out of 100 and one concrete thing to revise next. Students can upload their own notes (PDF, DOCX or TXT), and Recap Buddy grades them against those notes instead of general textbook knowledge.

At the end of the day, one click turns every topic into a first-person Learning Diary: a score table, what went well, what was mixed up, and the top three priorities for tomorrow, downloadable as Markdown.

The problem

Teaching a topic back is one of the most effective ways to learn, but students run into two obstacles:

  1. There is nobody to explain it to. Friends and family rarely have the time or the subject knowledge.
  2. Even a willing listener cannot grade it. They cannot say what was correct, what was wrong, and, most importantly, what was skipped entirely. Those blind spots are exactly what cost marks in an exam.

Recap Buddy is a patient listener that can grade.

Who it is for

  • School and university students revising several topics a day for boards, entrance exams or semester finals.
  • Self-learners and job seekers practising how to explain "how a TCP handshake works" or "what a B-tree is" before an interview.
  • Teachers, study groups and student clubs who want a teach-back tool they can run themselves, point at their own notes, and adapt to their syllabus.

Because everything is open source and can run on open-weight models locally, any student with a laptop can use it, and any school or club can host its own copy.

Demo

Video walkthrough

Live app: recapbuddy.vercel.app
MLH project page: Recap Buddy at Hacktoberfest Hack Day Pune x ACES

Full walkthrough: teaching "Open Source"

This recording is from the live site. I chose the topic Open Source and planted two common misconceptions in my explanation: that open-source code "has no copyright" and that it "can never be sold commercially".

Recording of the full flow: choosing the topic Open Source, typing the explanation, getting the review, and generating the learning diary

What Gemma 4 returned:

Category Result
Score 45 / 100
Got it right The definition of open source, the role of licences like MIT and GPL, and the fork-and-pull-request workflow on GitHub
Needs fixing "No copyright": open-source code is still protected by copyright, and the licence is what grants permission. "Can never be sold": open-source software can be sold, and many companies build commercial products on it
You skipped Copyleft, and the difference between permissive and copyleft licences
Revise next The difference between permissive and copyleft licences

Both planted mistakes were caught, nothing correct was marked wrong, and the gaps it found are the ones a teacher would point out. The diary then summarised the day across every topic, with a score table and three priorities for tomorrow.

A second example: Photosynthesis

Here I reversed the gas exchange ("plants take in oxygen and release carbon dioxide") and never mentioned the Calvin cycle.

The score, summary, and what was right or nearly right:

Review card with a score, a summary, and the Got it right and Almost there categories

The corrections: the reversed gas exchange is struck through in red pen with the correct version written underneath, and the missed concepts appear as sticky notes, followed by a "Revise next" action that Buddy can read aloud.

Wrong answer corrected in red pen, missed concepts as sticky notes, and a Revise next panel

The interface is designed like a school notebook: graph paper, ballpoint ink, green ticks, highlighter for "almost there", red pen for mistakes and sticky notes for gaps. A mascot, Buddy, nods while the student talks, moves its mouth with the real microphone level, and reacts to the score.

Code

Recap Buddy

Recap Buddy

Teach it out loud. Buddy checks it.

An open-source study companion that listens while you explain a topic, then uses an open-weight AI model to show what you got right, what was close, what was wrong and what you missed. At the end of the day it writes up everything you learned as a diary page.

License: MIT Gemma 4 DigitalOcean React FastAPI Hacktoberfest 2026

Live demo · Demo video · Agent Skill · Report a bug

Recap Buddy home screen: Buddy the mascot asks what you learned today, next to a topic picker and today's notebook sidebar

Contents

Why Recap Buddy

Many students learn best by teaching a concept out loud (the Feynman technique). Others revise four or five topics a day and struggle to recap them by evening. Both run into the same problem:

  • There's nobody to explain the topic to.
  • Even when someone listens, they…

The project is MIT licensed and runs locally with two commands:

# Backend (FastAPI)
cd backend && python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt && cp .env.example .env
uvicorn main:app --reload --port 8000

# Frontend (React + Vite)
cd frontend && npm install && npm run dev   # http://localhost:5173
Enter fullscreen mode Exit fullscreen mode

How I Built It

Architecture

Browser (React + Vite)               FastAPI backend               Open-weight models
--------------------------           -------------------           ----------------------------
Web Speech API transcript  ------->  POST /api/review   ------->   Gemma 4 (primary)
PDF / DOCX / TXT notes     ------->  POST /api/extract               | on error or invalid JSON
Sessions in localStorage             POST /api/report   ------->   Fallback open-weight model
Enter fullscreen mode Exit fullscreen mode

Frontend. React and Vite, Tailwind CSS, Motion for animation and react-markdown for the diary. Speech recognition uses the browser's Web Speech API in continuous mode with interim results, restarting automatically after pauses until the student presses Stop. Typing is always available as a fallback. There are no accounts and no database: the day's sessions live in localStorage.

Backend. FastAPI and Pydantic, with pypdf and python-docx for extracting notes. Every model provider exposes an OpenAI-compatible API, so a single client covers cloud and local inference:

PROVIDERS = {
    "digitalocean": {"base_url": "https://inference.do-ai.run/v1/",
                     "model": "gemma-4-31B-it", "fallback_model": "openai-gpt-oss-120b"},
    "gemini":       {"base_url": "https://generativelanguage.googleapis.com/v1beta/openai/",
                     "model": "gemma-4-26b-a4b-it", "fallback_model": "gemma-4-31b-it"},
    "lmstudio":     {"model": "google/gemma-4-e4b"},   # runs fully offline
    "ollama":       {"model": "gemma4"},               # runs fully offline
}
Enter fullscreen mode Exit fullscreen mode

Switching between cloud inference and a laptop with no internet connection is a single environment variable, LLM_PROVIDER. The recordings above were made with Gemma 4 e4b running locally in LM Studio: a small open-weight model on ordinary hardware, doing the grading on its own.

Turning an LLM into a fair grader

Calling the model was the easy part. The real work was making it grade like a fair teacher. The system prompt enforces a small set of rules:

  • Concepts only. The input is speech-to-text, so grammar, filler words and transcription errors are ignored. If a word is garbled but the intended concept is clear, the intended concept is judged.
  • The student's notes are the source of truth when provided; otherwise, standard textbook knowledge.
  • Never invent mistakes the student did not make, and list at most five missed concepts so the feedback stays actionable.
  • Score = roughly 60% accuracy + 40% coverage, with partially correct ideas counted as half.
  • Strict JSON output at temperature 0.2.

The backend then validates everything rather than trusting the model:

  1. Gemma 4 reasons before answering, so <thought> blocks are stripped first.
  2. Code fences are removed, the outermost JSON object is extracted and validated with Pydantic, missing categories default to empty lists, and the score is clamped to 0 to 100.
  3. If anything fails (a network error or malformed JSON), the request is retried once on a second open-weight model. The user never sees a blank screen; errors appear as a banner with a Retry button.

The rubric as a reusable Agent Skill

The grading rubric is published as an Agent Skill in skills/recap-review/: a SKILL.md with step-by-step instructions, plus references/schema.md (the review JSON contract) and references/rubric.md (what counts as correct, partial, wrong and missed). Any skills-compatible agent can grade a learner's explanation the same way Recap Buddy does.

Why Does Open Innovation Matter?

1. It keeps learning free and accessible. A student who runs Recap Buddy with Ollama or LM Studio needs no API key, no account and no internet connection. The open-weight Gemma 4 model runs on their own laptop. That puts a patient, grading study partner in reach of every student, not just those who can pay for a subscription.

2. Student data stays with the student. A teach-back transcript is a record of what someone does not yet understand, which is sensitive, especially for minors. Run locally, the entire loop (notes, transcript, review and diary) never leaves the device. A school can run it on a single classroom machine and nothing leaves the building. A closed API cannot offer that.

3. Nobody is locked in. The model is an environment variable, not a hard dependency. The same Gemma weights run on DigitalOcean, Google AI Studio or local hardware, and if the primary model fails, the backend falls back to a different open-weight model automatically. Because the weights are open, the next step, fine-tuning a small Gemma on our own rubric, is possible too.

4. The grading is transparent and editable. The rubric is published as an open Agent Skill and the prompts are in the repository. Teachers can read exactly how students are evaluated, adapt it to their syllabus, and contribute improvements back. There is no black-box grading.

5. Anyone can build on it. The project is MIT licensed. Ideas on our roadmap that the community can pick up include in-browser Whisper for browsers without speech recognition, follow-up questions on the weakest area, and streaks across days.

How We Built It

Recap Buddy was built in a single afternoon at Hacktoberfest Hack Day Pune x ACES. We started with a product requirements document, converted it into a CLAUDE.md and a set of task-specific skills (backend, voice, frontend, deployment), and built the backend and frontend in parallel against a fixed JSON contract. Those planning files are in the repository for anyone who wants to see the process.

Prize Categories

  • Best Use of Gemma. Gemma 4 is the core of the product: it grades every explanation and writes every diary. It runs as Gemma 4 31B on DigitalOcean, Gemma 4 26B-A4B on Google AI Studio, and Gemma 4 e4b fully offline through Ollama or LM Studio, which powers the demo recordings above.
  • Best Use of DigitalOcean. Gemma 4 and gpt-oss-120b are served through DigitalOcean Serverless Inference, and the repository includes an App Platform spec (.do/app.yaml) for a one-app, two-component deployment.

Team: Tejas Nalawade (@tejassantoshnalawade) and Mohit Aher (GitHub: mohitbaher)

Top comments (0)