Inspiration
Every student knows this feeling: you have ten pages of notes before an exam, and turning them into something you can actually study from — a short summary, a practice quiz, flashcards — takes hours of manual work. The AI tools that do this all ask for the same things: make an account, get an API key, pay a subscription, and send your notes to somebody else's server.
I wanted a study buddy without any of that. Something a student can open, paste their notes into, and learn from — free forever, no sign-up, no API key, and with their notes never leaving their own device. That is why StudySage runs its AI entirely in the browser.
What it does
StudySage is a study buddy that runs entirely in the browser. Paste your notes and, in one click, it gives you four things:
A summary — a short, faithful summary of your notes, written by a real transformer model running on your own device. A quiz — multiple-choice and fill-in-the-blank questions generated from your notes, with instant right/wrong feedback and a score. Flashcards — flip cards built from the key terms in your notes, with shuffle and navigation. Ask your notes — ask a question in plain words and get the answer found inside your own text, with the source sentence shown and a confidence score. It never invents facts from outside your notes. There is no sign-up, no API key, no server, and no cost. Your notes never leave the page. After the first load, the app works offline. Three built-in samples are included — Photosynthesis, Python Functions, and the French Revolution — so anyone can try it in seconds without typing anything.
How we built it
Two real transformer models run on-device with Transformers.js (ONNX Runtime Web):
Summarisation: Xenova/distilbart-cnn-6-6 Question answering: Xenova/distilbert-base-uncased-distilled-squad The models download once from Hugging Face Hub (about 480 MB) and are then cached in the browser. The quiz and flashcards are built by an on-device NLP pipeline written for this project: it extracts key terms (including two-word terms), finds definition sentences, and builds questions and cards from them.
The app itself is plain HTML, CSS and JavaScript — no framework, no build step — and the Transformers.js library is bundled with the project so it does not depend on any CDN. The code was written with the help of Muse, an AI coding assistant.
AI disclosure: the summariser and question answerer are pre-trained models by Xenova (Hugging Face). The quiz/flashcard pipeline, the UI and the app logic are original code written for this hackathon. No part of the project existed before this hackathon.
Challenges we ran into
The AI library would not load. The app first loaded Transformers.js from a CDN, and the CDN failed in the test environment, so the whole app never started. The fix was to bundle the library and its files locally with the project — now the app has no CDN dependency at all. The summary was too slow. The first version took about 70 seconds to summarise a short paragraph. Switching the model to greedy decoding cut that to about 12 seconds with the same quality. Good quiz questions are hard. Picking the terms that matter, finding believable wrong answers, and splitting long notes into short questions took several rounds of testing. Verifying on-device AI properly. A page loading is not proof the AI works, so everything was tested in a real browser: summary quality, quiz scoring, flashcard flipping and question answering were all checked end to end before submission.
Accomplishments that we're proud of
Real AI running fully on-device — no server, no API key, no account, no cost. Every feature verified working in a real browser, with real answers (for example, it correctly answers "Where does photosynthesis take place?" from the notes). The app works offline after the first load, and the whole project is open on GitHub for anyone to try.
What we learned
How transformer models actually run in a browser: ONNX, WebAssembly, and why the first load downloads model files while later loads are instant from cache. How to make a model fast enough to be usable: greedy decoding cut summary time from about 70 seconds to about 12 seconds. How to build a quiz generator from raw text: finding the terms that matter, picking good distractors, and keeping questions short. How to verify a web app properly: automated browser tests that click through every feature and check the real output, not just that the page loads. That the hardest part of on-device AI is not the model — it is the plumbing: CDNs, certificates, proxies and caches all have to work before the model can.
What's next for StudySage
More question types: true/false and short-answer questions with AI grading. Spaced repetition: remember which flashcards you get wrong and show them more often. Support for longer documents and uploading .txt/.pdf notes. A streak and daily-goal system so studying becomes a habit.
Built With
- css
- html
- hugging-face
- javascript
- node.js
- onnx-runtime-web
- transformers.js