# ss220club/bandastation architecture

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

- Interactive diagram: https://gitdiagram.com/ss220club/bandastation
- Repository: https://github.com/ss220club/bandastation

## Overview

BandaStation is a Space Station 13 game repository. The supplied source chiefly exposes its TGUI frontend: backend state and actions feed a route-selected interface, which is displayed in a window; sampled interfaces issue game actions through the backend. The tree also documents the broader interface suite, including chat, settings, escape-menu, and device consoles. Source excerpts do not show the game-server implementation or most frontend wiring, so those connections are omitted rather than inferred.

Main entry points: [`tgui/packages/tgui/backend.ts`](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/backend.ts) (Backend state), [`tgui/packages/tgui/routes.tsx`](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/routes.tsx) (Interface router), [`tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx`](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx) (DNA console), [`tgui/packages/tgui/events/store.ts`](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/events/store.ts) (Event state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["TGUI Runtime"]
  node_router["Interface router<br/>[routes.tsx]"]
  node_backend["Backend state<br/>[backend.ts]"]
  node_eventactions["Game actions<br/>[act.ts]"]
  node_eventstore["Event state<br/>[store.ts]"]
  node_window["Window layout<br/>[Window.tsx]"]
end

subgraph group_interfaces["Game Interfaces"]
  node_interfacecatalog["Device interfaces"]
  node_dnaconsole["DNA console"]
  node_geneticinfo["Genetic makeup view"]
  node_mutationinfo["Mutation view<br/>[MutationInfo.jsx]"]
  node_communications["Communications console<br/>[Main.tsx]"]
  node_ntosfiles["Ntos file manager"]
end

subgraph group_playerui["Player UI"]
  node_panel["Game panel"]
  node_chat["Chat UI"]
  node_escape["Escape menu"]
  node_say["Say interface"]
end

node_gameplayer(("Game player"))

node_router -->|"reads state"| node_eventstore
node_router -->|"loads interface"| node_interfacecatalog
node_router -->|"renders window"| node_window
node_backend -->|"uses actions"| node_eventactions
node_backend -->|"reads state"| node_eventstore
node_dnaconsole -->|"reads data, sends actions"| node_backend
node_dnaconsole -->|"renders view"| node_geneticinfo
node_mutationinfo -->|"uses backend"| node_backend
node_communications -->|"uses backend"| node_backend
node_ntosfiles -->|"sends actions"| node_backend

click node_router "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/routes.tsx"
click node_backend "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/backend.ts"
click node_eventactions "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/events/act.ts"
click node_eventstore "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/events/store.ts"
click node_window "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/layouts/Window.tsx"
click node_interfacecatalog "https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui/interfaces"
click node_dnaconsole "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx"
click node_geneticinfo "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/GeneticMakeupInfo.jsx"
click node_mutationinfo "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx"
click node_communications "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/CommunicationsConsole/Main.tsx"
click node_ntosfiles "https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/NtosFileManager.tsx"
click node_panel "https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-panel"
click node_chat "https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-panel/chat"
click node_escape "https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-escape-menu"
click node_say "https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-say"

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_router,node_backend,node_eventactions,node_eventstore,node_window toneBlue
class node_interfacecatalog,node_dnaconsole,node_geneticinfo,node_mutationinfo,node_communications,node_ntosfiles toneAmber
class node_panel,node_chat,node_escape,node_say toneMint
class node_gameplayer toneIndigo
```

## Components

### TGUI Runtime

- [Interface router](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/routes.tsx): `tgui/packages/tgui/routes.tsx`
- [Backend state](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/backend.ts): `tgui/packages/tgui/backend.ts`
- [Game actions](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/events/act.ts): `tgui/packages/tgui/events/act.ts`
- [Event state](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/events/store.ts): `tgui/packages/tgui/events/store.ts`
- [Window layout](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/layouts/Window.tsx): `tgui/packages/tgui/layouts/Window.tsx`

### Game Interfaces

- [Device interfaces](https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui/interfaces): `tgui/packages/tgui/interfaces`
- [DNA console](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx): `tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx`
- [Genetic makeup view](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/GeneticMakeupInfo.jsx): `tgui/packages/tgui/interfaces/DnaConsole/GeneticMakeupInfo.jsx`
- [Mutation view](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx): `tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx`
- [Communications console](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/CommunicationsConsole/Main.tsx): `tgui/packages/tgui/interfaces/CommunicationsConsole/Main.tsx`
- [Ntos file manager](https://github.com/ss220club/bandastation/blob/master/tgui/packages/tgui/interfaces/NtosFileManager.tsx): `tgui/packages/tgui/interfaces/NtosFileManager.tsx`

### Player UI

- [Game panel](https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-panel): `tgui/packages/tgui-panel`
- [Chat UI](https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-panel/chat): `tgui/packages/tgui-panel/chat`
- [Escape menu](https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-escape-menu): `tgui/packages/tgui-escape-menu`
- [Say interface](https://github.com/ss220club/bandastation/tree/master/tgui/packages/tgui-say): `tgui/packages/tgui-say`

### Other components

- **Game player**

## Connections

- Interface router → Event state: reads state (evidence: `tgui/packages/tgui/routes.tsx`)
- Interface router → Device interfaces: loads interface (evidence: `tgui/packages/tgui/routes.tsx`)
- Interface router → Window layout: renders window (evidence: `tgui/packages/tgui/routes.tsx`)
- Backend state → Game actions: uses actions (evidence: `tgui/packages/tgui/backend.ts`)
- Backend state → Event state: reads state (evidence: `tgui/packages/tgui/backend.ts`)
- DNA console → Backend state: reads data, sends actions (evidence: `tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx`)
- DNA console → Genetic makeup view: renders view (evidence: `tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx`)
- Mutation view → Backend state: uses backend (evidence: `tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx`)
- Communications console → Backend state: uses backend (evidence: `tgui/packages/tgui/interfaces/CommunicationsConsole/Main.tsx`)
- Ntos file manager → Backend state: sends actions (evidence: `tgui/packages/tgui/interfaces/NtosFileManager.tsx`)
