# zkarim28/vibebox architecture

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

- Interactive diagram: https://gitdiagram.com/zkarim28/vibebox
- Repository: https://github.com/zkarim28/vibebox
- Video tour (about a minute): https://gitdiagram.com/zkarim28/vibebox/video

## Overview

VibeBox is a browser-based party-game console: players join a room from phones or a shared screen, the server manages room and round actions, and clients see private or shared game state and results. The game modules cover distinct playable rulesets; the README also documents games whose implementation is not separately sampled. Launcher, desktop control window, QR links, and startup notifications support starting and joining rooms. Connections are limited to README statements and the server’s indexed references; unsampled game internals are not inferred.

Main entry points: [`server.py`](https://github.com/zkarim28/vibebox/blob/main/server.py) (Room server), [`launcher.py`](https://github.com/zkarim28/vibebox/blob/main/launcher.py) (Server launcher), [`static/phone-host.js`](https://github.com/zkarim28/vibebox/blob/main/static/phone-host.js) (Phone interface), [`static/host.html`](https://github.com/zkarim28/vibebox/blob/main/static/host.html) (Shared-screen UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Room runtime"]
  node_server["Room server<br/>[server.py]"]
end

subgraph group_games["Game rules"]
  node_scattergories["Scattergories<br/>[scattergories.py]"]
  node_taboo["Taboo<br/>[taboo.py]"]
  node_blackbox["BlackBox<br/>[blackbox.py]"]
  node_codenames["Codenames<br/>[codenames.py]"]
  node_imposter["Imposter<br/>[imposter.py]"]
  node_mafia["Mafia<br/>[mafia.py]"]
  node_wordhunt["Word Hunt<br/>[wordhunt.py]"]
  node_bs["BS<br/>[bs.py]"]
  node_wii["Wii Sandbox<br/>[server.py]"]
  node_ludo["Ludo<br/>[server.py]"]
end

subgraph group_clients["Player interfaces"]
  node_phone["Phone interface<br/>[phone-host.js]"]
  node_web["Shared-screen UI<br/>[host.html]"]
  node_results["Results view<br/>[results.js]"]
end

subgraph group_operations["Room access"]
  node_launcher["Server launcher<br/>[launcher.py]"]
  node_gui["Desktop controls<br/>[gui.py]"]
  node_qr["QR generation<br/>[qr.py]"]
  node_notify["Startup notifications<br/>[notify.py]"]
end

node_players(("Players and host"))
node_cloudflare{{"Cloudflare tunnel"}}
node_ntfy{{"ntfy push"}}

node_players -->|"join and play"| node_phone
node_players -->|"host and play"| node_web
node_phone -->|"send actions"| node_server
node_web -->|"control room"| node_server
node_server -->|"serve game state"| node_phone
node_server -->|"serve game state"| node_web
node_server -.->|"serve results"| node_results
node_server -->|"dispatches actions"| node_scattergories
node_server -->|"uses deck"| node_taboo
node_server -->|"dispatches game"| node_blackbox
node_server -->|"deals board"| node_codenames
node_server -->|"uses word data"| node_imposter
node_server -->|"dispatches game"| node_mafia
node_server -->|"dispatches game"| node_wordhunt
node_server -->|"dispatches actions"| node_bs
node_server -.->|"manages game"| node_wii
node_server -.->|"manages game"| node_ludo
node_launcher -->|"starts server"| node_server
node_players -->|"starts public game"| node_launcher
node_launcher -->|"uses tunnel"| node_cloudflare
node_server -->|"runs controls"| node_gui
node_server -->|"generates QR"| node_qr
node_server -->|"sends startup links"| node_notify
node_notify -->|"pushes notification"| node_ntfy

click node_server "https://github.com/zkarim28/vibebox/blob/main/server.py"
click node_phone "https://github.com/zkarim28/vibebox/blob/main/static/phone-host.js"
click node_web "https://github.com/zkarim28/vibebox/blob/main/static/host.html"
click node_results "https://github.com/zkarim28/vibebox/blob/main/static/results.js"
click node_scattergories "https://github.com/zkarim28/vibebox/blob/main/scattergories.py"
click node_taboo "https://github.com/zkarim28/vibebox/blob/main/taboo.py"
click node_blackbox "https://github.com/zkarim28/vibebox/blob/main/blackbox.py"
click node_codenames "https://github.com/zkarim28/vibebox/blob/main/codenames.py"
click node_imposter "https://github.com/zkarim28/vibebox/blob/main/imposter.py"
click node_mafia "https://github.com/zkarim28/vibebox/blob/main/mafia.py"
click node_wordhunt "https://github.com/zkarim28/vibebox/blob/main/wordhunt.py"
click node_bs "https://github.com/zkarim28/vibebox/blob/main/bs.py"
click node_wii "https://github.com/zkarim28/vibebox/blob/main/server.py"
click node_ludo "https://github.com/zkarim28/vibebox/blob/main/server.py"
click node_launcher "https://github.com/zkarim28/vibebox/blob/main/launcher.py"
click node_gui "https://github.com/zkarim28/vibebox/blob/main/gui.py"
click node_qr "https://github.com/zkarim28/vibebox/blob/main/qr.py"
click node_notify "https://github.com/zkarim28/vibebox/blob/main/notify.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_server toneBlue
class node_scattergories,node_taboo,node_blackbox,node_codenames,node_imposter,node_mafia,node_wordhunt,node_bs,node_wii,node_ludo toneAmber
class node_phone,node_web,node_results toneMint
class node_launcher,node_gui,node_qr,node_notify toneRose
class node_players,node_cloudflare,node_ntfy toneIndigo
```

## Components

### Room runtime

- [Room server](https://github.com/zkarim28/vibebox/blob/main/server.py): `server.py`

### Game rules

- [Scattergories](https://github.com/zkarim28/vibebox/blob/main/scattergories.py): `scattergories.py`
- [Taboo](https://github.com/zkarim28/vibebox/blob/main/taboo.py): `taboo.py`
- [BlackBox](https://github.com/zkarim28/vibebox/blob/main/blackbox.py): `blackbox.py`
- [Codenames](https://github.com/zkarim28/vibebox/blob/main/codenames.py): `codenames.py`
- [Imposter](https://github.com/zkarim28/vibebox/blob/main/imposter.py): `imposter.py`
- [Mafia](https://github.com/zkarim28/vibebox/blob/main/mafia.py): `mafia.py`
- [Word Hunt](https://github.com/zkarim28/vibebox/blob/main/wordhunt.py): `wordhunt.py`
- [BS](https://github.com/zkarim28/vibebox/blob/main/bs.py): `bs.py`
- [Wii Sandbox](https://github.com/zkarim28/vibebox/blob/main/server.py): `server.py`
- [Ludo](https://github.com/zkarim28/vibebox/blob/main/server.py): `server.py`

### Player interfaces

- [Phone interface](https://github.com/zkarim28/vibebox/blob/main/static/phone-host.js): `static/phone-host.js`
- [Shared-screen UI](https://github.com/zkarim28/vibebox/blob/main/static/host.html): `static/host.html`
- [Results view](https://github.com/zkarim28/vibebox/blob/main/static/results.js): `static/results.js`

### Room access

- [Server launcher](https://github.com/zkarim28/vibebox/blob/main/launcher.py): `launcher.py`
- [Desktop controls](https://github.com/zkarim28/vibebox/blob/main/gui.py): `gui.py`
- [QR generation](https://github.com/zkarim28/vibebox/blob/main/qr.py): `qr.py`
- [Startup notifications](https://github.com/zkarim28/vibebox/blob/main/notify.py): `notify.py`

### Other components

- **Players and host**
- **Cloudflare tunnel**
- **ntfy push**

## Connections

- Players and host → Phone interface: join and play (evidence: `README.md`)
- Players and host → Shared-screen UI: host and play (evidence: `README.md`)
- Phone interface → Room server: send actions (evidence: `README.md`)
- Shared-screen UI → Room server: control room (evidence: `README.md`)
- Room server → Phone interface: serve game state (evidence: `README.md`)
- Room server → Shared-screen UI: serve game state (evidence: `README.md`)
- Room server → Results view: serve results
- Room server → Scattergories: dispatches actions (evidence: `server.py`)
- Room server → Taboo: uses deck (evidence: `server.py`)
- Room server → BlackBox: dispatches game (evidence: `server.py`)
- Room server → Codenames: deals board (evidence: `server.py`)
- Room server → Imposter: uses word data (evidence: `server.py`)
- Room server → Mafia: dispatches game (evidence: `server.py`)
- Room server → Word Hunt: dispatches game (evidence: `server.py`)
- Room server → BS: dispatches actions (evidence: `server.py`)
- Room server → Wii Sandbox: manages game (evidence: `server.py`)
- Room server → Ludo: manages game (evidence: `server.py`)
- Server launcher → Room server: starts server (evidence: `README.md`)
- Players and host → Server launcher: starts public game (evidence: `README.md`)
- Server launcher → Cloudflare tunnel: uses tunnel (evidence: `README.md`)
- Room server → Desktop controls: runs controls (evidence: `gui.py`)
- Room server → QR generation: generates QR (evidence: `server.py`)
- Room server → Startup notifications: sends startup links (evidence: `server.py`)
- Startup notifications → ntfy push: pushes notification (evidence: `notify.py`)
