# 0xv1nc3nt/lighthost architecture

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

## Overview

Light Host is a tray/menu-bar VST3/AU host. Its main workflow is to discover or select plugins, place them in a serial audio chain, and process audio between the chosen device and output; users manage the chain and saved configurations through the tray menu or Control Panel. The sampled code shows the chain, persistence, UI callbacks, and denormal-safe graph. Audio-device and plugin hosting capabilities are documented, but their full runtime wiring is not shown in the excerpts.

Main entry points: [`Source/IconMenu.cpp`](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp) (Chain Control), [`Source/ControlPanelWindow.cpp`](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/ControlPanelWindow.cpp) (Control Panel), [`Source/IconMenu.h`](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.h) (Audio Graph), [`Source/PluginChainListBox.cpp`](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/PluginChainListBox.cpp) (Chain List)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application"]
  node_startup["Host Startup<br/>[HostStartup.cpp]"]
end

subgraph group_ui["User Interface"]
  node_tray["Tray Menu<br/>[IconMenu.cpp]"]
  node_panel["Control Panel"]
  node_chain_list["Chain List"]
  node_plugin_windows["Plugin Windows<br/>[PluginWindow.cpp]"]
end

subgraph group_audio["Audio Hosting"]
  node_plugin_catalog["Plugin Catalog<br/>[IconMenu.cpp]"]
  node_audio_graph["Audio Graph<br/>[IconMenu.h]"]
end

subgraph group_state["Chain and Settings"]
  node_chain_control["Chain Control<br/>[IconMenu.cpp]"]
  node_config["Chain Configurations<br/>[IconMenu.cpp]"]
  node_settings[("Saved Settings<br/>[HostStartup.cpp]")]
end

node_user(("User"))
node_plugin["Hosted Plugins"]
node_audio_device["Audio Devices"]

node_user -->|"uses"| node_tray
node_user -->|"manages chain"| node_panel
node_startup -->|"creates"| node_tray
node_panel -->|"invokes actions"| node_chain_control
node_tray -->|"dispatches actions"| node_chain_control
node_panel -->|"displays chain"| node_chain_list
node_chain_list -->|"sends edit requests"| node_chain_control
node_panel -->|"selects plugins"| node_plugin_catalog
node_tray -->|"selects plugins"| node_plugin_catalog
node_chain_control -->|"builds chain"| node_audio_graph
node_audio_graph -->|"hosts serially"| node_plugin
node_audio_device -->|"supplies audio"| node_audio_graph
node_audio_graph -->|"outputs audio"| node_audio_device
node_chain_control -->|"loads and saves"| node_settings
node_chain_control -->|"imports and exports"| node_config
node_chain_control -.->|"opens editors"| node_plugin_windows

click node_startup "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/HostStartup.cpp"
click node_tray "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp"
click node_panel "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/ControlPanelWindow.cpp"
click node_chain_list "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/PluginChainListBox.cpp"
click node_chain_control "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp"
click node_plugin_catalog "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp"
click node_audio_graph "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.h"
click node_plugin_windows "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/PluginWindow.cpp"
click node_config "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp"
click node_settings "https://github.com/0xv1nc3nt/lighthost/blob/master/Source/HostStartup.cpp"

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_startup,node_user toneBlue
class node_tray,node_panel,node_chain_list,node_plugin_windows toneAmber
class node_plugin_catalog,node_audio_graph toneMint
class node_chain_control,node_config,node_settings toneRose
class node_plugin,node_audio_device toneIndigo
```

## Components

### Application

- [Host Startup](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/HostStartup.cpp): `Source/HostStartup.cpp`

### User Interface

- [Tray Menu](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp): `Source/IconMenu.cpp`
- [Control Panel](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/ControlPanelWindow.cpp): `Source/ControlPanelWindow.cpp`
- [Chain List](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/PluginChainListBox.cpp): `Source/PluginChainListBox.cpp`
- [Plugin Windows](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/PluginWindow.cpp): `Source/PluginWindow.cpp`

### Audio Hosting

- [Plugin Catalog](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp): `Source/IconMenu.cpp`
- [Audio Graph](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.h): `Source/IconMenu.h`

### Chain and Settings

- [Chain Control](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp): `Source/IconMenu.cpp`
- [Chain Configurations](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/IconMenu.cpp): `Source/IconMenu.cpp`
- [Saved Settings](https://github.com/0xv1nc3nt/lighthost/blob/master/Source/HostStartup.cpp): `Source/HostStartup.cpp`

### Other components

- **User**
- **Hosted Plugins**
- **Audio Devices**

## Connections

- User → Tray Menu: uses (evidence: `readme.md`)
- User → Control Panel: manages chain (evidence: `readme.md`)
- Host Startup → Tray Menu: creates (evidence: `Source/HostStartup.cpp`)
- Control Panel → Chain Control: invokes actions (evidence: `Source/ControlPanelWindow.cpp`)
- Tray Menu → Chain Control: dispatches actions (evidence: `Source/IconMenu.cpp`)
- Control Panel → Chain List: displays chain (evidence: `Source/ControlPanelWindow.cpp`)
- Chain List → Chain Control: sends edit requests (evidence: `Source/PluginChainListBox.cpp`)
- Control Panel → Plugin Catalog: selects plugins (evidence: `Source/ControlPanelWindow.cpp`)
- Tray Menu → Plugin Catalog: selects plugins (evidence: `Source/IconMenu.cpp`)
- Chain Control → Audio Graph: builds chain (evidence: `Source/IconMenu.cpp`)
- Audio Graph → Hosted Plugins: hosts serially (evidence: `readme.md`)
- Audio Devices → Audio Graph: supplies audio (evidence: `readme.md`)
- Audio Graph → Audio Devices: outputs audio (evidence: `readme.md`)
- Chain Control → Saved Settings: loads and saves (evidence: `Source/IconMenu.cpp`)
- Chain Control → Chain Configurations: imports and exports (evidence: `Source/IconMenu.cpp`)
- Chain Control → Plugin Windows: opens editors
