StudySaathi: A Local Gemma Study Buddy with Flashcards, Quizzes and Dark Mode
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
StudySaathi ("study companion") is a local-first AI study buddy. You paste in your class notes, pick how you want to study, and it turns them into something easier to learn from:
- βΌ Explain it turns notes into a beginner-friendly explanation, split into clear cards (summary, key ideas, example, key terms, recap).
- ? Quiz me creates a 5-question multiple-choice quiz. You answer one question at a time and get instant right/wrong feedback with a short explanation, then a final score.
- β€ Flashcards creates flip cards for quick revision. You mark each card "Got it" or "Still learning", shuffle the deck, and review only the ones you missed.
I built it for a friend who finds studying stressful. Big textbook chapters feel overwhelming, so I wanted a tool that breaks notes into small, calm steps he can go through at his own pace, without pressure and without needing an account or an internet connection to an AI service.
Demo
I haven't deployed it, because it runs on your own computer with Ollama. Here is what it looks like, using Biology notes on photosynthesis:
The app also has a light/dark mode toggle in the top bar.
Testing
I tested all three modes myself with Biology notes on photosynthesis, and the testing shaped the app:
-
Small models don't always follow the format.
gemma3:1bsometimes added stray labels like "Flashcard 5" to answers, or laid out quizzes differently each time. I made the parsers tolerant of those variations, and if a response still can't be read, the app shows it as plain text instead of breaking. - Interactive beats a wall of text. My first version dumped raw text into the result panel. Turning it into flip cards, a one-question-at-a-time quiz and sectioned explanations made it feel much less overwhelming, which was the whole point.
Code
StudySaathi π
StudySaathi is a local-first AI study buddy built with Flask, Ollama, and Gemma. Paste your class notes and choose how you want to study: get a simpler explanation, generate a practice quiz, or create revision flashcards.
It was built for the Hacktoberfest Weekend Challenge: Build for a Friend β the idea is to make studying feel a little less stressful and help a friend revise at their own pace.
Demo
Screenshot of StudySaathi generating a practice quiz from Biology notes about photosynthesis:
Screenshot of StudySaathi generating a Explanation from Biology notes about photosynthesis:
Screenshot of StudySaathi generating a flashcard from Biology notes about photosynthesis:
Features
- Explain it: turn notes into a beginner-friendly explanation.
- Quiz me: generate five multiple-choice questions, with answers and explanations.
- Flashcards: create quick revision cards from notes.
- Responsive interface for desktop and smaller screens.
- Local inference through Ollama and Gemma; the core study workflow doesβ¦
How I Built It
-
Model: Google's open-weight Gemma (
gemma3:1bby default), run locally through Ollama. -
Backend: a small Flask app with one endpoint,
/api/study. It takes the notes and a mode, wraps them in a task-specific prompt (explain, quiz or flashcards), and sends it to Ollama running on the same machine. - Frontend: plain HTML, CSS and JavaScript, with no framework.
-
Turning text into an interface: the model returns plain text, so the frontend parses it into the interactive views above. Flashcards use a strict
FRONT:/BACK:format, and the quiz and explanation parsers handle the different layouts small models produce. If a response doesn't match the expected format, the app shows it as plain text instead of breaking. -
Configurable: you can switch to any model you have installed in Ollama by setting the
OLLAMA_MODELenvironment variable.
Why Does Open Innovation Matter?
A study tool is only useful to the people who can actually use it, and many students can't pay for API subscriptions or don't want to send their notes to a third party. Open-weight models made a different design possible:
- Privacy: notes go from Flask to Ollama on the same computer, not to a hosted AI API.
- No cost or keys: there is no usage bill and no API key to manage, so the app stays free for anyone to run.
- Control: I could choose and swap the model, tune the prompts, and build the app around what the model can do.
A closed API would have meant ongoing costs and sending a student's notes elsewhere, which is the wrong trade-off for something meant to make studying feel safe and low-pressure.
Prize Categories
Best Use of Gemma: StudySaathi runs on Google's open-weight Gemma model (gemma3:1b), served locally through Ollama. All three study modes (explanations, quizzes and flashcards) are generated by Gemma, and the app is built around turning its text output into interactive study views.






Top comments (0)