Offline-first Android mental math practice app with adaptive problem generation, local analytics, and zero-network privacy.
ZenMath runs completely offline on Android. You practice arithmetic, algebra, fractions, percentages, decimals, and powers without accounts, telemetry, or internet access. Every session, streak, XP calculation, and chart lives in a local Isar database on your device.
Train across Addition, Subtraction, Multiplication, Division, Fractions, Percentages, Decimals, Algebra, Powers, and Mixed drills. Algebra covers seven distinct linear forms (x + a = b, x - a = b, a - x = b, ax = b, ax + b = c, ax - b = c, and (x + a) / b = c), while arithmetic generators include operand-specific hints such as complements to 100, compensation, and distributive splits.
QuestionSessionEngine tracks every expression generated within a run so sessions stay varied and balanced:
- Zero Duplicate or Mirrored Prompts: Filters identical expressions and commutative pairs (
a + bandb + a,a x bandb x a). - Answer-Diversity Guard: Prevents consecutive identical answers, caps each answer to once per session in runs up to 15 questions, and enforces a minimum 6-question gap in longer timed runs.
- Progressive Session Curve: Structures drills into a 20% warm-up, 60% core mental-math patterns, and 20% stretch problems.
- Live Adaptive Modulation: Three consecutive fast correct answers step the active tier up (
easy -> medium -> hard), and two consecutive misses step it down without falling back to trivial+ 0orx 1expressions.
XpCalculator serves as a single pure-Dart engine shared by persistence and the results summary so displayed XP matches stored XP:
- Difficulty & Topic Multipliers: Scales base XP by difficulty (
1.0xeasy,1.5xmedium,2.2xhard) and topic weight (1.0xbasic arithmetic up to1.25xAlgebra). - Accuracy, Streak & Pace Bonuses: Rewards
>= 80%accuracy (+15%),100%accuracy (+30%), in-session streaks (>= 3), fast pacing, and first-of-day Daily Challenge completion (+50 XP). - Anti-Spam Floor: Zero correct answers award
0 XP, and sessions under 3 questions exclude bonus multipliers. - Non-Linear Level Curve: Each level requires
500 * level + 150 * (level - 1)^2XP (500for Level 1,1150for Level 2,2100for Level 3).
- Three Modes: Standard configurable drills, 60-second Timed Sprints, and deterministic date-seeded Daily Challenges.
- Tactile Practice Arena: Custom zero-shadow numpad, optional auto-advance on correct answers, haptic feedback, and pause controls.
- Progress Tracking: 28-day activity heatmap, 7-day / 30-day / all-time
fl_chartaccuracy trends, topic mastery bars, and date-grouped session history. - Warm Editorial Ink UI: Bundled static TTF typefaces (
Newsreader,Plus Jakarta Sans,JetBrains Mono) with light warm-paper (#FAF9F5) and dark charcoal (#141413) themes.
ZenMath requests no network permissions and bundles all fonts, icons, and question engines inside the APK. Local state persists through:
- Isar (
3.1.0+1): TypedSessionScore,DailyProgress, andTopicStatscollections updated atomically per completed session. - SharedPreferences: User preferences (theme, default difficulty, question count, daily goal, haptics, reduced motion, auto-advance).
zenmath/
├── assets/
│ ├── fonts/ # Bundled Newsreader, Plus Jakarta Sans, JetBrains Mono TTFs
│ └── icon/ # App launcher artwork
├── docs/
│ ├── ARCHITECTURE.md # Engine internals, Isar schemas, and provider graph
│ ├── DESIGN_SYSTEM.md # Warm Editorial Ink color tokens, typography, and motion rules
│ └── ROADMAP.md # Shipped milestones and planned work
├── lib/
│ ├── core/ # QuestionSessionEngine, XpCalculator, theme tokens, custom widgets
│ ├── data/ # Isar service and collection models
│ ├── features/ # Play, Practice, Results, History, Stats, Settings, Splash
│ ├── providers/ # Riverpod state and query providers
│ └── main.dart # App entrypoint and GoRouter routes
├── test/ # Question engine, XP calculator, and widget test suites
├── tool/ # Launcher icon generation utility
└── .github/workflows/ # Automated build_runner, flutter test, and APK release pipeline
For technical implementation details, read docs/ARCHITECTURE.md and docs/DESIGN_SYSTEM.md.
- Open the latest GitHub Release.
- Download
app-release.apk(android-arm64) and install it on your Android device.
GitHub Actions builds every push to main through .github/workflows/build-release.yml (running flutter pub get, dart run build_runner build, flutter test --no-pub, and signed arm64 APK compilation).
# Monitor the latest CI build
gh run list -L 1
gh run watch <run_id> --exit-status
# Download the latest release APK and install over USB debugging
./update_app.shIf an existing local build uses a different signing key (INSTALL_FAILED_UPDATE_INCOMPATIBLE), uninstall first and re-run the installer:
adb uninstall com.akashiverse.zenmath
./update_app.shTo build locally with Flutter 3.44.0:
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter test --no-pub
flutter build apk --release --target-platform android-arm64Copyright (c) Akashiverse. Built for focused offline math training on Android.