Hackathon submission · May 2026

Beacon

An offline AI classroom that runs on a single laptop.

Demo

Kaggle Gemma 4 Good Hackathon submission — walkthrough of the offline classroom running locally on Ollama.

The Idea

Beacon is built around a specific gap: students who can reach some computing device — a five-year-old laptop, a school’s shared machine, a parent’s old phone — but who don’t have reliable internet, don’t have a teacher in their building, and don’t have a monthly budget for a tutoring subscription. The default AI tutoring stack assumes none of those things. It assumes always-on connectivity, paid API access, and willingness to ship every keystroke a child writes to a remote server.

Beacon’s claim is the inverse: a single old laptop, plus Ollama, plus Beacon, is a complete classroom. No subscription, no account, no telemetry. If you turn off your wifi, Beacon still works.

The harder design question, though, isn’t connectivity — it’s structure. A chatbot is the wrong primitive for a student who doesn’t know what to ask. Beacon is curriculum-first: a student opens it and sees a personalized home with their own progress, not a blank input box. They pick a unit, work through a guided lesson, practice with model-graded questions, and over time the system builds a portrait of who they are as a learner — not “78% mastery on linear equations,” but something closer to “you’re a hands-on learner who slows down and gets dramatically more accurate, but your instinct under pressure is to speed up and guess.”

Built with rural and low-resource classrooms in mind, anywhere from western China to the rural U.S.

The Approach

The core architectural choice is to treat the model as an agent inside a structured learning loop, rather than as the loop itself. Five stages, each with its own AI behavior:

  • Lesson — streaming chat, guided dialogue with small steps and check-ins.
  • Practice — structured tool calls (generate_quiz, grade_answer), questions matched to the student’s current mastery and recent error patterns.
  • Grade — structured output, judgment-then-explanation, never silently advancing.
  • Review — spaced re-prompting from the wrong-answer bank.
  • Progress — analytical synthesis using the model’s reasoning as a viewable artifact, not a black-box score.

Each stage has its own system prompt with a locked structure contract: role definition, current task, student profile context, output structure, language instruction, tool permissions, and teaching constraints. The model is the same model in all five places — what changes is the prompt structure and which tools the model is allowed to call.

The model is the agent inside the learning loop, not the loop itself.

Implementation

  • Next.js 14 (App Router, TypeScript) and Tailwind CSS for the front end.
  • KaTeX for math rendering, packaged locally — no CDN dependency.
  • Ollama for local model serving, addressed at localhost:11434.
  • Gemma 4 E2B as the model (~2B effective parameters, validated on M4 16GB; E4B was tested but exceeded the 10-second latency threshold).
  • localStorage for student profile persistence — topics, answer history, wrong-answer bank, session logs — no database required for v1.

The model is invoked through native function calling for anything where structure matters (quiz generation, grading) and through streaming chat for anything where conversational flow matters (lesson delivery). All AI output passes through LaTeX detection and safe rendering, with plain-text fallback if the model emits unparseable LaTeX. The dashboard surfaces the model’s thinking-mode reasoning as part of the student’s progress portrait — the analytical reasoning is itself the artifact, not just an opaque score.

Privacy is structural rather than promised. There is no analytics SDK, no telemetry endpoint, no remote model. Profile data lives in browser localStorage on the student’s device. The model lives on disk via Ollama. There’s nothing to opt out of because there’s nowhere for data to go.

Status

Active development for the Kaggle Gemma 4 Good Hackathon (Future of Education and Ollama Special Technology Prize tracks), submission deadline May 18, 2026.

Beacon is designed as a multi-subject classroom; in this build, the Math curriculum is the first subject built out in depth, and the other subjects are scaffolded as placeholders that will be filled in once the math seam is fully demoed.

Live: home page with personal progress, the Math subject view with mastery and memory-strength panels, Learn (streaming Ollama lessons), Practice (model-generated and model-graded questions). Building: the Quiz module (topic-end check), Review (spaced re-prompting from the wrong-answer bank), and the Dashboard / AI Portrait centerpiece.

Links

Demo video (YouTube) No public deploy — runs locally against Ollama.