# zeiteigen/wiihealth architecture

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

- Interactive diagram: https://gitdiagram.com/zeiteigen/wiihealth
- Repository: https://github.com/zeiteigen/wiihealth

## Overview

Sunroom TV is a browser-based, TV-friendly exercise prototype, with a phone controller, optional ESP32 wristband, and a gallery of 15 preserved concepts. The main flow is participant/workout selection, movement and vital-sign monitoring, dose progress, safety prompts, then celebration and summary; social club features extend that flow. The excerpts show the TV app’s internal module dependencies and the local relay, while README statements support the controller and firmware integrations. Other design concepts and firmware internals were not sampled, so their links are limited to documented relationships.

Main entry points: [`designs/14-tv-tenfoot/app.js`](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js) (TV experience), [`designs/launch.py`](https://github.com/zeiteigen/wiihealth/blob/main/designs/launch.py) (Local relay), [`designs/gallery.js`](https://github.com/zeiteigen/wiihealth/blob/main/designs/gallery.js) (Concept gallery), [`designs/controller`](https://github.com/zeiteigen/wiihealth/tree/main/designs/controller) (Phone controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tv["Sunroom TV"]
  node_participant["Participant and plan<br/>[app.js]"]
  node_exercise["Exercise session<br/>[app.js]"]
  node_dose["Dose and progress<br/>[app.js]"]
  node_safety["Safety moments<br/>[app.js]"]
  node_rewards["Games and rewards<br/>[app.js]"]
  node_summary["Summary and club<br/>[app.js]"]
  node_tvapp["TV experience<br/>[app.js]"]
  node_panels["Control panels<br/>[panels.js]"]
end

subgraph group_sensing["Movement and sensing"]
  node_simulation["Signal simulation<br/>[sensor.js]"]
  node_liveinput["Live signal handling<br/>[band.js]"]
  node_visuals["Exercise visuals<br/>[graphics.js]"]
end

subgraph group_remote["Remote and gallery"]
  node_gallery["Concept gallery<br/>[gallery.js]"]
  node_concepts["15 design concepts"]
  node_phone["Phone controller"]
  node_relay["Local relay<br/>[launch.py]"]
end

subgraph group_hardware["Wristband"]
  node_band["ESP32 wristband<br/>[sunroom_band.ino]"]
end

node_user(("Participant"))
node_browser["Chrome or Edge"]

node_user -->|"uses"| node_tvapp
node_tvapp -->|"selects"| node_participant
node_tvapp -->|"runs"| node_exercise
node_tvapp -->|"tracks"| node_dose
node_tvapp -->|"raises"| node_safety
node_tvapp -->|"renders"| node_rewards
node_tvapp -->|"renders"| node_summary
node_tvapp -->|"advances"| node_simulation
node_tvapp -->|"uses"| node_liveinput
node_tvapp -->|"imports"| node_visuals
node_tvapp -->|"sets up"| node_panels
node_user -->|"browses"| node_gallery
node_gallery -->|"previews"| node_concepts
node_user -->|"controls"| node_phone
node_phone -->|"sends commands"| node_relay
node_relay -->|"relays commands"| node_tvapp
node_tvapp -->|"posts state"| node_relay
node_browser -->|"connects by USB or Bluetooth"| node_band
node_band -->|"sends readings"| node_liveinput

click node_participant "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_exercise "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_dose "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_safety "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_rewards "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_summary "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_tvapp "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js"
click node_simulation "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/sensor.js"
click node_liveinput "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/band.js"
click node_visuals "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/graphics.js"
click node_panels "https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/panels.js"
click node_gallery "https://github.com/zeiteigen/wiihealth/blob/main/designs/gallery.js"
click node_concepts "https://github.com/zeiteigen/wiihealth/tree/main/designs"
click node_phone "https://github.com/zeiteigen/wiihealth/tree/main/designs/controller"
click node_relay "https://github.com/zeiteigen/wiihealth/blob/main/designs/launch.py"
click node_band "https://github.com/zeiteigen/wiihealth/blob/main/firmware/sunroom_band/sunroom_band.ino"

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_participant,node_exercise,node_dose,node_safety,node_rewards,node_summary,node_tvapp,node_panels toneBlue
class node_simulation,node_liveinput,node_visuals toneAmber
class node_gallery,node_concepts,node_phone,node_relay toneMint
class node_band toneRose
class node_user,node_browser toneIndigo
```

## Components

### Sunroom TV

- [Participant and plan](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Exercise session](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Dose and progress](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Safety moments](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Games and rewards](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Summary and club](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [TV experience](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/app.js): `designs/14-tv-tenfoot/app.js`
- [Control panels](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/panels.js): `designs/14-tv-tenfoot/panels.js`

### Movement and sensing

- [Signal simulation](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/sensor.js): `designs/14-tv-tenfoot/sensor.js`
- [Live signal handling](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/band.js): `designs/14-tv-tenfoot/band.js`
- [Exercise visuals](https://github.com/zeiteigen/wiihealth/blob/main/designs/14-tv-tenfoot/graphics.js): `designs/14-tv-tenfoot/graphics.js`

### Remote and gallery

- [Concept gallery](https://github.com/zeiteigen/wiihealth/blob/main/designs/gallery.js): `designs/gallery.js`
- [15 design concepts](https://github.com/zeiteigen/wiihealth/tree/main/designs): `designs`
- [Phone controller](https://github.com/zeiteigen/wiihealth/tree/main/designs/controller): `designs/controller`
- [Local relay](https://github.com/zeiteigen/wiihealth/blob/main/designs/launch.py): `designs/launch.py`

### Wristband

- [ESP32 wristband](https://github.com/zeiteigen/wiihealth/blob/main/firmware/sunroom_band/sunroom_band.ino): `firmware/sunroom_band/sunroom_band.ino`

### Other components

- **Participant**
- **Chrome or Edge**

## Connections

- Participant → TV experience: uses (evidence: `README.md`)
- TV experience → Participant and plan: selects (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Exercise session: runs (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Dose and progress: tracks (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Safety moments: raises (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Games and rewards: renders (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Summary and club: renders (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Signal simulation: advances (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Live signal handling: uses (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Exercise visuals: imports (evidence: `designs/14-tv-tenfoot/app.js`)
- TV experience → Control panels: sets up (evidence: `designs/14-tv-tenfoot/app.js`)
- Participant → Concept gallery: browses (evidence: `README.md`)
- Concept gallery → 15 design concepts: previews (evidence: `designs/gallery.js`)
- Participant → Phone controller: controls (evidence: `README.md`)
- Phone controller → Local relay: sends commands (evidence: `designs/launch.py`)
- Local relay → TV experience: relays commands (evidence: `designs/launch.py`)
- TV experience → Local relay: posts state (evidence: `designs/launch.py`)
- Chrome or Edge → ESP32 wristband: connects by USB or Bluetooth (evidence: `README.md`)
- ESP32 wristband → Live signal handling: sends readings (evidence: `README.md`)
