# wenadb/flux architecture

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

- Interactive diagram: https://gitdiagram.com/wenadb/flux
- Repository: https://github.com/wenadb/flux

## Overview

FLUX is presented as a rootless Android performance optimizer, with dashboard telemetry, optimization commands, ART compilation, app management, game tuning, execution history, and Shizuku connection controls. The sampled web engine seeds demo telemetry and simulates command execution; it persists selected state in browser localStorage. The tree also contains a native Android implementation, but its source was not sampled, so its runtime wiring is not mapped here.

Main entry points: [`src/App.tsx`](https://github.com/wenadb/flux/blob/main/src/App.tsx) (App orchestrator), [`src/services/fluxEngine.ts`](https://github.com/wenadb/flux/blob/main/src/services/fluxEngine.ts) (Flux engine), [`src/types/index.ts`](https://github.com/wenadb/flux/blob/main/src/types/index.ts) (Domain types), [`src/screens/DashboardScreen.tsx`](https://github.com/wenadb/flux/blob/main/src/screens/DashboardScreen.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_app["App orchestrator<br/>[App.tsx]"]
  node_shizuku_modal["Shizuku controls<br/>[ShizukuModal.tsx]"]
  node_execution_modal["Command results<br/>[ExecutionModal.tsx]"]
  node_topbar["Top bar<br/>[TopBar.tsx]"]
end

subgraph group_features["Optimization features"]
  node_dashboard["Dashboard"]
  node_optimizer["Optimizer"]
  node_art["ART tools<br/>[ArtScreen.tsx]"]
  node_apps["App manager<br/>[AppsScreen.tsx]"]
  node_games["Game Space"]
  node_history["Execution history<br/>[HistoryScreen.tsx]"]
  node_settings["Settings<br/>[SettingsScreen.tsx]"]
  node_about["About<br/>[AboutScreen.tsx]"]
end

subgraph group_runtime["Engine and state"]
  node_engine["Flux engine<br/>[fluxEngine.ts]"]
  node_types["Domain types<br/>[index.ts]"]
end

subgraph group_integrations["System integration"]
  node_storage[("Browser storage")]
  node_shizuku["Shizuku / ADB"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_optimizer
node_app -->|"renders"| node_art
node_app -->|"renders"| node_apps
node_app -->|"renders"| node_games
node_app -->|"renders"| node_history
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_about
node_app -->|"renders"| node_topbar
node_app -->|"renders"| node_shizuku_modal
node_app -->|"renders"| node_execution_modal
node_app -->|"subscribes; reads telemetry"| node_engine
node_app -->|"runs optimization; executes commands"| node_engine
node_app -->|"freezes apps"| node_engine
node_app -->|"rolls back; clears logs"| node_engine
node_app -->|"sets Shizuku status"| node_engine
node_engine -->|"loads and saves state"| node_storage
node_engine -.->|"simulates command execution"| node_shizuku
node_app -->|"uses data contracts"| node_types
node_dashboard -->|"displays telemetry"| node_types
node_art -->|"uses package data"| node_types
node_games -->|"uses packages and tweaks"| node_types

click node_app "https://github.com/wenadb/flux/blob/main/src/App.tsx"
click node_dashboard "https://github.com/wenadb/flux/blob/main/src/screens/DashboardScreen.tsx"
click node_optimizer "https://github.com/wenadb/flux/blob/main/src/screens/OptimizerScreen.tsx"
click node_art "https://github.com/wenadb/flux/blob/main/src/screens/ArtScreen.tsx"
click node_apps "https://github.com/wenadb/flux/blob/main/src/screens/AppsScreen.tsx"
click node_games "https://github.com/wenadb/flux/blob/main/src/screens/GameSpaceScreen.tsx"
click node_history "https://github.com/wenadb/flux/blob/main/src/screens/HistoryScreen.tsx"
click node_settings "https://github.com/wenadb/flux/blob/main/src/screens/SettingsScreen.tsx"
click node_about "https://github.com/wenadb/flux/blob/main/src/screens/AboutScreen.tsx"
click node_engine "https://github.com/wenadb/flux/blob/main/src/services/fluxEngine.ts"
click node_types "https://github.com/wenadb/flux/blob/main/src/types/index.ts"
click node_shizuku_modal "https://github.com/wenadb/flux/blob/main/src/components/ShizukuModal.tsx"
click node_execution_modal "https://github.com/wenadb/flux/blob/main/src/components/ExecutionModal.tsx"
click node_topbar "https://github.com/wenadb/flux/blob/main/src/components/TopBar.tsx"

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_shizuku_modal,node_execution_modal,node_topbar,node_user toneBlue
class node_dashboard,node_optimizer,node_art,node_apps,node_games,node_history,node_settings,node_about toneAmber
class node_engine,node_types toneMint
class node_storage,node_shizuku toneRose
```

## Components

### Web interface

- [App orchestrator](https://github.com/wenadb/flux/blob/main/src/App.tsx): `src/App.tsx`
- [Shizuku controls](https://github.com/wenadb/flux/blob/main/src/components/ShizukuModal.tsx): `src/components/ShizukuModal.tsx`
- [Command results](https://github.com/wenadb/flux/blob/main/src/components/ExecutionModal.tsx): `src/components/ExecutionModal.tsx`
- [Top bar](https://github.com/wenadb/flux/blob/main/src/components/TopBar.tsx): `src/components/TopBar.tsx`

### Optimization features

- [Dashboard](https://github.com/wenadb/flux/blob/main/src/screens/DashboardScreen.tsx): `src/screens/DashboardScreen.tsx`
- [Optimizer](https://github.com/wenadb/flux/blob/main/src/screens/OptimizerScreen.tsx): `src/screens/OptimizerScreen.tsx`
- [ART tools](https://github.com/wenadb/flux/blob/main/src/screens/ArtScreen.tsx): `src/screens/ArtScreen.tsx`
- [App manager](https://github.com/wenadb/flux/blob/main/src/screens/AppsScreen.tsx): `src/screens/AppsScreen.tsx`
- [Game Space](https://github.com/wenadb/flux/blob/main/src/screens/GameSpaceScreen.tsx): `src/screens/GameSpaceScreen.tsx`
- [Execution history](https://github.com/wenadb/flux/blob/main/src/screens/HistoryScreen.tsx): `src/screens/HistoryScreen.tsx`
- [Settings](https://github.com/wenadb/flux/blob/main/src/screens/SettingsScreen.tsx): `src/screens/SettingsScreen.tsx`
- [About](https://github.com/wenadb/flux/blob/main/src/screens/AboutScreen.tsx): `src/screens/AboutScreen.tsx`

### Engine and state

- [Flux engine](https://github.com/wenadb/flux/blob/main/src/services/fluxEngine.ts): `src/services/fluxEngine.ts`
- [Domain types](https://github.com/wenadb/flux/blob/main/src/types/index.ts): `src/types/index.ts`

### System integration

- **Browser storage**
- **Shizuku / ADB**

### Other components

- **User**

## Connections

- User → App orchestrator: uses
- App orchestrator → Dashboard: renders
- App orchestrator → Optimizer: renders
- App orchestrator → ART tools: renders
- App orchestrator → App manager: renders
- App orchestrator → Game Space: renders
- App orchestrator → Execution history: renders
- App orchestrator → Settings: renders
- App orchestrator → About: renders
- App orchestrator → Top bar: renders
- App orchestrator → Shizuku controls: renders
- App orchestrator → Command results: renders
- App orchestrator → Flux engine: subscribes; reads telemetry
- App orchestrator → Flux engine: runs optimization; executes commands
- App orchestrator → Flux engine: freezes apps
- App orchestrator → Flux engine: rolls back; clears logs
- App orchestrator → Flux engine: sets Shizuku status
- Flux engine → Browser storage: loads and saves state
- Flux engine → Shizuku / ADB: simulates command execution
- App orchestrator → Domain types: uses data contracts
- Dashboard → Domain types: displays telemetry
- ART tools → Domain types: uses package data
- Game Space → Domain types: uses packages and tweaks
