# kagaminehaku/thermodash architecture

> Architecture diagram of the GitHub repository kagaminehaku/thermodash, 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/kagaminehaku/thermodash
- Repository: https://github.com/kagaminehaku/thermodash

## Overview

ThermoDash is an Android device-monitoring app for discovering thermal and GPU sensors, selecting CPU/GPU readings, and showing monitoring results in a notification or movable floating window. Users configure sensors and display options in the main screen; a separate selection screen supports search, live refresh, and sharing a diagnostic snapshot. The monitor service owns periodic monitoring and Android notification/overlay behavior. The excerpts show scanner and UI wiring, but omit parts of the service and main screen, so uncertain internal calls are not inferred.

Main entry points: [`ThermoDash/SensorSelectionActivity.cs`](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/SensorSelectionActivity.cs) (Sensor selection), [`ThermoDash/MainActivity.cs`](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MainActivity.cs) (Monitor settings), [`ThermoDash/MonitorService.cs`](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MonitorService.cs) (Monitor service), [`ThermoDash/Helpers/SensorScanner.cs`](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Helpers/SensorScanner.cs) (Sensor scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App screens"]
  node_main["Monitor settings<br/>[MainActivity.cs]"]
  node_selection["Sensor selection"]
  node_adapter["Sensor list adapter<br/>[SensorAdapter.cs]"]
end

subgraph group_sensors["Sensor discovery"]
  node_item["Sensor item<br/>[SensorItem.cs]"]
  node_scanner["Sensor scanner<br/>[SensorScanner.cs]"]
end

subgraph group_monitor["Monitoring output"]
  node_service["Monitor service<br/>[MonitorService.cs]"]
end

subgraph group_state["Saved settings"]
  node_prefs[("Shared preferences")]
end

node_user(("App user"))
node_sysfs[("Android sensor files")]
node_android["Android system"]
node_share(("Share target"))

node_user -->|"configures"| node_main
node_user -->|"chooses sensors"| node_selection
node_main -->|"auto-detects"| node_scanner
node_selection -->|"scans sensors"| node_scanner
node_scanner -->|"reads sensor files"| node_sysfs
node_scanner -->|"creates readings"| node_item
node_selection -->|"displays and filters"| node_adapter
node_adapter -->|"renders readings"| node_item
node_selection -->|"loads and saves selection"| node_prefs
node_main -->|"loads and saves settings"| node_prefs
node_main -->|"starts or updates"| node_service
node_service -->|"reads monitoring options"| node_prefs
node_service -->|"posts notifications and overlays"| node_android
node_service -->|"broadcasts UI updates"| node_main
node_selection -->|"shares diagnostic snapshot"| node_share

click node_main "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MainActivity.cs"
click node_selection "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/SensorSelectionActivity.cs"
click node_adapter "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Adapters/SensorAdapter.cs"
click node_item "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Models/SensorItem.cs"
click node_scanner "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Helpers/SensorScanner.cs"
click node_service "https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MonitorService.cs"

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_main,node_selection,node_adapter,node_user toneBlue
class node_item,node_scanner,node_sysfs toneAmber
class node_service toneMint
class node_prefs toneRose
class node_android,node_share toneIndigo
```

## Components

### App screens

- [Monitor settings](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MainActivity.cs): `ThermoDash/MainActivity.cs`
- [Sensor selection](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/SensorSelectionActivity.cs): `ThermoDash/SensorSelectionActivity.cs`
- [Sensor list adapter](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Adapters/SensorAdapter.cs): `ThermoDash/Adapters/SensorAdapter.cs`

### Sensor discovery

- [Sensor item](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Models/SensorItem.cs): `ThermoDash/Models/SensorItem.cs`
- [Sensor scanner](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/Helpers/SensorScanner.cs): `ThermoDash/Helpers/SensorScanner.cs`

### Monitoring output

- [Monitor service](https://github.com/kagaminehaku/thermodash/blob/master/ThermoDash/MonitorService.cs): `ThermoDash/MonitorService.cs`

### Saved settings

- **Shared preferences**

### Other components

- **App user**
- **Android sensor files**
- **Android system**
- **Share target**

## Connections

- App user → Monitor settings: configures
- App user → Sensor selection: chooses sensors
- Monitor settings → Sensor scanner: auto-detects
- Sensor selection → Sensor scanner: scans sensors
- Sensor scanner → Android sensor files: reads sensor files
- Sensor scanner → Sensor item: creates readings
- Sensor selection → Sensor list adapter: displays and filters
- Sensor list adapter → Sensor item: renders readings
- Sensor selection → Shared preferences: loads and saves selection
- Monitor settings → Shared preferences: loads and saves settings
- Monitor settings → Monitor service: starts or updates
- Monitor service → Shared preferences: reads monitoring options
- Monitor service → Android system: posts notifications and overlays
- Monitor service → Monitor settings: broadcasts UI updates
- Sensor selection → Share target: shares diagnostic snapshot
