# reallyiron/yt2vm architecture

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

## Overview

YT2VM is a desktop control application for chat-driven streaming and VM workflows. Its principal flow is viewer commands entering through chat, being filtered and handled by the application, then driving VM actions; OBS and web overlays support the streaming side. The README also documents GUI configuration, plugins, a plugin market, and local vision-AI play. No source excerpts were provided, so paths and relationships below rely on the README; internal call ownership and finer implementation boundaries cannot be verified.

Main entry points: [`yt2vm.py`](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py) (YT2VM desktop app), [`plugins`](https://github.com/reallyiron/yt2vm/tree/main/plugins) (Plugin system)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application control"]
  node_yt2vm["YT2VM desktop app<br/>[yt2vm.py]"]
  node_command_policy["Command Power<br/>[yt2vm.py]"]
end

subgraph group_chat["Chat workflow"]
  node_chat_input["Chat input<br/>[yt2vm.py]"]
  node_encoding_filter["Encoding filter<br/>[yt2vm.py]"]
  node_strikes[("Strikes and blocks<br/>[yt2vm.py]")]
  node_chat_commands["Chat commands<br/>[yt2vm.py]"]
end

subgraph group_vm["VM management"]
  node_vm_control["VM control<br/>[yt2vm.py]"]
  node_changevm["ChangeVM allowlist<br/>[yt2vm.py]"]
  node_vmware["VirtualBox / VMware"]
end

subgraph group_stream["Streaming and web"]
  node_obs["OBS WebSocket"]
  node_flask["Flask control layer<br/>[yt2vm.py]"]
  node_overlays["Chat overlays<br/>[yt2vm.py]"]
end

subgraph group_extensions["Extensions and AI"]
  node_plugins["Plugin system"]
  node_plugin_market["Plugin market<br/>[yt2vm.py]"]
  node_vision_ai["Local vision AI<br/>[yt2vm.py]"]
end

node_viewer(("Viewer / operator"))
node_browser(("Overlay viewer"))
node_ai_service["Ollama / LM Studio"]

node_viewer -->|"configures"| node_yt2vm
node_viewer -->|"sends commands"| node_chat_input
node_chat_input -->|"checks messages"| node_encoding_filter
node_encoding_filter -->|"records blocks"| node_strikes
node_encoding_filter -->|"permits commands"| node_chat_commands
node_command_policy -->|"sets access"| node_chat_commands
node_chat_commands -->|"runs VM actions"| node_vm_control
node_changevm -->|"restricts switching"| node_vm_control
node_vm_control -->|"controls VMs"| node_vmware
node_yt2vm -.->|"integrates with"| node_obs
node_yt2vm -->|"provides control"| node_flask
node_yt2vm -->|"provides overlays"| node_overlays
node_browser -->|"displays"| node_overlays
node_plugins -->|"adds commands"| node_chat_commands
node_plugins -->|"adds GUI panels"| node_yt2vm
node_yt2vm -->|"offers market"| node_plugin_market
node_plugin_market -->|"installs plugins"| node_plugins
node_chat_commands -->|"controls AI player"| node_vision_ai
node_vision_ai -.->|"uses local model"| node_ai_service

click node_yt2vm "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_command_policy "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_chat_input "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_encoding_filter "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_strikes "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_chat_commands "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_vm_control "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_changevm "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_flask "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_overlays "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_plugins "https://github.com/reallyiron/yt2vm/tree/main/plugins"
click node_plugin_market "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py"
click node_vision_ai "https://github.com/reallyiron/yt2vm/blob/main/yt2vm.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_yt2vm,node_command_policy,node_viewer,node_browser toneBlue
class node_chat_input,node_encoding_filter,node_strikes,node_chat_commands toneAmber
class node_vm_control,node_changevm,node_vmware toneMint
class node_obs,node_flask,node_overlays toneRose
class node_plugins,node_plugin_market,node_vision_ai,node_ai_service toneIndigo
```

## Components

### Application control

- [YT2VM desktop app](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Command Power](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`

### Chat workflow

- [Chat input](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Encoding filter](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Strikes and blocks](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Chat commands](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`

### VM management

- [VM control](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [ChangeVM allowlist](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- **VirtualBox / VMware**

### Streaming and web

- **OBS WebSocket**
- [Flask control layer](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Chat overlays](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`

### Extensions and AI

- [Plugin system](https://github.com/reallyiron/yt2vm/tree/main/plugins): `plugins`
- [Plugin market](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`
- [Local vision AI](https://github.com/reallyiron/yt2vm/blob/main/yt2vm.py): `yt2vm.py`

### Other components

- **Viewer / operator**
- **Overlay viewer**
- **Ollama / LM Studio**

## Connections

- Viewer / operator → YT2VM desktop app: configures (evidence: `README.md`)
- Viewer / operator → Chat input: sends commands (evidence: `README.md`)
- Chat input → Encoding filter: checks messages (evidence: `README.md`)
- Encoding filter → Strikes and blocks: records blocks (evidence: `README.md`)
- Encoding filter → Chat commands: permits commands (evidence: `README.md`)
- Command Power → Chat commands: sets access (evidence: `README.md`)
- Chat commands → VM control: runs VM actions (evidence: `README.md`)
- ChangeVM allowlist → VM control: restricts switching (evidence: `README.md`)
- VM control → VirtualBox / VMware: controls VMs (evidence: `README.md`)
- YT2VM desktop app → OBS WebSocket: integrates with (evidence: `README.md`)
- YT2VM desktop app → Flask control layer: provides control (evidence: `README.md`)
- YT2VM desktop app → Chat overlays: provides overlays (evidence: `README.md`)
- Overlay viewer → Chat overlays: displays (evidence: `README.md`)
- Plugin system → Chat commands: adds commands (evidence: `README.md`)
- Plugin system → YT2VM desktop app: adds GUI panels (evidence: `README.md`)
- YT2VM desktop app → Plugin market: offers market (evidence: `README.md`)
- Plugin market → Plugin system: installs plugins (evidence: `README.md`)
- Chat commands → Local vision AI: controls AI player (evidence: `README.md`)
- Local vision AI → Ollama / LM Studio: uses local model (evidence: `README.md`)
