# miguotw/halobattery architecture

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

- Interactive diagram: https://gitdiagram.com/miguotw/halobattery
- Repository: https://github.com/miguotw/halobattery

## Overview

Halo Battery is a Windows system-tray app that reads battery state from supported wireless peripherals and controllers, then presents per-device icons, status, and controls. The README documents the user workflow and major features; sampled provider code confirms HID and Bluetooth reading patterns, but the tree has no obvious application entry-point module. Accordingly, orchestration between providers and the tray UI is not asserted. Provider-to-helper links are limited to relationships identified in the SOURCE INDEX.

Main entry points: [`providers/base.py`](https://github.com/miguotw/halobattery/blob/main/providers/base.py) (Provider status model), [`providers/hidlist.py`](https://github.com/miguotw/halobattery/blob/main/providers/hidlist.py) (HID discovery), [`flyout.py`](https://github.com/miguotw/halobattery/blob/main/flyout.py) (Tray menu), [`providers/audeze.py`](https://github.com/miguotw/halobattery/blob/main/providers/audeze.py) (Audeze reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Tray interface"]
  node_tray["Device tray icons<br/>[icons.py]"]
  node_menu["Tray menu<br/>[flyout.py]"]
end

subgraph group_device_readers["Device readers"]
  node_hid_readers["HID device readers"]
  node_bluetooth_reader["Bluetooth reader<br/>[bluetooth.py]"]
  node_xinput_reader["XInput reader<br/>[xinput.py]"]
  node_playstation_reader["PlayStation reader<br/>[playstation.py]"]
  node_nintendo_reader["Nintendo reader<br/>[nintendo.py]"]
  node_eightbitdo_reader["8BitDo reader<br/>[eightbitdo.py]"]
  node_logitech_reader["Logitech reader<br/>[logitech.py]"]
  node_razer_reader["Razer reader<br/>[razer.py]"]
  node_steelseries_reader["SteelSeries reader<br/>[steelseries.py]"]
  node_audeze_reader["Audeze reader<br/>[audeze.py]"]
  node_corsair_reader["Corsair reader<br/>[corsair.py]"]
  node_mchose_reader["MCHOSE reader<br/>[mchose.py]"]
  node_wlmouse_reader["WLmouse reader<br/>[wlmouse.py]"]
  node_other_readers["Other device readers"]
end

subgraph group_shared_reading["Reader infrastructure"]
  node_provider_contract["Provider status model<br/>[base.py]"]
  node_hid_discovery["HID discovery<br/>[hidlist.py]"]
end

subgraph group_support_features["User features"]
  node_history["Usage history<br/>[history.py]"]
  node_localization["Localization<br/>[i18n.py]"]
  node_update_check["Update checks<br/>[updates.py]"]
  node_windows_events["Windows events<br/>[winevents.py]"]
end

node_user(("Windows user"))
node_windows_devices(("Windows devices"))
node_releases(("Project releases"))

node_user -->|"views status"| node_tray
node_user -->|"opens controls"| node_menu
node_windows_devices -->|"provides HID data"| node_hid_readers
node_windows_devices -->|"provides Bluetooth data"| node_bluetooth_reader
node_windows_devices -->|"provides controller reports"| node_xinput_reader
node_hid_readers -->|"uses discovery"| node_hid_discovery
node_audeze_reader -->|"uses discovery"| node_hid_discovery
node_steelseries_reader -->|"uses discovery"| node_hid_discovery
node_razer_reader -->|"uses discovery"| node_hid_discovery
node_logitech_reader -->|"uses discovery"| node_hid_discovery
node_wlmouse_reader -->|"uses discovery"| node_hid_discovery
node_xinput_reader -->|"uses discovery"| node_hid_discovery
node_audeze_reader -->|"implements"| node_provider_contract
node_bluetooth_reader -->|"implements"| node_provider_contract
node_xinput_reader -->|"implements"| node_provider_contract
node_playstation_reader -->|"implements"| node_provider_contract
node_nintendo_reader -->|"implements"| node_provider_contract
node_eightbitdo_reader -->|"implements"| node_provider_contract
node_logitech_reader -->|"implements"| node_provider_contract
node_razer_reader -->|"implements"| node_provider_contract
node_steelseries_reader -->|"implements"| node_provider_contract
node_audeze_reader -->|"implements"| node_provider_contract
node_corsair_reader -->|"implements"| node_provider_contract
node_mchose_reader -->|"implements"| node_provider_contract
node_wlmouse_reader -->|"implements"| node_provider_contract
node_other_readers -.->|"shares provider API"| node_provider_contract
node_menu -.->|"shows translations"| node_localization
node_menu -.->|"offers usage estimates"| node_history
node_menu -.->|"offers update"| node_update_check
node_update_check -->|"checks releases"| node_releases

click node_tray "https://github.com/miguotw/halobattery/blob/main/icons.py"
click node_menu "https://github.com/miguotw/halobattery/blob/main/flyout.py"
click node_hid_readers "https://github.com/miguotw/halobattery/tree/main/providers"
click node_bluetooth_reader "https://github.com/miguotw/halobattery/blob/main/providers/bluetooth.py"
click node_xinput_reader "https://github.com/miguotw/halobattery/blob/main/providers/xinput.py"
click node_playstation_reader "https://github.com/miguotw/halobattery/blob/main/providers/playstation.py"
click node_nintendo_reader "https://github.com/miguotw/halobattery/blob/main/providers/nintendo.py"
click node_eightbitdo_reader "https://github.com/miguotw/halobattery/blob/main/providers/eightbitdo.py"
click node_logitech_reader "https://github.com/miguotw/halobattery/blob/main/providers/logitech.py"
click node_razer_reader "https://github.com/miguotw/halobattery/blob/main/providers/razer.py"
click node_steelseries_reader "https://github.com/miguotw/halobattery/blob/main/providers/steelseries.py"
click node_audeze_reader "https://github.com/miguotw/halobattery/blob/main/providers/audeze.py"
click node_corsair_reader "https://github.com/miguotw/halobattery/blob/main/providers/corsair.py"
click node_mchose_reader "https://github.com/miguotw/halobattery/blob/main/providers/mchose.py"
click node_wlmouse_reader "https://github.com/miguotw/halobattery/blob/main/providers/wlmouse.py"
click node_other_readers "https://github.com/miguotw/halobattery/tree/main/providers"
click node_provider_contract "https://github.com/miguotw/halobattery/blob/main/providers/base.py"
click node_hid_discovery "https://github.com/miguotw/halobattery/blob/main/providers/hidlist.py"
click node_history "https://github.com/miguotw/halobattery/blob/main/history.py"
click node_localization "https://github.com/miguotw/halobattery/blob/main/i18n.py"
click node_update_check "https://github.com/miguotw/halobattery/blob/main/updates.py"
click node_windows_events "https://github.com/miguotw/halobattery/blob/main/winevents.py"

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_tray,node_menu,node_user toneBlue
class node_hid_readers,node_bluetooth_reader,node_xinput_reader,node_playstation_reader,node_nintendo_reader,node_eightbitdo_reader,node_logitech_reader,node_razer_reader,node_steelseries_reader,node_audeze_reader,node_corsair_reader,node_mchose_reader,node_wlmouse_reader,node_other_readers toneAmber
class node_provider_contract,node_hid_discovery toneMint
class node_history,node_localization,node_update_check,node_windows_events toneRose
class node_windows_devices,node_releases toneIndigo
```

## Components

### Tray interface

- [Device tray icons](https://github.com/miguotw/halobattery/blob/main/icons.py): `icons.py`
- [Tray menu](https://github.com/miguotw/halobattery/blob/main/flyout.py): `flyout.py`

### Device readers

- [HID device readers](https://github.com/miguotw/halobattery/tree/main/providers): `providers`
- [Bluetooth reader](https://github.com/miguotw/halobattery/blob/main/providers/bluetooth.py): `providers/bluetooth.py`
- [XInput reader](https://github.com/miguotw/halobattery/blob/main/providers/xinput.py): `providers/xinput.py`
- [PlayStation reader](https://github.com/miguotw/halobattery/blob/main/providers/playstation.py): `providers/playstation.py`
- [Nintendo reader](https://github.com/miguotw/halobattery/blob/main/providers/nintendo.py): `providers/nintendo.py`
- [8BitDo reader](https://github.com/miguotw/halobattery/blob/main/providers/eightbitdo.py): `providers/eightbitdo.py`
- [Logitech reader](https://github.com/miguotw/halobattery/blob/main/providers/logitech.py): `providers/logitech.py`
- [Razer reader](https://github.com/miguotw/halobattery/blob/main/providers/razer.py): `providers/razer.py`
- [SteelSeries reader](https://github.com/miguotw/halobattery/blob/main/providers/steelseries.py): `providers/steelseries.py`
- [Audeze reader](https://github.com/miguotw/halobattery/blob/main/providers/audeze.py): `providers/audeze.py`
- [Corsair reader](https://github.com/miguotw/halobattery/blob/main/providers/corsair.py): `providers/corsair.py`
- [MCHOSE reader](https://github.com/miguotw/halobattery/blob/main/providers/mchose.py): `providers/mchose.py`
- [WLmouse reader](https://github.com/miguotw/halobattery/blob/main/providers/wlmouse.py): `providers/wlmouse.py`
- [Other device readers](https://github.com/miguotw/halobattery/tree/main/providers): `providers`

### Reader infrastructure

- [Provider status model](https://github.com/miguotw/halobattery/blob/main/providers/base.py): `providers/base.py`
- [HID discovery](https://github.com/miguotw/halobattery/blob/main/providers/hidlist.py): `providers/hidlist.py`

### User features

- [Usage history](https://github.com/miguotw/halobattery/blob/main/history.py): `history.py`
- [Localization](https://github.com/miguotw/halobattery/blob/main/i18n.py): `i18n.py`
- [Update checks](https://github.com/miguotw/halobattery/blob/main/updates.py): `updates.py`
- [Windows events](https://github.com/miguotw/halobattery/blob/main/winevents.py): `winevents.py`

### Other components

- **Windows user**
- **Windows devices**
- **Project releases**

## Connections

- Windows user → Device tray icons: views status (evidence: `README.md`)
- Windows user → Tray menu: opens controls (evidence: `README.md`)
- Windows devices → HID device readers: provides HID data (evidence: `README.md`)
- Windows devices → Bluetooth reader: provides Bluetooth data (evidence: `README.md`)
- Windows devices → XInput reader: provides controller reports (evidence: `README.md`)
- HID device readers → HID discovery: uses discovery (evidence: `providers/audeze.py`)
- Audeze reader → HID discovery: uses discovery (evidence: `providers/audeze.py`)
- SteelSeries reader → HID discovery: uses discovery (evidence: `providers/steelseries.py`)
- Razer reader → HID discovery: uses discovery (evidence: `providers/razer.py`)
- Logitech reader → HID discovery: uses discovery (evidence: `providers/logitech.py`)
- WLmouse reader → HID discovery: uses discovery (evidence: `providers/wlmouse.py`)
- XInput reader → HID discovery: uses discovery (evidence: `providers/xinput.py`)
- Audeze reader → Provider status model: implements (evidence: `providers/audeze.py`)
- Bluetooth reader → Provider status model: implements (evidence: `providers/bluetooth.py`)
- XInput reader → Provider status model: implements (evidence: `providers/xinput.py`)
- PlayStation reader → Provider status model: implements (evidence: `providers/playstation.py`)
- Nintendo reader → Provider status model: implements (evidence: `providers/nintendo.py`)
- 8BitDo reader → Provider status model: implements (evidence: `providers/eightbitdo.py`)
- Logitech reader → Provider status model: implements (evidence: `providers/logitech.py`)
- Razer reader → Provider status model: implements (evidence: `providers/razer.py`)
- SteelSeries reader → Provider status model: implements (evidence: `providers/steelseries.py`)
- Audeze reader → Provider status model: implements (evidence: `providers/audeze.py`)
- Corsair reader → Provider status model: implements (evidence: `providers/corsair.py`)
- MCHOSE reader → Provider status model: implements (evidence: `providers/mchose.py`)
- WLmouse reader → Provider status model: implements (evidence: `providers/wlmouse.py`)
- Other device readers → Provider status model: shares provider API (evidence: `providers/audeze.py`)
- Tray menu → Localization: shows translations
- Tray menu → Usage history: offers usage estimates
- Tray menu → Update checks: offers update
- Update checks → Project releases: checks releases (evidence: `README.md`)
