# glacierglimmer/zmd-charge-plus-for-macos architecture

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

- Interactive diagram: https://gitdiagram.com/glacierglimmer/zmd-charge-plus-for-macos
- Repository: https://github.com/glacierglimmer/zmd-charge-plus-for-macos

## Overview

Endfield Charge Plus for macOS is a menu-bar utility with a customizable, animated desktop HUD. Its main workflow loads settings and a HUD profile, collects macOS and configured external data, resolves profile templates into display content, and presents that content in the HUD. The graph also shows profile editing, persistence, native integration, and documented service capabilities. Some subsystem links rely on the README or SOURCE INDEX; unsampled implementation details are not inferred beyond those references.

Main entry points: [`Customization/VariableHub.cs`](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableHub.cs) (Variable collection), [`Settings/SettingsWindow.axaml.cs`](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/SettingsWindow.axaml.cs) (Settings window), [`Customization/CustomHudRuntime.cs`](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/CustomHudRuntime.cs) (HUD runtime), [`App.axaml.cs`](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/App.axaml.cs) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App startup<br/>[App.axaml.cs]"]
  node_settingsui["Settings window"]
  node_hudwindow["HUD window<br/>[HudWindow.axaml.cs]"]
end

subgraph group_hud["HUD and profiles"]
  node_customizer["HUD customizer"]
  node_runtime["HUD runtime"]
  node_renderer["Profile renderer"]
  node_templates["Template engine<br/>[TemplateEngine.cs]"]
  node_animations["HUD animations<br/>[HudAnimations.cs]"]
end

subgraph group_data["Variables and integrations"]
  node_variablehub["Variable collection<br/>[VariableHub.cs]"]
  node_macprovider["macOS variables"]
  node_advanced["Advanced variables"]
  node_catalog["Variable catalog<br/>[VariableCatalog.cs]"]
  node_macatalog["macOS variable catalog"]
  node_external["Network and API services<br/>[VariableHub.cs]"]
end

subgraph group_platform["macOS services"]
  node_native["Native bridge<br/>[MacNative.cs]"]
  node_probe["System probe<br/>[MacSystemProbe.cs]"]
  node_nativeimpl["macOS native services<br/>[ecpmac.m]"]
  node_startup["Login startup<br/>[StartupManager.cs]"]
end

subgraph group_config["Settings and support"]
  node_settings[("Settings persistence<br/>[SettingsManager.cs]")]
  node_profiles["Settings and profiles<br/>[AppSettings.cs]"]
  node_normalize["Settings normalizer"]
  node_secrets["Secret storage<br/>[SecretStore.cs]"]
  node_logger["Application logging<br/>[AppLog.cs]"]
end

node_user(("Mac user"))
node_releases["GitHub Releases"]

node_user -->|"launches"| node_app
node_app -->|"loads settings"| node_settings
node_app -->|"starts runtime"| node_runtime
node_app -.->|"opens settings"| node_settingsui
node_settingsui -.->|"controls HUD"| node_hudwindow
node_settingsui -->|"saves settings"| node_settings
node_settingsui -.->|"edits profiles"| node_customizer
node_settingsui -->|"configures login"| node_startup
node_runtime -->|"uses settings"| node_settings
node_runtime -->|"collects variables"| node_variablehub
node_runtime -->|"normalizes profiles"| node_normalize
node_runtime -->|"renders profiles"| node_renderer
node_runtime -->|"queries system"| node_probe
node_renderer -->|"resolves templates"| node_templates
node_templates -.->|"reads values"| node_variablehub
node_hudwindow -->|"plays animations"| node_animations
node_hudwindow -->|"sets window behavior"| node_native
node_customizer -->|"normalizes profiles"| node_normalize
node_customizer -->|"previews profiles"| node_renderer
node_customizer -->|"checks availability"| node_macatalog
node_customizer -->|"browses variables"| node_catalog
node_variablehub -->|"collects macOS data"| node_macprovider
node_variablehub -->|"collects advanced data"| node_advanced
node_variablehub -->|"uses definitions"| node_catalog
node_variablehub -->|"queries services"| node_external
node_macatalog -->|"detects variables"| node_macprovider
node_macprovider -->|"reads native metrics"| node_native
node_native -->|"invokes native API"| node_nativeimpl
node_probe -->|"uses native bridge"| node_native
node_variablehub -->|"reads credentials"| node_secrets
node_secrets -.->|"uses Keychain"| node_native
node_settings -->|"normalizes settings"| node_normalize
node_settings -->|"loads and saves"| node_profiles
node_app -->|"initializes logging"| node_logger
node_settingsui -.->|"checks updates"| node_releases

click node_app "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/App.axaml.cs"
click node_settingsui "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/SettingsWindow.axaml.cs"
click node_hudwindow "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Views/HudWindow.axaml.cs"
click node_customizer "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudCustomizerView.axaml.cs"
click node_runtime "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/CustomHudRuntime.cs"
click node_renderer "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudProfileRenderer.cs"
click node_templates "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/TemplateEngine.cs"
click node_animations "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Animations/HudAnimations.cs"
click node_variablehub "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableHub.cs"
click node_macprovider "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/MacVariableProvider.cs"
click node_advanced "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/AdvancedVariableProvider.cs"
click node_catalog "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableCatalog.cs"
click node_macatalog "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/MacVariableCatalog.cs"
click node_external "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableHub.cs"
click node_settings "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/SettingsManager.cs"
click node_profiles "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/AppSettings.cs"
click node_normalize "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudSettingsNormalizer.cs"
click node_secrets "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/SecretStore.cs"
click node_native "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Interop/MacNative.cs"
click node_probe "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Interop/MacSystemProbe.cs"
click node_nativeimpl "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/native/ecpmac.m"
click node_startup "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/StartupManager.cs"
click node_logger "https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Diagnostics/AppLog.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_app,node_settingsui,node_hudwindow,node_user toneBlue
class node_customizer,node_runtime,node_renderer,node_templates,node_animations toneAmber
class node_variablehub,node_macprovider,node_advanced,node_catalog,node_macatalog,node_external toneMint
class node_native,node_probe,node_nativeimpl,node_startup toneRose
class node_settings,node_profiles,node_normalize,node_secrets,node_logger,node_releases toneIndigo
```

## Components

### Application shell

- [App startup](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/App.axaml.cs): `App.axaml.cs`
- [Settings window](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/SettingsWindow.axaml.cs): `Settings/SettingsWindow.axaml.cs`
- [HUD window](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Views/HudWindow.axaml.cs): `Views/HudWindow.axaml.cs`

### HUD and profiles

- [HUD customizer](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudCustomizerView.axaml.cs): `Customization/HudCustomizerView.axaml.cs`
- [HUD runtime](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/CustomHudRuntime.cs): `Customization/CustomHudRuntime.cs`
- [Profile renderer](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudProfileRenderer.cs): `Customization/HudProfileRenderer.cs`
- [Template engine](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/TemplateEngine.cs): `Customization/TemplateEngine.cs`
- [HUD animations](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Animations/HudAnimations.cs): `Animations/HudAnimations.cs`

### Variables and integrations

- [Variable collection](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableHub.cs): `Customization/VariableHub.cs`
- [macOS variables](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/MacVariableProvider.cs): `Customization/MacVariableProvider.cs`
- [Advanced variables](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/AdvancedVariableProvider.cs): `Customization/AdvancedVariableProvider.cs`
- [Variable catalog](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableCatalog.cs): `Customization/VariableCatalog.cs`
- [macOS variable catalog](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/MacVariableCatalog.cs): `Customization/MacVariableCatalog.cs`
- [Network and API services](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/VariableHub.cs): `Customization/VariableHub.cs`

### macOS services

- [Native bridge](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Interop/MacNative.cs): `Interop/MacNative.cs`
- [System probe](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Interop/MacSystemProbe.cs): `Interop/MacSystemProbe.cs`
- [macOS native services](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/native/ecpmac.m): `native/ecpmac.m`
- [Login startup](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/StartupManager.cs): `Settings/StartupManager.cs`

### Settings and support

- [Settings persistence](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/SettingsManager.cs): `Settings/SettingsManager.cs`
- [Settings and profiles](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Settings/AppSettings.cs): `Settings/AppSettings.cs`
- [Settings normalizer](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/HudSettingsNormalizer.cs): `Customization/HudSettingsNormalizer.cs`
- [Secret storage](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Customization/SecretStore.cs): `Customization/SecretStore.cs`
- [Application logging](https://github.com/glacierglimmer/zmd-charge-plus-for-macos/blob/main/Diagnostics/AppLog.cs): `Diagnostics/AppLog.cs`

### Other components

- **Mac user**
- **GitHub Releases**

## Connections

- Mac user → App startup: launches (evidence: `README.md`)
- App startup → Settings persistence: loads settings (evidence: `App.axaml.cs`)
- App startup → HUD runtime: starts runtime (evidence: `App.axaml.cs`)
- App startup → Settings window: opens settings
- Settings window → HUD window: controls HUD
- Settings window → Settings persistence: saves settings (evidence: `Settings/SettingsWindow.axaml.cs`)
- Settings window → HUD customizer: edits profiles
- Settings window → Login startup: configures login (evidence: `Settings/SettingsWindow.axaml.cs`)
- HUD runtime → Settings persistence: uses settings (evidence: `App.axaml.cs`)
- HUD runtime → Variable collection: collects variables (evidence: `Customization/CustomHudRuntime.cs`)
- HUD runtime → Settings normalizer: normalizes profiles (evidence: `Customization/CustomHudRuntime.cs`)
- HUD runtime → Profile renderer: renders profiles (evidence: `Customization/CustomHudRuntime.cs`)
- HUD runtime → System probe: queries system (evidence: `Customization/CustomHudRuntime.cs`)
- Profile renderer → Template engine: resolves templates (evidence: `Customization/HudProfileRenderer.cs`)
- Template engine → Variable collection: reads values
- HUD window → HUD animations: plays animations (evidence: `Views/HudWindow.axaml.cs`)
- HUD window → Native bridge: sets window behavior (evidence: `Views/HudWindow.axaml.cs`)
- HUD customizer → Settings normalizer: normalizes profiles (evidence: `Customization/HudCustomizerView.axaml.cs`)
- HUD customizer → Profile renderer: previews profiles (evidence: `Customization/HudCustomizerView.axaml.cs`)
- HUD customizer → macOS variable catalog: checks availability (evidence: `Customization/HudCustomizerView.axaml.cs`)
- HUD customizer → Variable catalog: browses variables (evidence: `Customization/HudCustomizerView.axaml.cs`)
- Variable collection → macOS variables: collects macOS data (evidence: `Customization/VariableHub.cs`)
- Variable collection → Advanced variables: collects advanced data (evidence: `Customization/VariableHub.cs`)
- Variable collection → Variable catalog: uses definitions (evidence: `Customization/VariableHub.cs`)
- Variable collection → Network and API services: queries services (evidence: `README.md`)
- macOS variable catalog → macOS variables: detects variables (evidence: `Customization/MacVariableCatalog.cs`)
- macOS variables → Native bridge: reads native metrics (evidence: `Customization/MacVariableProvider.cs`)
- Native bridge → macOS native services: invokes native API (evidence: `Interop/MacNative.cs`)
- System probe → Native bridge: uses native bridge (evidence: `Interop/MacSystemProbe.cs`)
- Variable collection → Secret storage: reads credentials (evidence: `Customization/VariableHub.cs`)
- Secret storage → Native bridge: uses Keychain (evidence: `README.md`)
- Settings persistence → Settings normalizer: normalizes settings (evidence: `Settings/SettingsManager.cs`)
- Settings persistence → Settings and profiles: loads and saves (evidence: `Settings/SettingsManager.cs`)
- App startup → Application logging: initializes logging (evidence: `App.axaml.cs`)
- Settings window → GitHub Releases: checks updates (evidence: `README.md`)
