# lordmiltis-dev/archx architecture

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

- Interactive diagram: https://gitdiagram.com/lordmiltis-dev/archx
- Repository: https://github.com/lordmiltis-dev/archx

## Overview

ArchX is a work-in-progress lighting framework. The demonstrated user workflow is a command-line interpreter that packs Protobuf show data into `.archx`, unpacks it, or displays show information; the container handles the file format, while autosave code supports rotating backups and recovery. Native code also provides Art-Net packet parsing/building and a DMX output interface. Most console, GUI, pixel-mapping, fixture-library, and extension flows are documented goals rather than verified runtime paths; those links are shown as planned. Sampled source does not establish wiring between the Kotlin Master and native components.

Main entry points: [`master/src/main/kotlin`](https://github.com/lordmiltis-dev/archx/tree/main/master/src/main/kotlin) (Master state), [`interpreter/src/container.rs`](https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/container.rs) (ArchX container), [`native/divider`](https://github.com/lordmiltis-dev/archx/tree/main/native/divider) (Divider assembler), [`interpreter/src/main.rs`](https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/main.rs) (Interpreter CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_show["Show and persistence"]
  node_interpreter["Interpreter CLI<br/>[main.rs]"]
  node_container["ArchX container<br/>[container.rs]"]
  node_autosave["Autosave recovery<br/>[autosave.rs]"]
  node_showfile_disk[("Showfile files")]
end

subgraph group_native["Native lighting"]
  node_dmx_output["DMX output<br/>[dmx_output.cpp]"]
  node_artnet["Art-Net codec<br/>[artnet_packet.cpp]"]
end

subgraph group_planned["Planned runtime modules"]
  node_master["Master state"]
  node_gui["GUI submaster"]
  node_divider["Divider assembler"]
  node_usb["USB submaster"]
  node_pixel["Pixel mapping"]
  node_fixtures["Fixture library"]
  node_extensions["Import extensions"]
end

subgraph group_contract["Shared data contract"]
  node_showfile["Showfile schema<br/>[showfile.proto]"]
end

node_operator(("Operator"))
node_console(("Lighting console"))
node_dmx_network(("DMX Art-Net devices"))

node_operator -->|"runs commands"| node_interpreter
node_interpreter -->|"packs and loads"| node_container
node_container -->|"encodes data"| node_showfile
node_container -->|"reads and writes"| node_showfile_disk
node_autosave -->|"saves and loads"| node_container
node_master -.->|"uses shared schema"| node_showfile
node_master -.->|"drives interface"| node_gui
node_console -.->|"sends console data"| node_usb
node_usb -.->|"forwards events"| node_divider
node_divider -.->|"routes events"| node_master
node_master -.->|"sends output values"| node_divider
node_divider -.->|"dispatches output"| node_dmx_output
node_dmx_output -.->|"builds Art-Net packets"| node_artnet
node_artnet -.->|"sends DMX data"| node_dmx_network
node_master -.->|"provides 2D values"| node_pixel
node_pixel -.->|"returns generated values"| node_master
node_fixtures -.->|"provides fixture profiles"| node_master
node_extensions -.->|"imports show formats"| node_master

click node_interpreter "https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/main.rs"
click node_container "https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/container.rs"
click node_autosave "https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/autosave.rs"
click node_showfile "https://github.com/lordmiltis-dev/archx/blob/main/schema/showfile.proto"
click node_master "https://github.com/lordmiltis-dev/archx/tree/main/master/src/main/kotlin"
click node_gui "https://github.com/lordmiltis-dev/archx/tree/main/gui"
click node_divider "https://github.com/lordmiltis-dev/archx/tree/main/native/divider"
click node_usb "https://github.com/lordmiltis-dev/archx/tree/main/native/usb"
click node_dmx_output "https://github.com/lordmiltis-dev/archx/blob/main/native/dmx/nativeDMX/dmx_output.cpp"
click node_artnet "https://github.com/lordmiltis-dev/archx/blob/main/native/dmx/ArtNet/artnet_packet.cpp"
click node_pixel "https://github.com/lordmiltis-dev/archx/tree/main/native/pixelmapper"
click node_fixtures "https://github.com/lordmiltis-dev/archx/tree/main/native/fixtures"
click node_extensions "https://github.com/lordmiltis-dev/archx/tree/main/extensions"

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_interpreter,node_container,node_autosave,node_showfile_disk toneBlue
class node_dmx_output,node_artnet toneAmber
class node_master,node_gui,node_divider,node_usb,node_pixel,node_fixtures,node_extensions toneMint
class node_showfile toneRose
class node_operator,node_console,node_dmx_network toneIndigo
```

## Components

### Show and persistence

- [Interpreter CLI](https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/main.rs): `interpreter/src/main.rs`
- [ArchX container](https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/container.rs): `interpreter/src/container.rs`
- [Autosave recovery](https://github.com/lordmiltis-dev/archx/blob/main/interpreter/src/autosave.rs): `interpreter/src/autosave.rs`
- **Showfile files**

### Native lighting

- [DMX output](https://github.com/lordmiltis-dev/archx/blob/main/native/dmx/nativeDMX/dmx_output.cpp): `native/dmx/nativeDMX/dmx_output.cpp`
- [Art-Net codec](https://github.com/lordmiltis-dev/archx/blob/main/native/dmx/ArtNet/artnet_packet.cpp): `native/dmx/ArtNet/artnet_packet.cpp`

### Planned runtime modules

- [Master state](https://github.com/lordmiltis-dev/archx/tree/main/master/src/main/kotlin): `master/src/main/kotlin`
- [GUI submaster](https://github.com/lordmiltis-dev/archx/tree/main/gui): `gui`
- [Divider assembler](https://github.com/lordmiltis-dev/archx/tree/main/native/divider): `native/divider`
- [USB submaster](https://github.com/lordmiltis-dev/archx/tree/main/native/usb): `native/usb`
- [Pixel mapping](https://github.com/lordmiltis-dev/archx/tree/main/native/pixelmapper): `native/pixelmapper`
- [Fixture library](https://github.com/lordmiltis-dev/archx/tree/main/native/fixtures): `native/fixtures`
- [Import extensions](https://github.com/lordmiltis-dev/archx/tree/main/extensions): `extensions`

### Shared data contract

- [Showfile schema](https://github.com/lordmiltis-dev/archx/blob/main/schema/showfile.proto): `schema/showfile.proto`

### Other components

- **Operator**
- **Lighting console**
- **DMX Art-Net devices**

## Connections

- Operator → Interpreter CLI: runs commands (evidence: `interpreter/src/main.rs`)
- Interpreter CLI → ArchX container: packs and loads (evidence: `interpreter/src/main.rs`)
- ArchX container → Showfile schema: encodes data (evidence: `interpreter/src/container.rs`)
- ArchX container → Showfile files: reads and writes (evidence: `interpreter/src/container.rs`)
- Autosave recovery → ArchX container: saves and loads (evidence: `interpreter/src/autosave.rs`)
- Master state → Showfile schema: uses shared schema (evidence: `README.md`)
- Master state → GUI submaster: drives interface (evidence: `README.md`)
- Lighting console → USB submaster: sends console data (evidence: `README.md`)
- USB submaster → Divider assembler: forwards events (evidence: `README.md`)
- Divider assembler → Master state: routes events (evidence: `README.md`)
- Master state → Divider assembler: sends output values (evidence: `README.md`)
- Divider assembler → DMX output: dispatches output (evidence: `README.md`)
- DMX output → Art-Net codec: builds Art-Net packets
- Art-Net codec → DMX Art-Net devices: sends DMX data (evidence: `README.md`)
- Master state → Pixel mapping: provides 2D values (evidence: `README.md`)
- Pixel mapping → Master state: returns generated values (evidence: `README.md`)
- Fixture library → Master state: provides fixture profiles (evidence: `README.md`)
- Import extensions → Master state: imports show formats (evidence: `README.md`)
