# yakuda-stack/osc-dreamchatbox architecture

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

- Interactive diagram: https://gitdiagram.com/yakuda-stack/osc-dreamchatbox
- Repository: https://github.com/yakuda-stack/osc-dreamchatbox

## Overview

OSC-DreamChatbox is a native desktop companion for sending configured chatbox content to VRChat. Users configure status, media, hardware, and custom content in the app; the main window coordinates runtime services, and OSC sends the resulting chatbox updates. Separate branches cover speech and translation, discovery/input, plugins, profiles, themes, and terminal operation. Some branches are documented by the README or indexed imports rather than shown call sites, so the graph avoids asserting unsampled implementation links.

Main entry points: [`ui/mainwindow.py`](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/mainwindow.py) (Main window), [`core/speechtotext.py`](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/speechtotext.py) (Speech recognition), [`core/translators.py`](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/translators.py) (Translation services), [`core/plugins.py`](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/plugins.py) (Plugin manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Chatbox content"]
  node_status["Personal status<br/>[apps_page.py]"]
  node_media["Now playing<br/>[apps_page.py]"]
  node_hardware["Hardware stats<br/>[apps_page.py]"]
  node_aio["Combined layouts<br/>[aio_edit.py]"]
  node_custombox["Custom box<br/>[custom_box.py]"]
  node_graphui["Node canvas<br/>[nodegraph.py]"]
  node_grapheval["Node evaluation<br/>[nodegraph_eval.py]"]
  node_afk["AFK handling<br/>[afk.py]"]
end

subgraph group_runtime["Runtime services"]
  node_main["Main window<br/>[mainwindow.py]"]
  node_oscquery["OSCQuery discovery<br/>[oscquery.py]"]
  node_oscin["OSC input<br/>[oscin.py]"]
end

subgraph group_speech["Speech and translation"]
  node_stt["Speech recognition<br/>[speechtotext.py]"]
  node_mic["Microphone groups<br/>[micgroups.py]"]
  node_pactl["PipeWire audio<br/>[mic_pactl.py]"]
  node_translate["Translation services<br/>[translators.py]"]
  node_ai["AI translation<br/>[ai_translator.py]"]
  node_customtranslate["Custom translation"]
end

subgraph group_app["App and extensions"]
  node_pluginui["Plugin page<br/>[plugins_page.py]"]
  node_plugins["Plugin manager<br/>[plugins.py]"]
  node_store["Plugin store<br/>[plugin_store.py]"]
  node_options["Options and themes<br/>[options_page.py]"]
  node_profiles["Profiles<br/>[profiles.py]"]
  node_headless["Terminal mode<br/>[headless.py]"]
  node_storage["Atomic file writes<br/>[atomicfile.py]"]
end

node_user(("User"))
node_vrchat(("VRChat"))

node_user -->|"configures"| node_main
node_main -->|"offers"| node_status
node_main -->|"offers"| node_media
node_main -->|"offers"| node_hardware
node_main -->|"offers"| node_aio
node_main -->|"offers"| node_custombox
node_main -->|"offers"| node_graphui
node_graphui -.->|"evaluates"| node_grapheval
node_main -->|"coordinates"| node_afk
node_main -->|"starts"| node_oscquery
node_oscquery -->|"discovers"| node_vrchat
node_vrchat -->|"sends parameters"| node_oscin
node_main -->|"coordinates"| node_oscin
node_main -->|"coordinates"| node_stt
node_stt -->|"uses devices"| node_mic
node_mic -->|"queries audio"| node_pactl
node_stt -->|"translates speech"| node_translate
node_translate -->|"uses backend"| node_ai
node_translate -->|"uses backend"| node_customtranslate
node_main -->|"loads enabled"| node_plugins
node_pluginui -->|"manages packages"| node_store
node_pluginui -->|"manages plugins"| node_plugins
node_main -->|"offers"| node_options
node_main -->|"supports profiles"| node_profiles
node_main -->|"supports terminal mode"| node_headless
node_profiles -->|"persists through"| node_storage
node_plugins -->|"persists through"| node_storage
node_status -->|"sends chatbox text"| node_vrchat
node_media -->|"sends chatbox text"| node_vrchat
node_hardware -->|"sends chatbox text"| node_vrchat
node_aio -->|"sends combined text"| node_vrchat
node_custombox -->|"frames chatbox"| node_vrchat
node_afk -->|"uses AFK parameter"| node_vrchat

click node_main "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/mainwindow.py"
click node_status "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py"
click node_media "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py"
click node_hardware "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py"
click node_aio "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/aio_edit.py"
click node_custombox "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/custom_box.py"
click node_graphui "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/nodegraph.py"
click node_grapheval "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/nodegraph_eval.py"
click node_afk "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/afk.py"
click node_oscquery "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/oscquery.py"
click node_oscin "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/oscin.py"
click node_stt "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/speechtotext.py"
click node_mic "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/micgroups.py"
click node_pactl "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/backends/mic_pactl.py"
click node_translate "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/translators.py"
click node_ai "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/ai_translator.py"
click node_customtranslate "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/custom_translator.py"
click node_pluginui "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/plugins_page.py"
click node_plugins "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/plugins.py"
click node_store "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/plugin_store.py"
click node_options "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/options_page.py"
click node_profiles "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/profiles.py"
click node_headless "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/headless.py"
click node_storage "https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/atomicfile.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_status,node_media,node_hardware,node_aio,node_custombox,node_graphui,node_grapheval,node_afk,node_user toneBlue
class node_main,node_oscquery,node_oscin toneAmber
class node_stt,node_mic,node_pactl,node_translate,node_ai,node_customtranslate toneMint
class node_pluginui,node_plugins,node_store,node_options,node_profiles,node_headless,node_storage toneRose
class node_vrchat toneIndigo
```

## Components

### Chatbox content

- [Personal status](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py): `ui/pages/apps_page.py`
- [Now playing](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py): `ui/pages/apps_page.py`
- [Hardware stats](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/apps_page.py): `ui/pages/apps_page.py`
- [Combined layouts](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/aio_edit.py): `ui/aio_edit.py`
- [Custom box](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/custom_box.py): `ui/pages/custom_box.py`
- [Node canvas](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/nodegraph.py): `ui/nodegraph.py`
- [Node evaluation](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/nodegraph_eval.py): `core/nodegraph_eval.py`
- [AFK handling](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/afk.py): `core/afk.py`

### Runtime services

- [Main window](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/mainwindow.py): `ui/mainwindow.py`
- [OSCQuery discovery](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/oscquery.py): `core/oscquery.py`
- [OSC input](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/oscin.py): `core/oscin.py`

### Speech and translation

- [Speech recognition](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/speechtotext.py): `core/speechtotext.py`
- [Microphone groups](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/micgroups.py): `core/micgroups.py`
- [PipeWire audio](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/backends/mic_pactl.py): `core/backends/mic_pactl.py`
- [Translation services](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/translators.py): `core/translators.py`
- [AI translation](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/ai_translator.py): `core/ai_translator.py`
- [Custom translation](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/custom_translator.py): `core/custom_translator.py`

### App and extensions

- [Plugin page](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/plugins_page.py): `ui/pages/plugins_page.py`
- [Plugin manager](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/plugins.py): `core/plugins.py`
- [Plugin store](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/plugin_store.py): `core/plugin_store.py`
- [Options and themes](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/ui/pages/options_page.py): `ui/pages/options_page.py`
- [Profiles](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/profiles.py): `core/profiles.py`
- [Terminal mode](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/headless.py): `core/headless.py`
- [Atomic file writes](https://github.com/yakuda-stack/osc-dreamchatbox/blob/main/core/atomicfile.py): `core/atomicfile.py`

### Other components

- **User**
- **VRChat**

## Connections

- User → Main window: configures
- Main window → Personal status: offers (evidence: `ui/mainwindow.py`)
- Main window → Now playing: offers (evidence: `ui/mainwindow.py`)
- Main window → Hardware stats: offers (evidence: `ui/mainwindow.py`)
- Main window → Combined layouts: offers
- Main window → Custom box: offers (evidence: `ui/mainwindow.py`)
- Main window → Node canvas: offers
- Node canvas → Node evaluation: evaluates
- Main window → AFK handling: coordinates (evidence: `ui/mainwindow.py`)
- Main window → OSCQuery discovery: starts (evidence: `ui/mainwindow.py`)
- OSCQuery discovery → VRChat: discovers (evidence: `core/oscquery.py`)
- VRChat → OSC input: sends parameters
- Main window → OSC input: coordinates (evidence: `ui/mainwindow.py`)
- Main window → Speech recognition: coordinates (evidence: `ui/mainwindow.py`)
- Speech recognition → Microphone groups: uses devices (evidence: `core/speechtotext.py`)
- Microphone groups → PipeWire audio: queries audio (evidence: `core/micgroups.py`)
- Speech recognition → Translation services: translates speech (evidence: `core/speechtotext.py`)
- Translation services → AI translation: uses backend (evidence: `core/translators.py`)
- Translation services → Custom translation: uses backend (evidence: `core/translators.py`)
- Main window → Plugin manager: loads enabled (evidence: `ui/mainwindow.py`)
- Plugin page → Plugin store: manages packages (evidence: `ui/pages/plugins_page.py`)
- Plugin page → Plugin manager: manages plugins (evidence: `ui/pages/plugins_page.py`)
- Main window → Options and themes: offers (evidence: `ui/mainwindow.py`)
- Main window → Profiles: supports profiles
- Main window → Terminal mode: supports terminal mode (evidence: `core/headless.py`)
- Profiles → Atomic file writes: persists through (evidence: `core/profiles.py`)
- Plugin manager → Atomic file writes: persists through (evidence: `core/plugins.py`)
- Personal status → VRChat: sends chatbox text
- Now playing → VRChat: sends chatbox text
- Hardware stats → VRChat: sends chatbox text
- Combined layouts → VRChat: sends combined text
- Custom box → VRChat: frames chatbox
- AFK handling → VRChat: uses AFK parameter
