A fully equipped school that fits in a browser tab — no internet required, no cost, no data collected, ever.
OffLearn is an offline-first AI learning platform that runs entirely in your browser. It uses on-device AI models (MediaPipe, Transformers.js) so students can learn without an internet connection, without paying for API calls, and without sending any data to external servers.
- 100% Offline — Works without internet after initial load. Installable as a PWA.
- On-Device AI Tutor — Uses MediaPipe GenAI and Xenova/Transformers for local inference.
- Structured Curriculum — Math, Science, History, English, Economics, and Computer Science.
- Test Prep — SAT Reading, SAT Math, and ACT Math practice.
- RAG-Powered — Local vector search (Voy) over knowledge packs for grounded responses.
- Zero Data Collection — All data stays in IndexedDB on your device.
- Next.js 14 (Static Export)
- React 18 + TypeScript
- Tailwind CSS 3
- MediaPipe GenAI — on-device LLM inference
- Transformers.js — local embedding models
- Voy — in-browser vector search
- IndexedDB (via
idb) — local persistence - Zustand — state management
- Node.js 18+
- npm
npm installThe
postinstallscript automatically copies MediaPipe WASM files intopublic/mediapipe-wasm/.
npm run devOpen http://localhost:3000 in your browser.
npm run buildThis generates a static site in the out/ directory. Serve it with any static file server:
npx serve outnpm run lintOffLearn/
├── app/ # Next.js App Router (layout, page, styles)
├── components/ # React components
│ ├── layout/ # Sidebar, TutorPanel
│ └── views/ # LearnView, TestPrepView
├── lib/ # Core logic
│ ├── db/ # IndexedDB persistence
│ ├── inference/ # MediaPipe LLM, subject prompts
│ ├── rag/ # Vector store, chunk loader
│ └── store/ # Zustand app store
├── public/ # Static assets
│ ├── curriculum/ # Subject lesson JSON files
│ ├── testprep/ # SAT/ACT practice JSON files
│ ├── knowledge-packs/ # RAG knowledge pack JSON files
│ └── mediapipe-wasm/ # MediaPipe WASM (generated on install)
├── scripts/ # Build helpers
└── types/ # TypeScript type definitions