# shihabulsakib/zenmath_android architecture

> Architecture diagram of the GitHub repository shihabulsakib/zenmath_android, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shihabulsakib/zenmath_android
- Repository: https://github.com/shihabulsakib/zenmath_android

## Overview

ZenMath appears to be an Android math-practice app: users enter through the app UI, configure or start practice, answer generated questions, and view results or progress. The tree also shows history, revision, statistics, settings, persistence, and reminder subsystems. Source excerpts and README content were not provided, so relationships below are dashed and unverified; paths identify modules from the file tree, not inspected implementations.

Main entry points: [`app/src/main/java/com/example/ui/ZenMathViewModel.kt`](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/ZenMathViewModel.kt) (App ViewModel), [`app/src/main/java/com/example/ui/screens/MainMenuScreen.kt`](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/MainMenuScreen.kt) (Main Menu), [`app/src/main/java/com/example/domain/QuestionGenerator.kt`](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/QuestionGenerator.kt) (Question Generator), [`app/src/main/java/com/example/data/ZenMathDatabase.kt`](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathDatabase.kt) (App Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and UI"]
  node_activity["Main Activity<br/>[MainActivity.kt]"]
  node_app_ui["App Shell<br/>[ZenMathApp.kt]"]
  node_viewmodel["App ViewModel"]
  node_menu["Main Menu<br/>[MainMenuScreen.kt]"]
  node_setup["Game Setup<br/>[GameSetupScreen.kt]"]
  node_game["Game Screen<br/>[GameScreen.kt]"]
  node_results["Results Screen<br/>[ResultsScreen.kt]"]
  node_history["History Screen<br/>[HistoryScreen.kt]"]
  node_revision["Revision Screen<br/>[RevisionScreen.kt]"]
  node_stats["Stats Screen<br/>[StatsScreen.kt]"]
  node_settings["Settings Screen<br/>[SettingsScreen.kt]"]
  node_special["Special Menu"]
end

subgraph group_practice["Practice Domain"]
  node_generator["Question Generator"]
  node_fractions["Fractions Pool<br/>[FractionsPool.kt]"]
  node_models["Game Models<br/>[GameModels.kt]"]
end

subgraph group_progress["Progress and Storage"]
  node_repository["Game Repository"]
  node_dao["Data Access<br/>[ZenMathDao.kt]"]
  node_database[("App Database<br/>[ZenMathDatabase.kt]")]
  node_question_record["Question Records"]
  node_session["Session Records<br/>[SessionEntity.kt]"]
  node_preferences["Preferences"]
end

subgraph group_reminders["Reminders"]
  node_scheduler["Reminder Scheduler"]
  node_receiver["Reminder Receiver"]
end

node_learner(("Learner"))

node_learner -.->|"opens app"| node_activity
node_activity -.->|"starts UI"| node_app_ui
node_app_ui -.->|"shows menu"| node_menu
node_menu -.->|"requests actions"| node_viewmodel
node_setup -.->|"submits setup"| node_viewmodel
node_game -.->|"submits answers"| node_viewmodel
node_viewmodel -.->|"requests questions"| node_generator
node_generator -.->|"uses pool"| node_fractions
node_generator -.->|"creates questions"| node_models
node_viewmodel -.->|"loads and saves"| node_repository
node_viewmodel -.->|"reads settings"| node_preferences
node_repository -.->|"uses data access"| node_dao
node_dao -.->|"queries database"| node_database
node_database -.->|"stores records"| node_question_record
node_database -.->|"stores sessions"| node_session
node_viewmodel -.->|"provides results"| node_results
node_viewmodel -.->|"provides history"| node_history
node_viewmodel -.->|"provides revision"| node_revision
node_viewmodel -.->|"provides statistics"| node_stats
node_viewmodel -.->|"updates settings"| node_settings
node_menu -.->|"opens options"| node_special
node_settings -.->|"configures reminders"| node_scheduler
node_scheduler -.->|"schedules delivery"| node_receiver

click node_activity "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/MainActivity.kt"
click node_app_ui "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/ZenMathApp.kt"
click node_viewmodel "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/ZenMathViewModel.kt"
click node_menu "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/MainMenuScreen.kt"
click node_setup "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/GameSetupScreen.kt"
click node_game "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/GameScreen.kt"
click node_results "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/ResultsScreen.kt"
click node_history "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/HistoryScreen.kt"
click node_revision "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/RevisionScreen.kt"
click node_stats "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/StatsScreen.kt"
click node_settings "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/SettingsScreen.kt"
click node_special "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/SpecialMenuScreen.kt"
click node_generator "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/QuestionGenerator.kt"
click node_fractions "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/FractionsPool.kt"
click node_models "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/GameModels.kt"
click node_repository "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathRepository.kt"
click node_dao "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathDao.kt"
click node_database "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathDatabase.kt"
click node_question_record "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/QuestionRecordEntity.kt"
click node_session "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/SessionEntity.kt"
click node_preferences "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/PreferencesManager.kt"
click node_scheduler "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/notifications/NotificationScheduler.kt"
click node_receiver "https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/notifications/ReminderReceiver.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_activity,node_app_ui,node_viewmodel,node_menu,node_setup,node_game,node_results,node_history,node_revision,node_stats,node_settings,node_special toneBlue
class node_generator,node_fractions,node_models toneAmber
class node_repository,node_dao,node_database,node_question_record,node_session,node_preferences toneMint
class node_scheduler,node_receiver toneRose
class node_learner toneIndigo
```

## Components

### App and UI

- [Main Activity](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/MainActivity.kt): `app/src/main/java/com/example/MainActivity.kt`
- [App Shell](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/ZenMathApp.kt): `app/src/main/java/com/example/ui/ZenMathApp.kt`
- [App ViewModel](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/ZenMathViewModel.kt): `app/src/main/java/com/example/ui/ZenMathViewModel.kt`
- [Main Menu](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/MainMenuScreen.kt): `app/src/main/java/com/example/ui/screens/MainMenuScreen.kt`
- [Game Setup](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/GameSetupScreen.kt): `app/src/main/java/com/example/ui/screens/GameSetupScreen.kt`
- [Game Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/GameScreen.kt): `app/src/main/java/com/example/ui/screens/GameScreen.kt`
- [Results Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/ResultsScreen.kt): `app/src/main/java/com/example/ui/screens/ResultsScreen.kt`
- [History Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/HistoryScreen.kt): `app/src/main/java/com/example/ui/screens/HistoryScreen.kt`
- [Revision Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/RevisionScreen.kt): `app/src/main/java/com/example/ui/screens/RevisionScreen.kt`
- [Stats Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/StatsScreen.kt): `app/src/main/java/com/example/ui/screens/StatsScreen.kt`
- [Settings Screen](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/SettingsScreen.kt): `app/src/main/java/com/example/ui/screens/SettingsScreen.kt`
- [Special Menu](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/ui/screens/SpecialMenuScreen.kt): `app/src/main/java/com/example/ui/screens/SpecialMenuScreen.kt`

### Practice Domain

- [Question Generator](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/QuestionGenerator.kt): `app/src/main/java/com/example/domain/QuestionGenerator.kt`
- [Fractions Pool](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/FractionsPool.kt): `app/src/main/java/com/example/domain/FractionsPool.kt`
- [Game Models](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/domain/GameModels.kt): `app/src/main/java/com/example/domain/GameModels.kt`

### Progress and Storage

- [Game Repository](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathRepository.kt): `app/src/main/java/com/example/data/ZenMathRepository.kt`
- [Data Access](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathDao.kt): `app/src/main/java/com/example/data/ZenMathDao.kt`
- [App Database](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/ZenMathDatabase.kt): `app/src/main/java/com/example/data/ZenMathDatabase.kt`
- [Question Records](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/QuestionRecordEntity.kt): `app/src/main/java/com/example/data/QuestionRecordEntity.kt`
- [Session Records](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/SessionEntity.kt): `app/src/main/java/com/example/data/SessionEntity.kt`
- [Preferences](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/data/PreferencesManager.kt): `app/src/main/java/com/example/data/PreferencesManager.kt`

### Reminders

- [Reminder Scheduler](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/notifications/NotificationScheduler.kt): `app/src/main/java/com/example/notifications/NotificationScheduler.kt`
- [Reminder Receiver](https://github.com/shihabulsakib/zenmath_android/blob/main/app/src/main/java/com/example/notifications/ReminderReceiver.kt): `app/src/main/java/com/example/notifications/ReminderReceiver.kt`

### Other components

- **Learner**

## Connections

- Learner → Main Activity: opens app
- Main Activity → App Shell: starts UI
- App Shell → Main Menu: shows menu
- Main Menu → App ViewModel: requests actions
- Game Setup → App ViewModel: submits setup
- Game Screen → App ViewModel: submits answers
- App ViewModel → Question Generator: requests questions
- Question Generator → Fractions Pool: uses pool
- Question Generator → Game Models: creates questions
- App ViewModel → Game Repository: loads and saves
- App ViewModel → Preferences: reads settings
- Game Repository → Data Access: uses data access
- Data Access → App Database: queries database
- App Database → Question Records: stores records
- App Database → Session Records: stores sessions
- App ViewModel → Results Screen: provides results
- App ViewModel → History Screen: provides history
- App ViewModel → Revision Screen: provides revision
- App ViewModel → Stats Screen: provides statistics
- App ViewModel → Settings Screen: updates settings
- Main Menu → Special Menu: opens options
- Settings Screen → Reminder Scheduler: configures reminders
- Reminder Scheduler → Reminder Receiver: schedules delivery
