Inspiration
Millions of children generate learning profiles daily on platforms like Khan Academy and Duolingo. These systems promise personalisation but operate as surveillance engines: utilizing student data which is centralised, monetisable, and vulnerable to breach. Classroom feedback remains delayed, and while AI now makes content abundant, the real scarcity is intelligence knowing which question to ask next, how to reframe an explanation, and when a learner truly learns.
Can adaptive tutoring exist without EdTech companies selling students data to the highest bidder? Can a child learn with an AI that adapts in real time, yet never transmits a raw data point to the cloud?
What it does
MindVault is an open‑source, privacy‑first adaptive tutor that operates entirely on the student's device.
- On‑device AI tutor – A quantised Phi-3-mini LLM runs locally via WebLLM (WebGPU). It generates novel questions, classifies error types (conceptual gap, careless mistake, notation confusion), and rewrites explanations with different analogies—zero network traffic during a session.
- Pedagogy engine – A pure TypeScript module implements spaced repetition (SM‑2), mastery gating, and adaptive scaffolding. It schedules reviews for long‑term retention, selects worked examples based on error type and attempt count, and prevents advancement until a topic is genuinely mastered across multiple spaced sessions.
- Privacy boundary – Raw session data never leaves the device. Only two outbound flows exist: aggregated gradient updates for federated learning (no recoverable individual data) and quantum‑resistant signed attestations minted as UTXOs on the Abelian chain when mastery is achieved.
- Lightway tunnel – All outbound traffic is routed through a Lightway DTLS 1.2 tunnel built on ExpressVPN's
libhelium. ISP, school Wi‑Fi, or hostile hotspots see only encrypted, fixed‑size packets—indistinguishable from ordinary HTTPS. - Abelian credentials – Mastery achievements are minted as UTXO outputs on QDay/Abelian, signed with a lattice‑based key (CRYSTALS‑Dilithium). The student owns these credentials via a wallet derived from a standard BIP‑39 seed phrase (KMAC256 for quantum‑resistant account). Verification is on‑chain, platform‑independent.
https://explorer.pqabelian.io/block/484560
How we built it
The system is a TypeScript monorepo managed with Turborepo, structured into three workspaces:
frontend/ # Next.js 15 + Tailwind CSS + shadcn/ui + Zustand + Recharts
backend/ # Fastify (Node.js 22) + N-API Lightway binding + Abelian SDK
infra/ # Docker Compose: Ollama, federated server (Python/FastAPI), Lightway daemon
packages/ # Shared: mastery engine, LLM client, Abelian UTXO builder, Zod schemas
- Frontend: Next.js 15 app with Tailwind CSS, shadcn/ui, Zustand for state, and Recharts for dashboards. WebLLM runs the model in‑browser; a privacy panel uses PerformanceObserver to show live network activity.
- Backend: Lightweight Fastify server handling dev LLM proxying, gradient ingestion, and Abelian credential minting. Integrates with
libheliumvia a custom N‑API binding, routing all outbound traffic through Lightway. - Infra: Docker Compose orchestrates five services: frontend, backend, Ollama (dev), federated aggregator (Python + FastAPI), and the Lightway daemon. The Lightway binding is a C addon registering
he_outside_write_cbandhe_inside_write_cbto bridge the tunnel into Node.js streams. - Shared packages: Pure TypeScript modules for SM‑2 scheduling, error classification, scaffolding logic, LLM abstraction (WebLLM/Ollama), Abelian UTXO construction, and Zod‑validated API contracts.
Challenges we ran into
Lightway‑core integration
libheliumfrom ExpressVPN is a callback‑driven state machine with no sockets; . Wiring its callbacks into Node.js required a custom N‑API addon and careful event‑loop management. We succeeded after multiple iterations.WebLLM cold start
Loading a 3.8B parameter model takes ~30 seconds initially. We mitigated by pre‑warming in the background and showing a progress indicator; for the demo we preloaded the model before judging.Abelian UTXO model
Unlike Ethereum’s account model, Abelian requires constructing UTXO transactions and managing wallet state. We had to shift fromcontract.mint()thinking to spending and creating outputs.Pedagogical correctness
Implementing SM‑2 and designing scaffolding rules required deep learning‑science research (Sweller, Kalyuga, Wozniak). We iterated with mock data to ensure genuine spaced repetition and the expertise reversal effect.Making privacy visible
We needed a demo moment that non‑technical judges could grasp instantly. The split‑screen with live PerformanceObserver telemetry—showing zero outbound requests during learning—solved this.
Accomplishments that we're proud of
- Raw student data physically cannot leave the device. The privacy boundary is structural, not a policy.
- Phi‑3‑mini runs smoothly in‑browser, handling real‑time question generation, error classification, and explanation rewriting.
- A production‑grade N‑API binding for
libheliumnow protects all outbound flows from network surveillance. - We minted a signed attestation on QDay testnet, with the credential owned by a wallet derived from a standard seed phrase—true user ownership, quantum‑resistant.
- MindVault addresses all three tracks in a coherent, non‑bolted story:
ExpressVPN (privacy‑first, explainable to parents),
RevisionDojo (pedagogy, spaced repetition, mastery),
Abelian (on‑chain quantum‑resistant credentials).
What we learned
- Privacy is architectural: You cannot bolt privacy onto a centralised system. On‑device processing and minimal, aggregated outbound data make privacy structural.
- On‑device LLMs are ready: With WebGPU and quantised models, capable language models in the browser are feasible today.
- UTXO chains enable true ownership: Credentials as UTXOs are owned outright; spending them requires the user’s private key—ideal for portable, platform‑independent records.
- Lightway is a robust privacy layer: Its callback model, strong encryption, and traffic‑analysis resistance are production‑grade.
- Pedagogy matters: Spaced repetition and adaptive scaffolding are what separate a real tutor from a chatbot. Investing in learning science pays off.
What's next for MindVault
- Expand subject coverage beyond mathematics to science and languages.
- Add differential privacy and secure aggregation to federated learning.
- Integrate with school SSO and LMS; credentials issued directly to student wallets.
- Port to mobile (React Native with WebLLM or TFLite).
- Enhance parent dashboard with zero‑knowledge proofs to show progress without exposing mistake patterns.
- Open‑source the full monorepo under a permissive license to encourage community building.
Built With
- abelian
- docker
- expressvpn
- fastapi
- fastify
- nextjs
- node.js
- ollama
- python
- revisiondojo
- typescript
- webllm

Log in or sign up for Devpost to join the conversation.