# 7mohan/mohalaboptimazation architecture

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

- Interactive diagram: https://gitdiagram.com/7mohan/mohalaboptimazation
- Repository: https://github.com/7mohan/mohalaboptimazation

## Overview

Moha Lab Optimization is a Flutter Android gaming and system-tuning utility. The main user workflow is to inspect device status, choose an optimization or per-game setting, apply it through an authorized privilege path, and verify or restore the result. The product also includes game-library management, network diagnostics, maintenance, and settings. The README documents these capabilities; source excerpts and the SOURCE INDEX confirm key native bridge relationships, but many Dart feature internals were not sampled, so those links are documented rather than source-verified.

Main entry points: [`lib/core/routing/app_router.dart`](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/core/routing/app_router.dart) (Navigation and shell), [`android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt`](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt) (Shizuku bridge), [`lib/features/optimization/presentation/screens/optimization_screen.dart`](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/presentation/screens/optimization_screen.dart) (System optimization), [`android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt`](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt) (Android platform channels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flutter["Flutter app"]
  node_app["Application entry<br/>[main.dart]"]
  node_navigation["Navigation and shell<br/>[app_router.dart]"]
end

subgraph group_device["Device insights"]
  node_home["Home dashboard<br/>[home_screen.dart]"]
  node_telemetry["Device telemetry"]
  node_network["Network diagnostics"]
  node_network_probe["Network probing"]
end

subgraph group_tuning["Gaming and tuning"]
  node_games["Game library<br/>[games_screen.dart]"]
  node_game_tuning["Per-game tuning"]
  node_optimization["System optimization"]
  node_tweak_catalog["Tweak catalog<br/>[tweak_catalog.dart]"]
  node_maintenance["Measured maintenance"]
end

subgraph group_privilege["Native privilege"]
  node_shizuku_feature["Shizuku setup"]
  node_native_activity["Android platform channels<br/>[MainActivity.kt]"]
  node_shizuku_bridge["Shizuku bridge<br/>[ShizukuBridge.kt]"]
  node_permission_handler["Permission handler"]
  node_state_detector["Shizuku state"]
  node_tweak_engine["Verified tweak engine<br/>[TweakEngine.kt]"]
  node_root_shell["Persistent root shell<br/>[RootShell.kt]"]
end

subgraph group_support["App support"]
  node_preferences["User preferences"]
  node_local_settings[("Local preferences store")]
end

node_user(("Device user"))

node_user -->|"opens"| node_app
node_app -->|"starts"| node_navigation
node_navigation -->|"routes"| node_home
node_home -.->|"shows"| node_telemetry
node_navigation -.->|"routes"| node_games
node_games -.->|"offers"| node_game_tuning
node_navigation -.->|"routes"| node_optimization
node_optimization -.->|"applies"| node_tweak_catalog
node_optimization -->|"offers"| node_maintenance
node_navigation -.->|"routes"| node_network
node_network -.->|"probes"| node_network_probe
node_navigation -.->|"routes"| node_preferences
node_preferences -.->|"persists"| node_local_settings
node_optimization -->|"requests tweaks"| node_native_activity
node_game_tuning -->|"requests game settings"| node_native_activity
node_native_activity -->|"dispatches"| node_tweak_engine
node_native_activity -->|"registers"| node_shizuku_bridge
node_shizuku_bridge -->|"registers requests"| node_permission_handler
node_shizuku_bridge -->|"checks readiness"| node_state_detector
node_tweak_engine -->|"executes commands"| node_shizuku_bridge
node_tweak_engine -->|"executes root commands"| node_root_shell
node_shizuku_feature -.->|"uses channel"| node_shizuku_bridge

click node_app "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/main.dart"
click node_navigation "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/core/routing/app_router.dart"
click node_home "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/home/presentation/screens/home_screen.dart"
click node_telemetry "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/diagnostics/data/services/device_info_service.dart"
click node_games "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/games/presentation/screens/games_screen.dart"
click node_game_tuning "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/games/data/services/game_stats_service.dart"
click node_optimization "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/presentation/screens/optimization_screen.dart"
click node_tweak_catalog "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/domain/tweak_catalog.dart"
click node_maintenance "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/presentation/providers/long_task_provider.dart"
click node_network "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/network/domain/services/network_diagnostics_engine.dart"
click node_network_probe "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/network/data/datasources/native_network_probe.dart"
click node_preferences "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/settings/presentation/screens/settings_screen.dart"
click node_local_settings "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/data/datasources/local/settings_local_datasource.dart"
click node_shizuku_feature "https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/shizuku/presentation/providers/shizuku_provider.dart"
click node_native_activity "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt"
click node_shizuku_bridge "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt"
click node_permission_handler "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuPermissionHandler.kt"
click node_state_detector "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuStateDetector.kt"
click node_tweak_engine "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/TweakEngine.kt"
click node_root_shell "https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/RootShell.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_app,node_navigation,node_user toneBlue
class node_home,node_telemetry,node_network,node_network_probe toneAmber
class node_games,node_game_tuning,node_optimization,node_tweak_catalog,node_maintenance toneMint
class node_shizuku_feature,node_native_activity,node_shizuku_bridge,node_permission_handler,node_state_detector,node_tweak_engine,node_root_shell toneRose
class node_preferences,node_local_settings toneIndigo
```

## Components

### Flutter app

- [Application entry](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/main.dart): `lib/main.dart`
- [Navigation and shell](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/core/routing/app_router.dart): `lib/core/routing/app_router.dart`

### Device insights

- [Home dashboard](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/home/presentation/screens/home_screen.dart): `lib/features/home/presentation/screens/home_screen.dart`
- [Device telemetry](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/diagnostics/data/services/device_info_service.dart): `lib/features/diagnostics/data/services/device_info_service.dart`
- [Network diagnostics](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/network/domain/services/network_diagnostics_engine.dart): `lib/features/network/domain/services/network_diagnostics_engine.dart`
- [Network probing](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/network/data/datasources/native_network_probe.dart): `lib/features/network/data/datasources/native_network_probe.dart`

### Gaming and tuning

- [Game library](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/games/presentation/screens/games_screen.dart): `lib/features/games/presentation/screens/games_screen.dart`
- [Per-game tuning](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/games/data/services/game_stats_service.dart): `lib/features/games/data/services/game_stats_service.dart`
- [System optimization](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/presentation/screens/optimization_screen.dart): `lib/features/optimization/presentation/screens/optimization_screen.dart`
- [Tweak catalog](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/domain/tweak_catalog.dart): `lib/features/optimization/domain/tweak_catalog.dart`
- [Measured maintenance](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/optimization/presentation/providers/long_task_provider.dart): `lib/features/optimization/presentation/providers/long_task_provider.dart`

### Native privilege

- [Shizuku setup](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/shizuku/presentation/providers/shizuku_provider.dart): `lib/features/shizuku/presentation/providers/shizuku_provider.dart`
- [Android platform channels](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt): `android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt`
- [Shizuku bridge](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt): `android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt`
- [Permission handler](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuPermissionHandler.kt): `android/app/src/main/kotlin/com/mohalab/optimization/ShizukuPermissionHandler.kt`
- [Shizuku state](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/ShizukuStateDetector.kt): `android/app/src/main/kotlin/com/mohalab/optimization/ShizukuStateDetector.kt`
- [Verified tweak engine](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/TweakEngine.kt): `android/app/src/main/kotlin/com/mohalab/optimization/TweakEngine.kt`
- [Persistent root shell](https://github.com/7mohan/mohalaboptimazation/blob/main/android/app/src/main/kotlin/com/mohalab/optimization/RootShell.kt): `android/app/src/main/kotlin/com/mohalab/optimization/RootShell.kt`

### App support

- [User preferences](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/features/settings/presentation/screens/settings_screen.dart): `lib/features/settings/presentation/screens/settings_screen.dart`
- [Local preferences store](https://github.com/7mohan/mohalaboptimazation/blob/main/lib/data/datasources/local/settings_local_datasource.dart): `lib/data/datasources/local/settings_local_datasource.dart`

### Other components

- **Device user**

## Connections

- Device user → Application entry: opens (evidence: `README.md`)
- Application entry → Navigation and shell: starts (evidence: `README.md`)
- Navigation and shell → Home dashboard: routes (evidence: `README.md`)
- Home dashboard → Device telemetry: shows
- Navigation and shell → Game library: routes
- Game library → Per-game tuning: offers
- Navigation and shell → System optimization: routes
- System optimization → Tweak catalog: applies
- System optimization → Measured maintenance: offers (evidence: `README.md`)
- Navigation and shell → Network diagnostics: routes
- Network diagnostics → Network probing: probes
- Navigation and shell → User preferences: routes
- User preferences → Local preferences store: persists
- System optimization → Android platform channels: requests tweaks (evidence: `README.md`)
- Per-game tuning → Android platform channels: requests game settings (evidence: `README.md`)
- Android platform channels → Verified tweak engine: dispatches (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt`)
- Android platform channels → Shizuku bridge: registers (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/MainActivity.kt`)
- Shizuku bridge → Permission handler: registers requests (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt`)
- Shizuku bridge → Shizuku state: checks readiness (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/ShizukuBridge.kt`)
- Verified tweak engine → Shizuku bridge: executes commands (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/TweakEngine.kt`)
- Verified tweak engine → Persistent root shell: executes root commands (evidence: `android/app/src/main/kotlin/com/mohalab/optimization/TweakEngine.kt`)
- Shizuku setup → Shizuku bridge: uses channel
