# lumen-media/lumen architecture

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

- Interactive diagram: https://gitdiagram.com/lumen-media/lumen
- Repository: https://github.com/lumen-media/lumen

## Overview

Lumen is a desktop live-event control room. Operators prepare lyrics and slides, organize media and a persistent show queue, then send content to a dedicated audience window; phones and LAN browsers extend control and viewing. The map also includes collaboration, profiles and backgrounds, and the module platform. README statements support the product-level flows; source excerpts confirm selected implementation links, but many runtime modules were not sampled, so uncertain internal wiring is omitted.

Main entry points: [`src/app/_layout/edit.tsx`](https://github.com/lumen-media/lumen/blob/main/src/app/_layout/edit.tsx) (Lyrics and slides), [`src/services/media-db-service.ts`](https://github.com/lumen-media/lumen/blob/main/src/services/media-db-service.ts) (Media library), [`src/app/media-window.tsx`](https://github.com/lumen-media/lumen/blob/main/src/app/media-window.tsx) (Audience output), [`src/lib/ipc/index.ts`](https://github.com/lumen-media/lumen/blob/main/src/lib/ipc/index.ts) (Tauri command bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["Operator and output"]
  node_editor["Lyrics and slides<br/>[edit.tsx]"]
  node_output["Audience output<br/>[media-window.tsx]"]
  node_presenter["Presenter controls"]
end

subgraph group_content["Content and playback"]
  node_library[("Media library")]
  node_mediafiles["File management"]
  node_queue["Show queue<br/>[queue-store.ts]"]
  node_player["Media playback<br/>[player-store.ts]"]
  node_profiles[("Profiles and notes<br/>[profile-service.ts]")]
  node_backgrounds["Audience backgrounds"]
end

subgraph group_live["Live and collaboration"]
  node_streaming["WebRTC streaming<br/>[manager.rs]"]
  node_chat["Operator chat<br/>[chat-panel.tsx]"]
  node_devices[("Paired devices<br/>[devices.rs]")]
end

subgraph group_platform["App platform"]
  node_module_store["Module store<br/>[store-browse.tsx]"]
  node_module_runtime["Module runtime<br/>[injector.ts]"]
  node_module_registry[("Module registry<br/>[registry.rs]")]
  node_ipc["Tauri command bridge<br/>[index.ts]"]
  node_desktop["Desktop command host<br/>[main.rs]"]
end

node_operator(("Operator"))
node_phone(("Phone or tablet"))
node_browser(("LAN browser"))

node_operator -->|"edits content"| node_editor
node_editor -->|"presents slides"| node_output
node_operator -->|"drives show"| node_presenter
node_operator -->|"organizes media"| node_library
node_library -->|"manages files"| node_mediafiles
node_operator -->|"orders show"| node_queue
node_queue -->|"queues playback"| node_player
node_player -->|"opens media window"| node_output
node_operator -->|"selects profile"| node_profiles
node_editor -->|"configures backgrounds"| node_backgrounds
node_phone -->|"pairs remotely"| node_devices
node_devices -->|"provides device state"| node_streaming
node_phone -->|"joins team chat"| node_chat
node_operator -->|"coordinates team"| node_chat
node_output -->|"broadcasts output"| node_streaming
node_browser -->|"follows presentation"| node_streaming
node_operator -->|"installs modules"| node_module_store
node_module_store -->|"manages modules"| node_module_runtime
node_module_runtime -.->|"loads installed modules"| node_module_registry
node_editor -->|"invokes commands"| node_ipc
node_library -->|"invokes commands"| node_ipc
node_ipc -->|"invokes Tauri"| node_desktop

click node_editor "https://github.com/lumen-media/lumen/blob/main/src/app/_layout/edit.tsx"
click node_output "https://github.com/lumen-media/lumen/blob/main/src/app/media-window.tsx"
click node_presenter "https://github.com/lumen-media/lumen/blob/main/src/components/presenter-controls.tsx"
click node_library "https://github.com/lumen-media/lumen/blob/main/src/services/media-db-service.ts"
click node_mediafiles "https://github.com/lumen-media/lumen/blob/main/src/services/file-management-service.ts"
click node_queue "https://github.com/lumen-media/lumen/blob/main/src/stores/queue-store.ts"
click node_player "https://github.com/lumen-media/lumen/blob/main/src/stores/player-store.ts"
click node_profiles "https://github.com/lumen-media/lumen/blob/main/src/services/profile-service.ts"
click node_backgrounds "https://github.com/lumen-media/lumen/blob/main/src/backgrounds/components/GeneratorSurface.tsx"
click node_streaming "https://github.com/lumen-media/lumen/blob/main/src-tauri/src/streaming/manager.rs"
click node_chat "https://github.com/lumen-media/lumen/blob/main/src/components/chat-panel.tsx"
click node_devices "https://github.com/lumen-media/lumen/blob/main/src-tauri/src/devices.rs"
click node_module_store "https://github.com/lumen-media/lumen/blob/main/src/app/store/store-browse.tsx"
click node_module_runtime "https://github.com/lumen-media/lumen/blob/main/src/modules/injector.ts"
click node_module_registry "https://github.com/lumen-media/lumen/blob/main/src-tauri/src/module_runtime/registry.rs"
click node_ipc "https://github.com/lumen-media/lumen/blob/main/src/lib/ipc/index.ts"
click node_desktop "https://github.com/lumen-media/lumen/blob/main/src-tauri/src/main.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_editor,node_output,node_presenter,node_browser toneBlue
class node_library,node_mediafiles,node_queue,node_player,node_profiles,node_backgrounds toneAmber
class node_streaming,node_chat,node_devices toneMint
class node_module_store,node_module_runtime,node_module_registry,node_ipc,node_desktop toneRose
class node_operator,node_phone toneIndigo
```

## Components

### Operator and output

- [Lyrics and slides](https://github.com/lumen-media/lumen/blob/main/src/app/_layout/edit.tsx): `src/app/_layout/edit.tsx`
- [Audience output](https://github.com/lumen-media/lumen/blob/main/src/app/media-window.tsx): `src/app/media-window.tsx`
- [Presenter controls](https://github.com/lumen-media/lumen/blob/main/src/components/presenter-controls.tsx): `src/components/presenter-controls.tsx`

### Content and playback

- [Media library](https://github.com/lumen-media/lumen/blob/main/src/services/media-db-service.ts): `src/services/media-db-service.ts`
- [File management](https://github.com/lumen-media/lumen/blob/main/src/services/file-management-service.ts): `src/services/file-management-service.ts`
- [Show queue](https://github.com/lumen-media/lumen/blob/main/src/stores/queue-store.ts): `src/stores/queue-store.ts`
- [Media playback](https://github.com/lumen-media/lumen/blob/main/src/stores/player-store.ts): `src/stores/player-store.ts`
- [Profiles and notes](https://github.com/lumen-media/lumen/blob/main/src/services/profile-service.ts): `src/services/profile-service.ts`
- [Audience backgrounds](https://github.com/lumen-media/lumen/blob/main/src/backgrounds/components/GeneratorSurface.tsx): `src/backgrounds/components/GeneratorSurface.tsx`

### Live and collaboration

- [WebRTC streaming](https://github.com/lumen-media/lumen/blob/main/src-tauri/src/streaming/manager.rs): `src-tauri/src/streaming/manager.rs`
- [Operator chat](https://github.com/lumen-media/lumen/blob/main/src/components/chat-panel.tsx): `src/components/chat-panel.tsx`
- [Paired devices](https://github.com/lumen-media/lumen/blob/main/src-tauri/src/devices.rs): `src-tauri/src/devices.rs`

### App platform

- [Module store](https://github.com/lumen-media/lumen/blob/main/src/app/store/store-browse.tsx): `src/app/store/store-browse.tsx`
- [Module runtime](https://github.com/lumen-media/lumen/blob/main/src/modules/injector.ts): `src/modules/injector.ts`
- [Module registry](https://github.com/lumen-media/lumen/blob/main/src-tauri/src/module_runtime/registry.rs): `src-tauri/src/module_runtime/registry.rs`
- [Tauri command bridge](https://github.com/lumen-media/lumen/blob/main/src/lib/ipc/index.ts): `src/lib/ipc/index.ts`
- [Desktop command host](https://github.com/lumen-media/lumen/blob/main/src-tauri/src/main.rs): `src-tauri/src/main.rs`

### Other components

- **Operator**
- **Phone or tablet**
- **LAN browser**

## Connections

- Operator → Lyrics and slides: edits content
- Lyrics and slides → Audience output: presents slides
- Operator → Presenter controls: drives show
- Operator → Media library: organizes media
- Media library → File management: manages files (evidence: `src/services/file-management-service.ts`)
- Operator → Show queue: orders show
- Show queue → Media playback: queues playback (evidence: `src/stores/queue-store.ts`)
- Media playback → Audience output: opens media window (evidence: `src/stores/player-store.ts`)
- Operator → Profiles and notes: selects profile
- Lyrics and slides → Audience backgrounds: configures backgrounds (evidence: `src/app/_layout/edit.tsx`)
- Phone or tablet → Paired devices: pairs remotely
- Paired devices → WebRTC streaming: provides device state (evidence: `src-tauri/src/streaming/manager.rs`)
- Phone or tablet → Operator chat: joins team chat
- Operator → Operator chat: coordinates team
- Audience output → WebRTC streaming: broadcasts output
- LAN browser → WebRTC streaming: follows presentation
- Operator → Module store: installs modules
- Module store → Module runtime: manages modules
- Module runtime → Module registry: loads installed modules
- Lyrics and slides → Tauri command bridge: invokes commands (evidence: `src/app/_layout/edit.tsx`)
- Media library → Tauri command bridge: invokes commands (evidence: `src/services/media-db-service.ts`)
- Tauri command bridge → Desktop command host: invokes Tauri
