# snejdik/helios architecture

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

- Interactive diagram: https://gitdiagram.com/snejdik/helios
- Repository: https://github.com/snejdik/helios

## Overview

Helios is a macOS menu-bar monitor and diagnostics app with optional, carefully gated fan control. The user opens the menu-bar dashboard or main window, reviews live readings and health explanations, and can drill into performance, battery, energy, network, storage, and longevity views. Fan changes travel through the app’s daemon client to a privileged helper, which applies hardware controls under leases and recovery policies. README statements establish the product workflows; sampled source and the SOURCE INDEX support selected internal links, but many provider and view implementations were not excerpted.

Main entry points: [`Sources/HeliosApp/OverviewViewModel.swift`](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/OverviewViewModel.swift) (Telemetry view model), [`Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift`](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift) (Main window), [`Sources/HeliosApp/DaemonClient.swift`](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/DaemonClient.swift) (Daemon client), [`Sources/HeliosApp/V2`](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/V2) (Monitoring pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["App experience"]
  node_status["Menu-bar dashboard"]
  node_window["Main window"]
  node_preferences[("App preferences")]
  node_views["Monitoring pages"]
  node_settings["Settings and tools"]
end

subgraph group_telemetry["Monitoring and insights"]
  node_overview["Telemetry view model"]
  node_providers["Telemetry providers"]
  node_history[("Telemetry history")]
  node_insights["Health and longevity"]
  node_network["Network diagnosis"]
  node_alerts["Health alerts<br/>[HealthAlerts.swift]"]
  node_format["Reading presentation"]
end

subgraph group_fancontrol["Fan control"]
  node_fanui["Fan controls"]
  node_fanprefs["Cooling rules<br/>[CoolingRules.swift]"]
  node_client["Daemon client<br/>[DaemonClient.swift]"]
  node_service["Daemon service manager"]
end

subgraph group_daemon["Privileged helper"]
  node_session["Daemon session"]
  node_coordinator["Fan control coordinator"]
  node_engine["Fan control engine"]
  node_layer["Fan layer runtime"]
  node_layerengine["Fan layer engine"]
end

subgraph group_shared["Shared hardware layer"]
  node_policy["Fan layer policy"]
  node_profile["Fan profiles"]
  node_smc["SMC reader<br/>[SMCClient.swift]"]
  node_identity["Service identity"]
  node_trust["XPC trust"]
end

node_user(("Mac user"))

node_user -->|"opens dashboard"| node_status
node_user -->|"opens details"| node_window
node_status -->|"shows readings"| node_overview
node_status -->|"opens"| node_window
node_window -->|"uses model"| node_overview
node_window -->|"reads settings"| node_preferences
node_window -->|"routes settings"| node_settings
node_overview -.->|"samples metrics"| node_providers
node_overview -->|"records snapshots"| node_history
node_overview -.->|"supports assessment"| node_insights
node_overview -->|"uses thresholds"| node_alerts
node_views -->|"presents readings"| node_overview
node_views -->|"formats values"| node_format
node_views -.->|"presents diagnosis"| node_network
node_views -.->|"presents longevity"| node_insights
node_alerts -->|"formats notices"| node_format
node_fanui -->|"requests control"| node_client
node_fanprefs -.->|"configures cooling"| node_fanui
node_settings -->|"configures"| node_preferences
node_settings -->|"manages helper"| node_service
node_service -->|"connects helper"| node_client
node_client -->|"sends XPC requests"| node_session
node_client -->|"checks identity"| node_trust
node_session -->|"dispatches control"| node_coordinator
node_coordinator -->|"coordinates control"| node_engine
node_coordinator -->|"uses fan layer"| node_layer
node_layer -->|"runs engine"| node_layerengine
node_layerengine -->|"applies policy"| node_policy
node_layerengine -->|"uses profile"| node_profile
node_layer -->|"reads hardware"| node_smc
node_client -->|"uses service name"| node_identity
node_session -->|"uses service name"| node_identity

click node_status "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/StatusItemController.swift"
click node_window "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift"
click node_preferences "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/HeliosPreferences.swift"
click node_views "https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/V2"
click node_settings "https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Windows"
click node_overview "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/OverviewViewModel.swift"
click node_providers "https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry"
click node_history "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/TelemetryHistory.swift"
click node_insights "https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry"
click node_network "https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry"
click node_alerts "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/HealthAlerts.swift"
click node_format "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/TelemetryFormatting.swift"
click node_fanui "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/FanControlModel.swift"
click node_fanprefs "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/CoolingRules.swift"
click node_client "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/DaemonClient.swift"
click node_service "https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/DaemonService.swift"
click node_session "https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/DaemonSession.swift"
click node_coordinator "https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanControlCoordinator.swift"
click node_engine "https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanControlEngine.swift"
click node_layer "https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanLayerRuntime.swift"
click node_layerengine "https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanLayerEngine.swift"
click node_policy "https://github.com/snejdik/helios/blob/main/Sources/Shared/FanLayerPolicy.swift"
click node_profile "https://github.com/snejdik/helios/blob/main/Sources/Shared/FanLayerProfile.swift"
click node_smc "https://github.com/snejdik/helios/blob/main/Sources/Shared/SMCClient.swift"
click node_identity "https://github.com/snejdik/helios/blob/main/Sources/Shared/HeliosServiceIdentity.swift"
click node_trust "https://github.com/snejdik/helios/blob/main/Sources/Shared/XPCTrustRequirement.swift"

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_status,node_window,node_preferences,node_views,node_settings,node_user toneBlue
class node_overview,node_providers,node_history,node_insights,node_network,node_alerts,node_format toneAmber
class node_fanui,node_fanprefs,node_client,node_service toneMint
class node_session,node_coordinator,node_engine,node_layer,node_layerengine toneRose
class node_policy,node_profile,node_smc,node_identity,node_trust toneIndigo
```

## Components

### App experience

- [Menu-bar dashboard](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/StatusItemController.swift): `Sources/HeliosApp/StatusItemController.swift`
- [Main window](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift): `Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift`
- [App preferences](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/HeliosPreferences.swift): `Sources/HeliosApp/HeliosPreferences.swift`
- [Monitoring pages](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/V2): `Sources/HeliosApp/V2`
- [Settings and tools](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Windows): `Sources/HeliosApp/Windows`

### Monitoring and insights

- [Telemetry view model](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/OverviewViewModel.swift): `Sources/HeliosApp/OverviewViewModel.swift`
- [Telemetry providers](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry): `Sources/HeliosApp/Telemetry`
- [Telemetry history](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/TelemetryHistory.swift): `Sources/HeliosApp/Telemetry/TelemetryHistory.swift`
- [Health and longevity](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry): `Sources/HeliosApp/Telemetry`
- [Network diagnosis](https://github.com/snejdik/helios/tree/main/Sources/HeliosApp/Telemetry): `Sources/HeliosApp/Telemetry`
- [Health alerts](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/HealthAlerts.swift): `Sources/HeliosApp/Telemetry/HealthAlerts.swift`
- [Reading presentation](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/Telemetry/TelemetryFormatting.swift): `Sources/HeliosApp/Telemetry/TelemetryFormatting.swift`

### Fan control

- [Fan controls](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/FanControlModel.swift): `Sources/HeliosApp/FanControlModel.swift`
- [Cooling rules](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/CoolingRules.swift): `Sources/HeliosApp/CoolingRules.swift`
- [Daemon client](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/DaemonClient.swift): `Sources/HeliosApp/DaemonClient.swift`
- [Daemon service manager](https://github.com/snejdik/helios/blob/main/Sources/HeliosApp/DaemonService.swift): `Sources/HeliosApp/DaemonService.swift`

### Privileged helper

- [Daemon session](https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/DaemonSession.swift): `Sources/HeliosDaemon/DaemonSession.swift`
- [Fan control coordinator](https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanControlCoordinator.swift): `Sources/HeliosDaemon/FanControlCoordinator.swift`
- [Fan control engine](https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanControlEngine.swift): `Sources/HeliosDaemon/FanControlEngine.swift`
- [Fan layer runtime](https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanLayerRuntime.swift): `Sources/HeliosDaemon/FanLayerRuntime.swift`
- [Fan layer engine](https://github.com/snejdik/helios/blob/main/Sources/HeliosDaemon/FanLayerEngine.swift): `Sources/HeliosDaemon/FanLayerEngine.swift`

### Shared hardware layer

- [Fan layer policy](https://github.com/snejdik/helios/blob/main/Sources/Shared/FanLayerPolicy.swift): `Sources/Shared/FanLayerPolicy.swift`
- [Fan profiles](https://github.com/snejdik/helios/blob/main/Sources/Shared/FanLayerProfile.swift): `Sources/Shared/FanLayerProfile.swift`
- [SMC reader](https://github.com/snejdik/helios/blob/main/Sources/Shared/SMCClient.swift): `Sources/Shared/SMCClient.swift`
- [Service identity](https://github.com/snejdik/helios/blob/main/Sources/Shared/HeliosServiceIdentity.swift): `Sources/Shared/HeliosServiceIdentity.swift`
- [XPC trust](https://github.com/snejdik/helios/blob/main/Sources/Shared/XPCTrustRequirement.swift): `Sources/Shared/XPCTrustRequirement.swift`

### Other components

- **Mac user**

## Connections

- Mac user → Menu-bar dashboard: opens dashboard
- Mac user → Main window: opens details
- Menu-bar dashboard → Telemetry view model: shows readings (evidence: `Sources/HeliosApp/StatusItemController.swift`)
- Menu-bar dashboard → Main window: opens (evidence: `Sources/HeliosApp/StatusItemController.swift`)
- Main window → Telemetry view model: uses model (evidence: `Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift`)
- Main window → App preferences: reads settings (evidence: `Sources/HeliosApp/Windows/HeliosWindowCoordinator.swift`)
- Main window → Settings and tools: routes settings (evidence: `Sources/HeliosApp/Windows/HeliosSettings.swift`)
- Telemetry view model → Telemetry providers: samples metrics (evidence: `Sources/HeliosApp/OverviewViewModel.swift`)
- Telemetry view model → Telemetry history: records snapshots (evidence: `Sources/HeliosApp/OverviewViewModel.swift`)
- Telemetry view model → Health and longevity: supports assessment (evidence: `Sources/HeliosApp/OverviewViewModel.swift`)
- Telemetry view model → Health alerts: uses thresholds (evidence: `Sources/HeliosApp/OverviewViewModel.swift`)
- Monitoring pages → Telemetry view model: presents readings (evidence: `Sources/HeliosApp/V2/HeliosStoragePage.swift`)
- Monitoring pages → Reading presentation: formats values (evidence: `Sources/HeliosApp/V2/HeliosStoragePage.swift`)
- Monitoring pages → Network diagnosis: presents diagnosis (evidence: `Sources/HeliosApp/V2/HeliosStoragePage.swift`)
- Monitoring pages → Health and longevity: presents longevity (evidence: `Sources/HeliosApp/V2/HeliosStoragePage.swift`)
- Health alerts → Reading presentation: formats notices (evidence: `Sources/HeliosApp/Telemetry/HealthAlerts.swift`)
- Fan controls → Daemon client: requests control (evidence: `Sources/HeliosApp/FanControlModel.swift`)
- Cooling rules → Fan controls: configures cooling
- Settings and tools → App preferences: configures (evidence: `Sources/HeliosApp/Windows/HeliosSettings.swift`)
- Settings and tools → Daemon service manager: manages helper (evidence: `Sources/HeliosApp/Windows/HeliosSettings.swift`)
- Daemon service manager → Daemon client: connects helper (evidence: `Sources/HeliosApp/DaemonService.swift`)
- Daemon client → Daemon session: sends XPC requests (evidence: `Sources/HeliosDaemon/DaemonSession.swift`)
- Daemon client → XPC trust: checks identity (evidence: `Sources/HeliosApp/DaemonClient.swift`)
- Daemon session → Fan control coordinator: dispatches control (evidence: `Sources/HeliosDaemon/DaemonSession.swift`)
- Fan control coordinator → Fan control engine: coordinates control (evidence: `Sources/HeliosDaemon/FanControlCoordinator.swift`)
- Fan control coordinator → Fan layer runtime: uses fan layer (evidence: `Sources/HeliosDaemon/DaemonSession.swift`)
- Fan layer runtime → Fan layer engine: runs engine (evidence: `Sources/HeliosDaemon/FanLayerRuntime.swift`)
- Fan layer engine → Fan layer policy: applies policy (evidence: `Sources/HeliosDaemon/FanLayerEngine.swift`)
- Fan layer engine → Fan profiles: uses profile (evidence: `Sources/HeliosDaemon/FanLayerEngine.swift`)
- Fan layer runtime → SMC reader: reads hardware (evidence: `Sources/HeliosDaemon/FanLayerRuntime.swift`)
- Daemon client → Service identity: uses service name (evidence: `Sources/HeliosApp/DaemonClient.swift`)
- Daemon session → Service identity: uses service name (evidence: `Sources/HeliosDaemon/DaemonSession.swift`)
