# joshh3ro/astra_lawnchair architecture

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

- Interactive diagram: https://gitdiagram.com/joshh3ro/astra_lawnchair
- Repository: https://github.com/joshh3ro/astra_lawnchair

## Overview

Astra Lawnchair is a Windows-focused Dart terminal launcher for AstraBot accounts and configs. Users discover or refresh account data, select account/config pairs, and launch them as detached processes with a configurable stagger. The interface also supports session control, config switching/copying, and obfuscation; the tree indicates separate tracking and statistics services. Source excerpts were unavailable, so links reflect the documented workflow and named modules, not verified call sites.

Main entry points: [`lib/src/ui/screens/main_screen.dart`](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/screens/main_screen.dart) (Main screen), [`lib/src/ui/app.dart`](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/app.dart) (TUI app), [`lib/src/services/scanner_service.dart`](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/scanner_service.dart) (Account scanner), [`lib/src/services/launcher_service.dart`](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/launcher_service.dart) (Launcher service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Terminal interface"]
  node_app["TUI app<br/>[app.dart]"]
  node_main["Main screen<br/>[main_screen.dart]"]
  node_setup["Setup screen<br/>[setup_screen.dart]"]
  node_chart["Stats chart<br/>[ascii_chart.dart]"]
end

subgraph group_services["Runtime services"]
  node_scanner["Account scanner"]
  node_config["Config service"]
  node_launcher["Launcher service"]
  node_process["Process tracker"]
  node_stats["Stats tracker"]
end

subgraph group_models["Domain data"]
  node_account["Account<br/>[account.dart]"]
  node_appconfig["App config<br/>[app_config.dart]"]
  node_target["Launch target<br/>[launch_target.dart]"]
  node_session["Running session"]
  node_accountstats["Account stats<br/>[account_stats.dart]"]
end

subgraph group_utilities["Utilities"]
  node_classifier["Item classifier"]
  node_obfuscator["Obfuscator<br/>[obfuscator.dart]"]
end

node_user(("User"))
node_entry["CLI entry"]
node_library["Library entry"]

node_user -->|"starts"| node_entry
node_entry -->|"enters"| node_library
node_library -->|"starts"| node_app
node_user -->|"operates"| node_main
node_app -->|"initial setup"| node_setup
node_app -->|"shows"| node_main
node_main -->|"refreshes data"| node_scanner
node_main -->|"reads or saves cache"| node_config
node_main -->|"launches pairs"| node_launcher
node_main -->|"controls sessions"| node_process
node_main -->|"tracks stats"| node_stats
node_main -->|"toggles obfuscation"| node_obfuscator
node_scanner -->|"discovers"| node_account
node_scanner -->|"discovers"| node_appconfig
node_main -->|"queues pairs"| node_target
node_launcher -->|"starts sessions"| node_session
node_process -->|"tracks"| node_session
node_stats -->|"records"| node_accountstats
node_main -->|"renders stats"| node_chart

click node_entry "https://github.com/joshh3ro/astra_lawnchair/blob/master/bin/astra_lawnchair.dart"
click node_library "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/astra_lawnchair.dart"
click node_app "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/app.dart"
click node_main "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/screens/main_screen.dart"
click node_setup "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/screens/setup_screen.dart"
click node_chart "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/widgets/ascii_chart.dart"
click node_scanner "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/scanner_service.dart"
click node_config "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/config_service.dart"
click node_launcher "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/launcher_service.dart"
click node_process "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/process_tracker_service.dart"
click node_stats "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/stat_tracker_service.dart"
click node_account "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/account.dart"
click node_appconfig "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/app_config.dart"
click node_target "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/launch_target.dart"
click node_session "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/running_session.dart"
click node_accountstats "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/account_stats.dart"
click node_classifier "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/utils/item_classifier.dart"
click node_obfuscator "https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/utils/obfuscator.dart"

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_main,node_setup,node_chart,node_user toneBlue
class node_scanner,node_config,node_launcher,node_process,node_stats toneAmber
class node_account,node_appconfig,node_target,node_session,node_accountstats toneMint
class node_classifier,node_obfuscator toneRose
class node_entry,node_library toneTeal
```

## Components

### Terminal interface

- [TUI app](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/app.dart): `lib/src/ui/app.dart`
- [Main screen](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/screens/main_screen.dart): `lib/src/ui/screens/main_screen.dart`
- [Setup screen](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/screens/setup_screen.dart): `lib/src/ui/screens/setup_screen.dart`
- [Stats chart](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/ui/widgets/ascii_chart.dart): `lib/src/ui/widgets/ascii_chart.dart`

### Runtime services

- [Account scanner](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/scanner_service.dart): `lib/src/services/scanner_service.dart`
- [Config service](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/config_service.dart): `lib/src/services/config_service.dart`
- [Launcher service](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/launcher_service.dart): `lib/src/services/launcher_service.dart`
- [Process tracker](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/process_tracker_service.dart): `lib/src/services/process_tracker_service.dart`
- [Stats tracker](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/services/stat_tracker_service.dart): `lib/src/services/stat_tracker_service.dart`

### Domain data

- [Account](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/account.dart): `lib/src/models/account.dart`
- [App config](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/app_config.dart): `lib/src/models/app_config.dart`
- [Launch target](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/launch_target.dart): `lib/src/models/launch_target.dart`
- [Running session](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/running_session.dart): `lib/src/models/running_session.dart`
- [Account stats](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/models/account_stats.dart): `lib/src/models/account_stats.dart`

### Utilities

- [Item classifier](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/utils/item_classifier.dart): `lib/src/utils/item_classifier.dart`
- [Obfuscator](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/src/utils/obfuscator.dart): `lib/src/utils/obfuscator.dart`

### Other components

- **User**
- [CLI entry](https://github.com/joshh3ro/astra_lawnchair/blob/master/bin/astra_lawnchair.dart): `bin/astra_lawnchair.dart`
- [Library entry](https://github.com/joshh3ro/astra_lawnchair/blob/master/lib/astra_lawnchair.dart): `lib/astra_lawnchair.dart`

## Connections

- User → CLI entry: starts
- CLI entry → Library entry: enters
- Library entry → TUI app: starts
- User → Main screen: operates
- TUI app → Setup screen: initial setup
- TUI app → Main screen: shows
- Main screen → Account scanner: refreshes data
- Main screen → Config service: reads or saves cache
- Main screen → Launcher service: launches pairs
- Main screen → Process tracker: controls sessions
- Main screen → Stats tracker: tracks stats
- Main screen → Obfuscator: toggles obfuscation
- Account scanner → Account: discovers
- Account scanner → App config: discovers
- Main screen → Launch target: queues pairs
- Launcher service → Running session: starts sessions
- Process tracker → Running session: tracks
- Stats tracker → Account stats: records
- Main screen → Stats chart: renders stats
