# imzielc/cardinal architecture

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

- Interactive diagram: https://gitdiagram.com/imzielc/cardinal
- Repository: https://github.com/imzielc/cardinal

## Overview

Cardinal is a BombSquad server package with a separate Discord bot and an automated tournament workflow. Discord staff create and configure a season, players register and verify their game identity, and ready players are matched into games; results feed tournament standings and Discord updates. The README also documents single- and double-elimination brackets, held staff-review posts, and administrative commands. The supplied tree contains no identifiable bot or tournament implementation files, so those components are documented at README.md; internal call relationships cannot be verified from the sampled source.

Main entry points: [`README.md`](https://github.com/imzielc/cardinal/blob/main/README.md) (Discord Bot), [`bombsquad_server`](https://github.com/imzielc/cardinal/blob/main/bombsquad_server) (BombSquad Server), [`config.toml`](https://github.com/imzielc/cardinal/blob/main/config.toml) (Server Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operations["Server Operations"]
  node_server["BombSquad Server"]
  node_configuration["Server Config<br/>[config.toml]"]
  node_bot["Discord Bot<br/>[README.md]"]
  node_socket["Local Socket Tunnel<br/>[README.md]"]
end

subgraph group_tournament["Tournament Workflow"]
  node_season["Season Management<br/>[README.md]"]
  node_registration["Player Registration<br/>[README.md]"]
  node_verification["Identity Verification<br/>[README.md]"]
  node_matchmaking["Ready Match Launch<br/>[README.md]"]
  node_brackets["Bracket Modes<br/>[README.md]"]
  node_results["Match Results<br/>[README.md]"]
end

subgraph group_publishing["Discord Publishing"]
  node_heldposts["Staff Review Posts<br/>[README.md]"]
  node_dashboards["Rankings Dashboards<br/>[README.md]"]
  node_webhooks["Discord Webhooks<br/>[README.md]"]
end

node_staff(("Staff"))
node_players(("Players"))
node_discord(("Discord"))

node_staff -->|"issues commands"| node_bot
node_players -->|"registers"| node_registration
node_registration -->|"provides codes"| node_verification
node_players -->|"verifies identity"| node_verification
node_players -->|"signals ready"| node_matchmaking
node_bot -->|"communicates through"| node_socket
node_socket -->|"tunnels commands"| node_server
node_staff -->|"creates season"| node_season
node_bot -->|"manages commands"| node_season
node_season -->|"opens registration"| node_registration
node_season -->|"starts tournament"| node_brackets
node_matchmaking -->|"launches match"| node_server
node_server -->|"completes matches"| node_results
node_results -->|"updates standings"| node_brackets
node_brackets -->|"queues review"| node_heldposts
node_heldposts -->|"publishes after review"| node_discord
node_results -->|"posts live updates"| node_webhooks
node_dashboards -->|"posts rankings"| node_webhooks
node_webhooks -->|"delivers messages"| node_discord
node_configuration -.->|"configures settings"| node_bot

click node_server "https://github.com/imzielc/cardinal/blob/main/bombsquad_server"
click node_configuration "https://github.com/imzielc/cardinal/blob/main/config.toml"
click node_bot "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_socket "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_season "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_registration "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_verification "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_matchmaking "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_brackets "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_results "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_heldposts "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_dashboards "https://github.com/imzielc/cardinal/blob/main/README.md"
click node_webhooks "https://github.com/imzielc/cardinal/blob/main/README.md"

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_configuration,node_bot,node_socket toneBlue
class node_season,node_registration,node_verification,node_matchmaking,node_brackets,node_results toneAmber
class node_heldposts,node_dashboards,node_webhooks toneMint
class node_staff,node_players,node_discord toneIndigo
```

## Components

### Server Operations

- [BombSquad Server](https://github.com/imzielc/cardinal/blob/main/bombsquad_server): `bombsquad_server`
- [Server Config](https://github.com/imzielc/cardinal/blob/main/config.toml): `config.toml`
- [Discord Bot](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Local Socket Tunnel](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`

### Tournament Workflow

- [Season Management](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Player Registration](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Identity Verification](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Ready Match Launch](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Bracket Modes](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Match Results](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`

### Discord Publishing

- [Staff Review Posts](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Rankings Dashboards](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`
- [Discord Webhooks](https://github.com/imzielc/cardinal/blob/main/README.md): `README.md`

### Other components

- **Staff**
- **Players**
- **Discord**

## Connections

- Staff → Discord Bot: issues commands (evidence: `README.md`)
- Players → Player Registration: registers (evidence: `README.md`)
- Player Registration → Identity Verification: provides codes (evidence: `README.md`)
- Players → Identity Verification: verifies identity (evidence: `README.md`)
- Players → Ready Match Launch: signals ready (evidence: `README.md`)
- Discord Bot → Local Socket Tunnel: communicates through (evidence: `README.md`)
- Local Socket Tunnel → BombSquad Server: tunnels commands (evidence: `README.md`)
- Staff → Season Management: creates season (evidence: `README.md`)
- Discord Bot → Season Management: manages commands (evidence: `README.md`)
- Season Management → Player Registration: opens registration (evidence: `README.md`)
- Season Management → Bracket Modes: starts tournament (evidence: `README.md`)
- Ready Match Launch → BombSquad Server: launches match (evidence: `README.md`)
- BombSquad Server → Match Results: completes matches (evidence: `README.md`)
- Match Results → Bracket Modes: updates standings (evidence: `README.md`)
- Bracket Modes → Staff Review Posts: queues review (evidence: `README.md`)
- Staff Review Posts → Discord: publishes after review (evidence: `README.md`)
- Match Results → Discord Webhooks: posts live updates (evidence: `README.md`)
- Rankings Dashboards → Discord Webhooks: posts rankings (evidence: `README.md`)
- Discord Webhooks → Discord: delivers messages (evidence: `README.md`)
- Server Config → Discord Bot: configures settings
