# luminexrecon/interactive-stream-toolkit-by-cc-aftermath architecture

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

- Interactive diagram: https://gitdiagram.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath
- Repository: https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath

## Overview

Stream Toolkit is a local Node.js service for YouTube stream overlays. Viewers chat to the bot, which polls YouTube live chat and forwards commands to the server; the server updates local JSON-backed state and broadcasts it to browser clients. Streamers configure prizes and auctions in control panels, while OBS displays the synchronized overlays and winner announcements. The README documents the runtime topology; excerpts show representative WebSocket clients and server handlers, but not every namespace implementation.

Main entry points: [`server.js`](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/server.js) (HTTP and WebSocket server), [`bot/bot.js`](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/bot.js) (Chat polling and commands), [`point-spinner/js/client.js`](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/client.js) (Spinner WebSocket client), [`live-auction/js/client.js`](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/client.js) (Live auction WebSocket client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Local server and state"]
  node_server["HTTP and WebSocket server<br/>[server.js]"]
  node_json[("Local JSON state")]
  node_uploads[("Uploaded images")]
end

subgraph group_chat["YouTube chat bot"]
  node_bot["Chat polling and commands<br/>[bot.js]"]
  node_botws["Bot WebSocket clients<br/>[wsClients.js]"]
  node_economy["Bot economy wrapper<br/>[economy.js]"]
end

subgraph group_spinner["Point Spinner"]
  node_spinnercontrol["Spinner control panel<br/>[control.js]"]
  node_spinnerclient["Spinner WebSocket client<br/>[client.js]"]
  node_spinnerdisplay["Spinner overlay and winner<br/>[overlay.js]"]
end

subgraph group_auctions["Live auctions"]
  node_livecontrol["Live auction control<br/>[control.js]"]
  node_liveclient["Live auction WebSocket client<br/>[client.js]"]
  node_livedisplay["Live auction overlay<br/>[overlay.js]"]
  node_exclusivecontrol["Exclusive auction control<br/>[control.js]"]
  node_exclusiveclient["Exclusive auction WebSocket client<br/>[client.js]"]
  node_exclusivedisplay["Exclusive overlay and winner<br/>[overlay.js]"]
  node_testpanel["Auction rehearsal panel<br/>[test-panel.js]"]
end

node_streamer(("Streamer"))
node_viewers(("Live chat viewers"))
node_youtube["YouTube live chat API"]
node_obs["OBS Browser Source"]

node_viewers -->|"send chat"| node_youtube
node_bot -->|"poll chat"| node_youtube
node_bot -->|"uses clients"| node_botws
node_bot -->|"uses economy"| node_economy
node_economy -->|"connects economy"| node_botws
node_botws -->|"sends commands"| node_server
node_server -->|"reads and writes"| node_json
node_streamer -->|"configures prizes"| node_spinnercontrol
node_spinnercontrol -->|"invokes actions"| node_spinnerclient
node_spinnerclient -->|"uses spinner namespace"| node_server
node_server -->|"broadcasts spin state"| node_spinnerdisplay
node_spinnerdisplay -->|"renders overlay"| node_obs
node_streamer -->|"starts auction"| node_livecontrol
node_livecontrol -->|"invokes actions"| node_liveclient
node_liveclient -->|"uses auction namespace"| node_server
node_server -->|"broadcasts auction state"| node_livedisplay
node_livedisplay -->|"renders overlay"| node_obs
node_streamer -->|"manages auction"| node_exclusivecontrol
node_exclusivecontrol -->|"invokes actions"| node_exclusiveclient
node_exclusiveclient -->|"uses auction namespace"| node_server
node_server -->|"broadcasts auction state"| node_exclusivedisplay
node_exclusivedisplay -->|"renders overlay"| node_obs
node_streamer -->|"rehearses auction"| node_testpanel
node_spinnerclient -->|"uploads images"| node_server
node_liveclient -->|"uploads images"| node_server
node_exclusiveclient -->|"uploads images"| node_server
node_server -->|"stores uploads"| node_uploads

click node_server "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/server.js"
click node_bot "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/bot.js"
click node_botws "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/wsClients.js"
click node_economy "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/economy.js"
click node_spinnercontrol "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/control.js"
click node_spinnerclient "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/client.js"
click node_spinnerdisplay "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/overlay.js"
click node_livecontrol "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/control.js"
click node_liveclient "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/client.js"
click node_livedisplay "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/overlay.js"
click node_exclusivecontrol "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/control.js"
click node_exclusiveclient "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/client.js"
click node_exclusivedisplay "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/overlay.js"
click node_testpanel "https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/test-panel.js"

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_server,node_json,node_uploads,node_viewers,node_obs toneBlue
class node_bot,node_botws,node_economy toneAmber
class node_spinnercontrol,node_spinnerclient,node_spinnerdisplay,node_youtube toneMint
class node_livecontrol,node_liveclient,node_livedisplay,node_exclusivecontrol,node_exclusiveclient,node_exclusivedisplay,node_testpanel toneRose
class node_streamer toneIndigo
```

## Components

### Local server and state

- [HTTP and WebSocket server](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/server.js): `server.js`
- **Local JSON state**
- **Uploaded images**

### YouTube chat bot

- [Chat polling and commands](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/bot.js): `bot/bot.js`
- [Bot WebSocket clients](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/wsClients.js): `bot/wsClients.js`
- [Bot economy wrapper](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/bot/economy.js): `bot/economy.js`

### Point Spinner

- [Spinner control panel](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/control.js): `point-spinner/js/control.js`
- [Spinner WebSocket client](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/client.js): `point-spinner/js/client.js`
- [Spinner overlay and winner](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/point-spinner/js/overlay.js): `point-spinner/js/overlay.js`

### Live auctions

- [Live auction control](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/control.js): `live-auction/js/control.js`
- [Live auction WebSocket client](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/client.js): `live-auction/js/client.js`
- [Live auction overlay](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/live-auction/js/overlay.js): `live-auction/js/overlay.js`
- [Exclusive auction control](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/control.js): `exclusive-auction/js/control.js`
- [Exclusive auction WebSocket client](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/client.js): `exclusive-auction/js/client.js`
- [Exclusive overlay and winner](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/overlay.js): `exclusive-auction/js/overlay.js`
- [Auction rehearsal panel](https://github.com/luminexrecon/interactive-stream-toolkit-by-cc-aftermath/blob/main/exclusive-auction/js/test-panel.js): `exclusive-auction/js/test-panel.js`

### Other components

- **Streamer**
- **Live chat viewers**
- **YouTube live chat API**
- **OBS Browser Source**

## Connections

- Live chat viewers → YouTube live chat API: send chat (evidence: `README.md`)
- Chat polling and commands → YouTube live chat API: poll chat (evidence: `README.md`)
- Chat polling and commands → Bot WebSocket clients: uses clients (evidence: `bot/bot.js`)
- Chat polling and commands → Bot economy wrapper: uses economy (evidence: `bot/bot.js`)
- Bot economy wrapper → Bot WebSocket clients: connects economy (evidence: `bot/economy.js`)
- Bot WebSocket clients → HTTP and WebSocket server: sends commands (evidence: `README.md`)
- HTTP and WebSocket server → Local JSON state: reads and writes (evidence: `server.js`)
- Streamer → Spinner control panel: configures prizes (evidence: `README.md`)
- Spinner control panel → Spinner WebSocket client: invokes actions (evidence: `point-spinner/js/control.js`)
- Spinner WebSocket client → HTTP and WebSocket server: uses spinner namespace (evidence: `point-spinner/js/client.js`)
- HTTP and WebSocket server → Spinner overlay and winner: broadcasts spin state (evidence: `README.md`)
- Spinner overlay and winner → OBS Browser Source: renders overlay (evidence: `README.md`)
- Streamer → Live auction control: starts auction (evidence: `README.md`)
- Live auction control → Live auction WebSocket client: invokes actions (evidence: `live-auction/js/control.js`)
- Live auction WebSocket client → HTTP and WebSocket server: uses auction namespace (evidence: `live-auction/js/client.js`)
- HTTP and WebSocket server → Live auction overlay: broadcasts auction state (evidence: `README.md`)
- Live auction overlay → OBS Browser Source: renders overlay (evidence: `README.md`)
- Streamer → Exclusive auction control: manages auction (evidence: `README.md`)
- Exclusive auction control → Exclusive auction WebSocket client: invokes actions (evidence: `exclusive-auction/js/control.js`)
- Exclusive auction WebSocket client → HTTP and WebSocket server: uses auction namespace (evidence: `exclusive-auction/js/client.js`)
- HTTP and WebSocket server → Exclusive overlay and winner: broadcasts auction state (evidence: `README.md`)
- Exclusive overlay and winner → OBS Browser Source: renders overlay (evidence: `README.md`)
- Streamer → Auction rehearsal panel: rehearses auction (evidence: `README.md`)
- Spinner WebSocket client → HTTP and WebSocket server: uploads images (evidence: `point-spinner/js/client.js`)
- Live auction WebSocket client → HTTP and WebSocket server: uploads images (evidence: `live-auction/js/client.js`)
- Exclusive auction WebSocket client → HTTP and WebSocket server: uploads images (evidence: `exclusive-auction/js/client.js`)
- HTTP and WebSocket server → Uploaded images: stores uploads (evidence: `README.md`)
