# fritztechnic/lichtpult architecture

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

- Interactive diagram: https://gitdiagram.com/fritztechnic/lichtpult
- Repository: https://github.com/fritztechnic/lichtpult

## Overview

Lichtpult is a stage-lighting console: operators patch fixtures, select and program looks, record cues, run cuelists, and send rendered DMX output. The Svelte interface sends actions through a shared store and JSON API to the Rust engine; that engine owns show state, programmer values, playback and effects. Supporting branches cover fixture definitions/import, MIDI control, Onyx show import, stage planning, and output monitoring. The README and sampled references establish the main boundaries; several view-to-engine details and unsampled integrations are documented capabilities rather than inspected call paths.

Main entry points: [`ui/src/App.svelte`](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/App.svelte) (App shell), [`ui/src/store.svelte.ts`](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/store.svelte.ts) (UI store), [`src/api.rs`](https://github.com/fritztechnic/lichtpult/blob/main/src/api.rs) (JSON API), [`src/engine.rs`](https://github.com/fritztechnic/lichtpult/blob/main/src/engine.rs) (Show and playback engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Operator interface"]
  node_app["App shell<br/>[App.svelte]"]
  node_store["UI store<br/>[store.svelte.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_compose["Compose<br/>[Compose.svelte]"]
  node_playback["Playback<br/>[Playback.svelte]"]
  node_patch["Fixture patch<br/>[Patch.svelte]"]
  node_plan["Stage plan<br/>[Plan.svelte]"]
  node_presets["Presets<br/>[Presets.svelte]"]
  node_output_view["Output monitor<br/>[Output.svelte]"]
  node_universes["Universe view<br/>[Universes.svelte]"]
end

subgraph group_core["Show engine"]
  node_api["JSON API<br/>[api.rs]"]
  node_engine["Show and playback engine<br/>[engine.rs]"]
  node_fixture["Fixture model<br/>[fixture.rs]"]
  node_command["Command parser<br/>[cmd.rs]"]
end

subgraph group_integration["Imports and control"]
  node_gdtf["GDTF and OFL import<br/>[gdtf.rs]"]
  node_onyx["Onyx show import<br/>[onyx.rs]"]
  node_midi["MIDI control<br/>[midi.rs]"]
end

subgraph group_output["Lighting output"]
  node_output_core["DMX network output<br/>[output.rs]"]
  node_dmx_node["ESP32 DMX node<br/>[main.cpp]"]
end

node_operator(("Lighting operator"))
node_midi_device(("MIDI device"))
node_lighting_network(("Art-Net / sACN"))

node_operator -->|"operates"| node_app
node_app -->|"uses state"| node_store
node_app -->|"shows views"| node_compose
node_app -->|"shows views"| node_playback
node_app -->|"shows views"| node_patch
node_app -->|"shows views"| node_plan
node_app -->|"shows views"| node_presets
node_app -->|"shows views"| node_output_view
node_app -->|"shows views"| node_universes
node_compose -->|"dispatches actions"| node_store
node_playback -->|"controls playback"| node_store
node_patch -->|"dispatches changes"| node_store
node_plan -->|"uses state"| node_store
node_presets -->|"uses state"| node_store
node_output_view -->|"uses state"| node_store
node_universes -->|"uses state"| node_store
node_store -->|"calls methods"| node_api_client
node_api_client -->|"sends API requests"| node_api
node_api -->|"dispatches actions"| node_engine
node_api -->|"runs commands"| node_command
node_api -->|"imports fixtures"| node_gdtf
node_api -->|"imports shows"| node_onyx
node_api -->|"configures MIDI"| node_midi
node_api -->|"configures output"| node_output_core
node_engine -->|"uses fixture model"| node_fixture
node_command -->|"parses actions"| node_engine
node_gdtf -->|"builds fixture types"| node_fixture
node_onyx -->|"transfers show data"| node_engine
node_onyx -->|"maps fixtures"| node_fixture
node_midi_device -->|"sends controls"| node_midi
node_midi -->|"dispatches controls"| node_engine
node_engine -.->|"renders DMX"| node_output_core
node_output_core -->|"sends DMX"| node_lighting_network
node_lighting_network -->|"feeds node"| node_dmx_node

click node_app "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/App.svelte"
click node_store "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/store.svelte.ts"
click node_api_client "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/api.ts"
click node_compose "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Compose.svelte"
click node_playback "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Playback.svelte"
click node_patch "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Patch.svelte"
click node_plan "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Plan.svelte"
click node_presets "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Presets.svelte"
click node_output_view "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Output.svelte"
click node_universes "https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Universes.svelte"
click node_api "https://github.com/fritztechnic/lichtpult/blob/main/src/api.rs"
click node_engine "https://github.com/fritztechnic/lichtpult/blob/main/src/engine.rs"
click node_fixture "https://github.com/fritztechnic/lichtpult/blob/main/src/fixture.rs"
click node_command "https://github.com/fritztechnic/lichtpult/blob/main/src/cmd.rs"
click node_gdtf "https://github.com/fritztechnic/lichtpult/blob/main/src/gdtf.rs"
click node_onyx "https://github.com/fritztechnic/lichtpult/blob/main/src/onyx.rs"
click node_midi "https://github.com/fritztechnic/lichtpult/blob/main/src/midi.rs"
click node_output_core "https://github.com/fritztechnic/lichtpult/blob/main/src/output.rs"
click node_dmx_node "https://github.com/fritztechnic/lichtpult/blob/main/firmware/esp32-dmx/src/main.cpp"

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_app,node_store,node_api_client,node_compose,node_playback,node_patch,node_plan,node_presets,node_output_view,node_universes toneBlue
class node_api,node_engine,node_fixture,node_command toneAmber
class node_gdtf,node_onyx,node_midi toneMint
class node_output_core,node_dmx_node toneRose
class node_operator,node_midi_device,node_lighting_network toneIndigo
```

## Components

### Operator interface

- [App shell](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/App.svelte): `ui/src/App.svelte`
- [UI store](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/store.svelte.ts): `ui/src/store.svelte.ts`
- [API client](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/api.ts): `ui/src/api.ts`
- [Compose](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Compose.svelte): `ui/src/lib/Compose.svelte`
- [Playback](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Playback.svelte): `ui/src/lib/Playback.svelte`
- [Fixture patch](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Patch.svelte): `ui/src/lib/Patch.svelte`
- [Stage plan](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Plan.svelte): `ui/src/lib/Plan.svelte`
- [Presets](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Presets.svelte): `ui/src/lib/Presets.svelte`
- [Output monitor](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Output.svelte): `ui/src/lib/Output.svelte`
- [Universe view](https://github.com/fritztechnic/lichtpult/blob/main/ui/src/lib/Universes.svelte): `ui/src/lib/Universes.svelte`

### Show engine

- [JSON API](https://github.com/fritztechnic/lichtpult/blob/main/src/api.rs): `src/api.rs`
- [Show and playback engine](https://github.com/fritztechnic/lichtpult/blob/main/src/engine.rs): `src/engine.rs`
- [Fixture model](https://github.com/fritztechnic/lichtpult/blob/main/src/fixture.rs): `src/fixture.rs`
- [Command parser](https://github.com/fritztechnic/lichtpult/blob/main/src/cmd.rs): `src/cmd.rs`

### Imports and control

- [GDTF and OFL import](https://github.com/fritztechnic/lichtpult/blob/main/src/gdtf.rs): `src/gdtf.rs`
- [Onyx show import](https://github.com/fritztechnic/lichtpult/blob/main/src/onyx.rs): `src/onyx.rs`
- [MIDI control](https://github.com/fritztechnic/lichtpult/blob/main/src/midi.rs): `src/midi.rs`

### Lighting output

- [DMX network output](https://github.com/fritztechnic/lichtpult/blob/main/src/output.rs): `src/output.rs`
- [ESP32 DMX node](https://github.com/fritztechnic/lichtpult/blob/main/firmware/esp32-dmx/src/main.cpp): `firmware/esp32-dmx/src/main.cpp`

### Other components

- **Lighting operator**
- **MIDI device**
- **Art-Net / sACN**

## Connections

- Lighting operator → App shell: operates
- App shell → UI store: uses state (evidence: `ui/src/App.svelte`)
- App shell → Compose: shows views (evidence: `ui/src/App.svelte`)
- App shell → Playback: shows views (evidence: `ui/src/App.svelte`)
- App shell → Fixture patch: shows views (evidence: `ui/src/App.svelte`)
- App shell → Stage plan: shows views (evidence: `ui/src/App.svelte`)
- App shell → Presets: shows views (evidence: `ui/src/App.svelte`)
- App shell → Output monitor: shows views (evidence: `ui/src/App.svelte`)
- App shell → Universe view: shows views (evidence: `ui/src/App.svelte`)
- Compose → UI store: dispatches actions (evidence: `ui/src/lib/Compose.svelte`)
- Playback → UI store: controls playback (evidence: `ui/src/lib/Playback.svelte`)
- Fixture patch → UI store: dispatches changes (evidence: `ui/src/lib/Patch.svelte`)
- Stage plan → UI store: uses state (evidence: `ui/src/lib/Plan.svelte`)
- Presets → UI store: uses state (evidence: `ui/src/lib/Presets.svelte`)
- Output monitor → UI store: uses state (evidence: `ui/src/lib/Output.svelte`)
- Universe view → UI store: uses state (evidence: `ui/src/lib/Universes.svelte`)
- UI store → API client: calls methods (evidence: `ui/src/store.svelte.ts`)
- API client → JSON API: sends API requests
- JSON API → Show and playback engine: dispatches actions (evidence: `src/api.rs`)
- JSON API → Command parser: runs commands (evidence: `src/api.rs`)
- JSON API → GDTF and OFL import: imports fixtures (evidence: `src/api.rs`)
- JSON API → Onyx show import: imports shows (evidence: `src/api.rs`)
- JSON API → MIDI control: configures MIDI (evidence: `src/api.rs`)
- JSON API → DMX network output: configures output (evidence: `src/api.rs`)
- Show and playback engine → Fixture model: uses fixture model (evidence: `src/engine.rs`)
- Command parser → Show and playback engine: parses actions (evidence: `src/cmd.rs`)
- GDTF and OFL import → Fixture model: builds fixture types (evidence: `src/gdtf.rs`)
- Onyx show import → Show and playback engine: transfers show data (evidence: `src/onyx.rs`)
- Onyx show import → Fixture model: maps fixtures (evidence: `src/onyx.rs`)
- MIDI device → MIDI control: sends controls
- MIDI control → Show and playback engine: dispatches controls (evidence: `src/midi.rs`)
- Show and playback engine → DMX network output: renders DMX
- DMX network output → Art-Net / sACN: sends DMX
- Art-Net / sACN → ESP32 DMX node: feeds node
