Skip to content

About

Brainforest — offline K-4 kids learning app for iOS and Android. 2,000+ lessons, a narrator that reads everything aloud, works with no internet at all. Live on the App Store and Google Play.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🌳 Brainforest

An offline learning adventure for K–4 kids. Quests, reading, and voiced lessons — all on-device, no ads, no accounts, no internet required.

Brainforest is a kids' learning app for iPhone, iPad and Android: a child answers narrated math, reading and science questions to climb a treehouse, and all progress stays on the device.

Download on the App Store Get it on Google Play

01. What ships. Numbers from the shipping app 2,039 activities across grades K–4. 726 "Did you know?" facts. 7 quest themes.

Also in the box: a parent dashboard, and a 60-day free trial followed by a one-time $1.99 unlock (no subscription).

Content lives in ios/web/content/.

02. Two platforms. This repo holds both, cleanly separated iOS. SwiftUI app. Live on the App Store. Version 1.4 (build 19). Android. WebView shell around the same lessons, voice pack bundled. Live on Google Play. Version 1.7 (versionCode 9).

iOS: the SwiftUI app, web content, art, and build tooling. Full source in ios/.

Status: ✅ Live on the App Store. Project version 1.4 (build 19).

Android: the Android port, a WebView shell around the same lessons, with a voice pack bundled. Source in android/.

Status: ✅ Live on Google Play. Project version 1.7 (versionCode 9).

03. What I built. Built by Matt Macosko Learning engine. Adaptive difficulty and per-skill mastery tracking. Content pipeline. Math generated by code; the rest written, then auto-checked. Tests. The real engine in Node: soak runs, garbage input, corrupted-save recovery.

Built by Matt Macosko. The main parts, each linked to its file:

  • Learning engine (ios/web/engine.js): adaptive difficulty and per-skill mastery tracking.
  • Game UI (ios/web/app.js, parent.html): quests, stickers, treasures, missed questions coming back for another try, trial and unlock screens, parent dashboard.
  • iOS shell (BrainforestApp.swift): WKWebView host with bridges for on-device storage, recorded narration, and StoreKit 2 purchases.
  • Android shell (MainActivity.kt): runs the same web app unchanged by mapping the iOS bridges onto Android, with Google Play Billing for the unlock.
  • Content pipeline (generate_content.py, judge_content.py, enrich_banks.py): math questions generated by code; reading, science and social questions written and then checked by Claude through the claude CLI (upstream).
  • Voice pack (build_voice_pack_kokoro.py, verify_voice_coverage.py): lists every line the app can speak, records it with the upstream Kokoro-82M model (older Piper builder also kept), and checks every line has a clip.
  • Tests (sim_engine.mjs, sim_torture.mjs): run the real engine in Node, including long soak runs, garbage input and corrupted-save recovery.

04. Running it. Tests, iOS and Android

  • Engine tests (Node only): node ios/tests/sim_engine.mjs and node ios/tests/sim_torture.mjs.
  • iOS: open ios/Brainforest.xcodeproj in Xcode (iOS 17+). The scheme uses ios/Brainforest.storekit for local purchase testing.
  • Android: cd android && ./gradlew assembleDebug (JDK 17, Android SDK 36). Release builds need your own android/keystore.properties, which is not committed.

05. Known limits and links. What to expect from a clean checkout

  • The iOS voice pack is not in the repo (ios/web/voice/ is gitignored). The app has no robot-voice fallback on purpose, so a fresh iOS build is silent until you generate the pack.
  • The voice tools expect the author's machine: they call a Python venv at ~/JaneOS/.venv, and the content scripts read from ~/Documents/Brainforest. They will not run as-is on a clean checkout.
  • This repo's Android voice pack is older than the shipping app. Running verify_voice_coverage.py against the pack committed here finds 1,374 of 7,175 spoken lines with no clip. The Google Play build (1.7) and the iOS build tree carry the full pack and pass the same check with every line covered.
  • Two copies of the web app: ios/web/ and android/app/src/main/assets/web/ are identical today, but there is no sync script in the repo.

Links

About

Brainforest — offline K-4 kids learning app for iOS and Android. 2,000+ lessons, a narrator that reads everything aloud, works with no internet at all. Live on the App Store and Google Play.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages