# crhowell3/centurion architecture

> Architecture diagram of the GitHub repository crhowell3/centurion, 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/crhowell3/centurion
- Repository: https://github.com/crhowell3/centurion

## Overview

Centurion is a GUI manager for DIS simulations using SIMAN PDUs. A user loads scenario configuration, then uses the dashboard to issue initialize, operate, pause, shutdown, or restart commands; the Tauri backend sends the corresponding UDP PDUs and waits for acknowledgements or responses. The backend also loads and saves application configuration and maintains request IDs. The README documents the DIS/SIMAN purpose; unsampled command details are represented only where supported by the source index, so some configuration links are omitted.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/lib.rs) (Tauri runtime), [`src-tauri/src/cmd/transmit.rs`](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/cmd/transmit.rs) (SIMAN command handler), [`src/app.rs`](https://github.com/crhowell3/centurion/blob/main/src/app.rs) (App state router), [`src/welcome.rs`](https://github.com/crhowell3/centurion/blob/main/src/welcome.rs) (Scenario loader UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["GUI"]
  node_frontend_entry["Frontend entry<br/>[main.rs]"]
  node_app["App state router<br/>[app.rs]"]
  node_welcome["Scenario loader UI<br/>[welcome.rs]"]
  node_dashboard["Simulation dashboard<br/>[dashboard.rs]"]
end

subgraph group_backend["Application backend"]
  node_tauri_runtime["Tauri runtime<br/>[lib.rs]"]
  node_config_commands["Configuration commands<br/>[config.rs]"]
  node_transmit_command["SIMAN command handler<br/>[transmit.rs]"]
  node_logging["Logging<br/>[logging.rs]"]
end

subgraph group_config["Configuration and state"]
  node_config_loader["Config persistence<br/>[core.rs]"]
  node_config_models["Config models<br/>[models.rs]"]
  node_app_state["Simulation request state<br/>[app_state.rs]"]
end

subgraph group_network["DIS communication"]
  node_udp_network{{"UDP DIS network"}}
end

node_user(("Simulation operator"))

node_user -->|"loads scenario"| node_welcome
node_user -->|"issues controls"| node_dashboard
node_frontend_entry -->|"renders"| node_app
node_app -->|"shows before load"| node_welcome
node_app -->|"shows after load"| node_dashboard
node_welcome -->|"invokes scenario load"| node_config_commands
node_dashboard -->|"invokes controls"| node_transmit_command
node_tauri_runtime -->|"registers commands"| node_config_commands
node_tauri_runtime -->|"registers command"| node_transmit_command
node_tauri_runtime -->|"loads configuration"| node_config_loader
node_tauri_runtime -->|"initializes logging"| node_logging
node_transmit_command -->|"updates request IDs"| node_app_state
node_transmit_command -->|"sends and receives PDUs"| node_udp_network
node_config_loader -->|"loads and saves"| node_config_models

click node_frontend_entry "https://github.com/crhowell3/centurion/blob/main/src/main.rs"
click node_app "https://github.com/crhowell3/centurion/blob/main/src/app.rs"
click node_welcome "https://github.com/crhowell3/centurion/blob/main/src/welcome.rs"
click node_dashboard "https://github.com/crhowell3/centurion/blob/main/src/dashboard.rs"
click node_tauri_runtime "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/lib.rs"
click node_config_commands "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/cmd/config.rs"
click node_transmit_command "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/cmd/transmit.rs"
click node_config_loader "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/config/core.rs"
click node_config_models "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/config/models.rs"
click node_app_state "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/core/app_state.rs"
click node_logging "https://github.com/crhowell3/centurion/blob/main/src-tauri/src/utils/logging.rs"

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_frontend_entry,node_app,node_welcome,node_dashboard toneBlue
class node_tauri_runtime,node_config_commands,node_transmit_command,node_logging toneAmber
class node_config_loader,node_config_models,node_app_state toneMint
class node_udp_network toneRose
class node_user toneIndigo
```

## Components

### GUI

- [Frontend entry](https://github.com/crhowell3/centurion/blob/main/src/main.rs): `src/main.rs`
- [App state router](https://github.com/crhowell3/centurion/blob/main/src/app.rs): `src/app.rs`
- [Scenario loader UI](https://github.com/crhowell3/centurion/blob/main/src/welcome.rs): `src/welcome.rs`
- [Simulation dashboard](https://github.com/crhowell3/centurion/blob/main/src/dashboard.rs): `src/dashboard.rs`

### Application backend

- [Tauri runtime](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Configuration commands](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/cmd/config.rs): `src-tauri/src/cmd/config.rs`
- [SIMAN command handler](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/cmd/transmit.rs): `src-tauri/src/cmd/transmit.rs`
- [Logging](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/utils/logging.rs): `src-tauri/src/utils/logging.rs`

### Configuration and state

- [Config persistence](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/config/core.rs): `src-tauri/src/config/core.rs`
- [Config models](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/config/models.rs): `src-tauri/src/config/models.rs`
- [Simulation request state](https://github.com/crhowell3/centurion/blob/main/src-tauri/src/core/app_state.rs): `src-tauri/src/core/app_state.rs`

### DIS communication

- **UDP DIS network**

### Other components

- **Simulation operator**

## Connections

- Simulation operator → Scenario loader UI: loads scenario (evidence: `src/welcome.rs`)
- Simulation operator → Simulation dashboard: issues controls (evidence: `src/dashboard.rs`)
- Frontend entry → App state router: renders (evidence: `src/main.rs`)
- App state router → Scenario loader UI: shows before load (evidence: `src/app.rs`)
- App state router → Simulation dashboard: shows after load (evidence: `src/app.rs`)
- Scenario loader UI → Configuration commands: invokes scenario load (evidence: `src/welcome.rs`)
- Simulation dashboard → SIMAN command handler: invokes controls (evidence: `src/dashboard.rs`)
- Tauri runtime → Configuration commands: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → SIMAN command handler: registers command (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Config persistence: loads configuration (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Logging: initializes logging (evidence: `src-tauri/src/lib.rs`)
- SIMAN command handler → Simulation request state: updates request IDs (evidence: `src-tauri/src/cmd/transmit.rs`)
- SIMAN command handler → UDP DIS network: sends and receives PDUs (evidence: `src-tauri/src/cmd/transmit.rs`)
- Config persistence → Config models: loads and saves (evidence: `src-tauri/src/config/core.rs`)
