# cubemastery/cubectf-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/cubemastery/cubectf-2026
- Repository: https://github.com/cubemastery/cubectf-2026

## Overview

CubeCTF-2026 is an attack/defense suite of independently implemented services. The README identifies seven services; the tree has no doors service source, so that runtime is not mapped. Shown internal edges follow excerpts or SOURCE INDEX references; unsampled service internals are represented only at their known entry points.

Main entry points: [`donor/service/src/handlers`](https://github.com/cubemastery/cubectf-2026/tree/main/donor/service/src/handlers) (Donor handlers), [`vegas/service/vegas/server.py`](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/server.py) (Casino TCP server), [`flightplan/service/routes.py`](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/routes.py) (Flightplan routes), [`noise/service/noise/binapi.py`](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/binapi.py) (Binary API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_donor["Donations"]
  node_donor_server["Donor HTTP server<br/>[server.js]"]
  node_donor_routes["Donor routes<br/>[routes.js]"]
  node_donor_handlers["Donor handlers"]
  node_donor_state[("In-memory state<br/>[state.js]")]
  node_donor_model["Domain model<br/>[model.js]"]
  node_donor_util["Parsing and utilities<br/>[util.js]"]
  node_donor_response["Response formatting<br/>[response.js]"]
end

subgraph group_flightplan["Flight planning"]
  node_flight_client["Flightplan clients"]
  node_flight_main["Flightplan app<br/>[main.py]"]
  node_flight_routes["Flightplan routes<br/>[routes.py]"]
  node_flight_auth["Authentication<br/>[auth.py]"]
  node_flight_plans["Plan operations<br/>[flightplans.py]"]
  node_flight_db[("SQLite database<br/>[database.py]")]
end

subgraph group_noise["Secure messaging"]
  node_noise_client["Messaging TUI<br/>[noise_client.py]"]
  node_noise_api["Binary API<br/>[binapi.py]"]
  node_noise_protocol["Binary protocol<br/>[binproto.py]"]
  node_noise_crypto["Cryptography<br/>[crypto.py]"]
  node_noise_service["Messaging service<br/>[service.py]"]
  node_noise_models["Message models<br/>[models.py]"]
  node_noise_db[("Messaging database<br/>[db.py]")]
end

subgraph group_other["Other services"]
  node_vegas_server["Casino TCP server<br/>[server.py]"]
  node_vegas_commands["Casino commands<br/>[commands.py]"]
  node_vegas_db[("Casino state<br/>[database.py]")]
  node_shaas_service["Share service<br/>[main.py]"]
  node_shaas_native["Native share code<br/>[share.c]"]
  node_telescope_service["Telescope service<br/>[main.cpp]"]
  node_vegas_config["Casino configuration<br/>[config.py]"]
  node_vegas_session["Casino session<br/>[session.py]"]
end

node_users(("Service users"))

node_users -.->|"send requests"| node_donor_server
node_donor_server -->|"dispatches to"| node_donor_routes
node_donor_routes -->|"routes to"| node_donor_handlers
node_donor_handlers -->|"reads and writes"| node_donor_state
node_donor_handlers -->|"uses"| node_donor_model
node_donor_handlers -->|"parses with"| node_donor_util
node_donor_handlers -->|"returns responses"| node_donor_response
node_users -.->|"use service"| node_flight_main
node_flight_client -.->|"calls service"| node_flight_main
node_flight_main -->|"imports routes"| node_flight_routes
node_flight_routes -->|"uses authentication"| node_flight_auth
node_flight_routes -->|"calls plan operations"| node_flight_plans
node_flight_routes -->|"queries database"| node_flight_db
node_flight_plans -->|"uses database"| node_flight_db
node_users -.->|"use messaging"| node_noise_client
node_noise_client -->|"calls API"| node_noise_api
node_noise_api -->|"uses crypto"| node_noise_crypto
node_noise_api -->|"uses protocol"| node_noise_protocol
node_noise_service -->|"uses crypto"| node_noise_crypto
node_noise_service -->|"uses models"| node_noise_models
node_users -.->|"connect"| node_vegas_server
node_vegas_server -->|"dispatches commands"| node_vegas_commands
node_vegas_server -->|"provides database"| node_vegas_db
node_vegas_server -->|"uses settings"| node_vegas_config
node_vegas_server -->|"creates session"| node_vegas_session
node_users -.->|"use service"| node_shaas_service
node_users -.->|"use service"| node_telescope_service

click node_donor_server "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/server.js"
click node_donor_routes "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/routes.js"
click node_donor_handlers "https://github.com/cubemastery/cubectf-2026/tree/main/donor/service/src/handlers"
click node_donor_state "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/state.js"
click node_donor_model "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/model.js"
click node_donor_util "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/util.js"
click node_donor_response "https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/response.js"
click node_flight_client "https://github.com/cubemastery/cubectf-2026/tree/main/flightplan/service/client"
click node_flight_main "https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/main.py"
click node_flight_routes "https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/routes.py"
click node_flight_auth "https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/auth.py"
click node_flight_plans "https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/flightplans.py"
click node_flight_db "https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/database.py"
click node_noise_client "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise_client.py"
click node_noise_api "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/binapi.py"
click node_noise_protocol "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/binproto.py"
click node_noise_crypto "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/crypto.py"
click node_noise_service "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/service.py"
click node_noise_models "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/models.py"
click node_noise_db "https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/db.py"
click node_vegas_server "https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/server.py"
click node_vegas_commands "https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/commands.py"
click node_vegas_db "https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/database.py"
click node_shaas_service "https://github.com/cubemastery/cubectf-2026/blob/main/shaas/service/main.py"
click node_shaas_native "https://github.com/cubemastery/cubectf-2026/blob/main/shaas/src/share.c"
click node_telescope_service "https://github.com/cubemastery/cubectf-2026/blob/main/telescope/service/src/main.cpp"
click node_vegas_config "https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/config.py"
click node_vegas_session "https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/session.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_donor_server,node_donor_routes,node_donor_handlers,node_donor_state,node_donor_model,node_donor_util,node_donor_response,node_users toneBlue
class node_flight_client,node_flight_main,node_flight_routes,node_flight_auth,node_flight_plans,node_flight_db toneAmber
class node_noise_client,node_noise_api,node_noise_protocol,node_noise_crypto,node_noise_service,node_noise_models,node_noise_db toneMint
class node_vegas_server,node_vegas_commands,node_vegas_db,node_shaas_service,node_shaas_native,node_telescope_service,node_vegas_config,node_vegas_session toneRose
```

## Components

### Donations

- [Donor HTTP server](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/server.js): `donor/service/src/server.js`
- [Donor routes](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/routes.js): `donor/service/src/routes.js`
- [Donor handlers](https://github.com/cubemastery/cubectf-2026/tree/main/donor/service/src/handlers): `donor/service/src/handlers`
- [In-memory state](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/state.js): `donor/service/src/state.js`
- [Domain model](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/model.js): `donor/service/src/model.js`
- [Parsing and utilities](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/util.js): `donor/service/src/util.js`
- [Response formatting](https://github.com/cubemastery/cubectf-2026/blob/main/donor/service/src/response.js): `donor/service/src/response.js`

### Flight planning

- [Flightplan clients](https://github.com/cubemastery/cubectf-2026/tree/main/flightplan/service/client): `flightplan/service/client`
- [Flightplan app](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/main.py): `flightplan/service/main.py`
- [Flightplan routes](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/routes.py): `flightplan/service/routes.py`
- [Authentication](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/auth.py): `flightplan/service/auth.py`
- [Plan operations](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/flightplans.py): `flightplan/service/flightplans.py`
- [SQLite database](https://github.com/cubemastery/cubectf-2026/blob/main/flightplan/service/database.py): `flightplan/service/database.py`

### Secure messaging

- [Messaging TUI](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise_client.py): `noise/service/noise_client.py`
- [Binary API](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/binapi.py): `noise/service/noise/binapi.py`
- [Binary protocol](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/binproto.py): `noise/service/noise/binproto.py`
- [Cryptography](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/crypto.py): `noise/service/noise/crypto.py`
- [Messaging service](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/service.py): `noise/service/noise/service.py`
- [Message models](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/models.py): `noise/service/noise/models.py`
- [Messaging database](https://github.com/cubemastery/cubectf-2026/blob/main/noise/service/noise/db.py): `noise/service/noise/db.py`

### Other services

- [Casino TCP server](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/server.py): `vegas/service/vegas/server.py`
- [Casino commands](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/commands.py): `vegas/service/vegas/commands.py`
- [Casino state](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/database.py): `vegas/service/vegas/database.py`
- [Share service](https://github.com/cubemastery/cubectf-2026/blob/main/shaas/service/main.py): `shaas/service/main.py`
- [Native share code](https://github.com/cubemastery/cubectf-2026/blob/main/shaas/src/share.c): `shaas/src/share.c`
- [Telescope service](https://github.com/cubemastery/cubectf-2026/blob/main/telescope/service/src/main.cpp): `telescope/service/src/main.cpp`
- [Casino configuration](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/config.py): `vegas/service/vegas/config.py`
- [Casino session](https://github.com/cubemastery/cubectf-2026/blob/main/vegas/service/vegas/session.py): `vegas/service/vegas/session.py`

### Other components

- **Service users**

## Connections

- Service users → Donor HTTP server: send requests
- Donor HTTP server → Donor routes: dispatches to (evidence: `donor/service/src/server.js`)
- Donor routes → Donor handlers: routes to (evidence: `donor/service/src/routes.js`)
- Donor handlers → In-memory state: reads and writes (evidence: `donor/service/src/handlers/routing.js`)
- Donor handlers → Domain model: uses (evidence: `donor/service/src/handlers/routing.js`)
- Donor handlers → Parsing and utilities: parses with (evidence: `donor/service/src/handlers/routing.js`)
- Donor handlers → Response formatting: returns responses (evidence: `donor/service/src/handlers/routing.js`)
- Service users → Flightplan app: use service
- Flightplan clients → Flightplan app: calls service
- Flightplan app → Flightplan routes: imports routes (evidence: `flightplan/service/main.py`)
- Flightplan routes → Authentication: uses authentication (evidence: `flightplan/service/routes.py`)
- Flightplan routes → Plan operations: calls plan operations (evidence: `flightplan/service/routes.py`)
- Flightplan routes → SQLite database: queries database (evidence: `flightplan/service/routes.py`)
- Plan operations → SQLite database: uses database (evidence: `flightplan/service/flightplans.py`)
- Service users → Messaging TUI: use messaging
- Messaging TUI → Binary API: calls API (evidence: `noise/service/noise_client.py`)
- Binary API → Cryptography: uses crypto (evidence: `noise/service/noise/binapi.py`)
- Binary API → Binary protocol: uses protocol (evidence: `noise/service/noise/binapi.py`)
- Messaging service → Cryptography: uses crypto (evidence: `noise/service/noise/service.py`)
- Messaging service → Message models: uses models (evidence: `noise/service/noise/service.py`)
- Service users → Casino TCP server: connect
- Casino TCP server → Casino commands: dispatches commands (evidence: `vegas/service/vegas/server.py`)
- Casino TCP server → Casino state: provides database (evidence: `vegas/service/vegas/server.py`)
- Casino TCP server → Casino configuration: uses settings (evidence: `vegas/service/vegas/server.py`)
- Casino TCP server → Casino session: creates session (evidence: `vegas/service/vegas/server.py`)
- Service users → Share service: use service
- Service users → Telescope service: use service
