# lilithmod/launcher architecture

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

- Interactive diagram: https://gitdiagram.com/lilithmod/launcher
- Repository: https://github.com/lilithmod/launcher

## Overview

Lilith Launcher is a Rust/Slint desktop launcher for the Lilith application. The main workflow starts at the launcher UI: a user requests startup, the app reads configuration, checks release metadata, selects and downloads the platform artifact if needed, verifies an existing artifact, then starts the child process and routes its output back to the UI and logs window. The README is brief; the launch and download stages are supported by sampled Rust source, while UI details are limited to the file tree and main.rs callbacks.

Main entry points: [`src/main.rs`](https://github.com/lilithmod/launcher/blob/main/src/main.rs) (App orchestration), [`src/launch.rs`](https://github.com/lilithmod/launcher/blob/main/src/launch.rs) (Launch workflow), [`src/utils/config.rs`](https://github.com/lilithmod/launcher/blob/main/src/utils/config.rs) (Configuration), [`ui/app-window.slint`](https://github.com/lilithmod/launcher/blob/main/ui/app-window.slint) (Launcher windows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_ui["Launcher windows<br/>[app-window.slint]"]
end

subgraph group_control["Application control"]
  node_main["App orchestration<br/>[main.rs]"]
end

subgraph group_release["Release and launch"]
  node_launch["Launch workflow<br/>[launch.rs]"]
  node_release_ops["Release and artifact operations<br/>[download.rs]"]
  node_update["Update check<br/>[update.rs]"]
end

subgraph group_local["Local support"]
  node_config["Configuration<br/>[config.rs]"]
  node_file_paths["Launcher directories<br/>[files.rs]"]
  node_config_file["Launcher config file"]
  node_artifact_store["Downloaded artifacts"]
  node_logger["Log output<br/>[log.rs]"]
end

node_user(("User"))
node_api["Lilith API"]
node_child["Lilith process"]

node_user -.->|"uses"| node_ui
node_main -->|"binds callbacks"| node_ui
node_main -->|"initializes"| node_logger
node_main -->|"initializes directories"| node_file_paths
node_main -->|"loads settings"| node_config
node_main -->|"checks updates"| node_update
node_main -->|"starts or stops"| node_launch
node_launch -->|"reads settings"| node_config
node_launch -->|"locates artifact"| node_file_paths
node_launch -->|"fetches and downloads"| node_release_ops
node_release_ops -->|"requests releases and artifacts"| node_api
node_update -->|"requests version"| node_api
node_release_ops -->|"writes download"| node_artifact_store
node_config -->|"gets config path"| node_file_paths
node_config -->|"reads and writes"| node_config_file
node_launch -->|"spawns and monitors"| node_child
node_child -->|"signals runtime events"| node_ui
node_child -->|"streams log lines"| node_ui

click node_ui "https://github.com/lilithmod/launcher/blob/main/ui/app-window.slint"
click node_main "https://github.com/lilithmod/launcher/blob/main/src/main.rs"
click node_launch "https://github.com/lilithmod/launcher/blob/main/src/launch.rs"
click node_release_ops "https://github.com/lilithmod/launcher/blob/main/src/download.rs"
click node_update "https://github.com/lilithmod/launcher/blob/main/src/utils/update.rs"
click node_config "https://github.com/lilithmod/launcher/blob/main/src/utils/config.rs"
click node_file_paths "https://github.com/lilithmod/launcher/blob/main/src/utils/files.rs"
click node_logger "https://github.com/lilithmod/launcher/blob/main/src/utils/log.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_ui,node_user toneBlue
class node_main toneAmber
class node_launch,node_release_ops,node_update,node_api toneMint
class node_config,node_file_paths,node_config_file,node_artifact_store,node_logger toneRose
class node_child toneIndigo
```

## Components

### Desktop interface

- [Launcher windows](https://github.com/lilithmod/launcher/blob/main/ui/app-window.slint): `ui/app-window.slint`

### Application control

- [App orchestration](https://github.com/lilithmod/launcher/blob/main/src/main.rs): `src/main.rs`

### Release and launch

- [Launch workflow](https://github.com/lilithmod/launcher/blob/main/src/launch.rs): `src/launch.rs`
- [Release and artifact operations](https://github.com/lilithmod/launcher/blob/main/src/download.rs): `src/download.rs`
- [Update check](https://github.com/lilithmod/launcher/blob/main/src/utils/update.rs): `src/utils/update.rs`

### Local support

- [Configuration](https://github.com/lilithmod/launcher/blob/main/src/utils/config.rs): `src/utils/config.rs`
- [Launcher directories](https://github.com/lilithmod/launcher/blob/main/src/utils/files.rs): `src/utils/files.rs`
- **Launcher config file**
- **Downloaded artifacts**
- [Log output](https://github.com/lilithmod/launcher/blob/main/src/utils/log.rs): `src/utils/log.rs`

### Other components

- **User**
- **Lilith API**
- **Lilith process**

## Connections

- User → Launcher windows: uses
- App orchestration → Launcher windows: binds callbacks (evidence: `src/main.rs`)
- App orchestration → Log output: initializes (evidence: `src/main.rs`)
- App orchestration → Launcher directories: initializes directories (evidence: `src/main.rs`)
- App orchestration → Configuration: loads settings (evidence: `src/main.rs`)
- App orchestration → Update check: checks updates (evidence: `src/main.rs`)
- App orchestration → Launch workflow: starts or stops (evidence: `src/main.rs`)
- Launch workflow → Configuration: reads settings (evidence: `src/launch.rs`)
- Launch workflow → Launcher directories: locates artifact (evidence: `src/launch.rs`)
- Launch workflow → Release and artifact operations: fetches and downloads (evidence: `src/launch.rs`)
- Release and artifact operations → Lilith API: requests releases and artifacts (evidence: `src/download.rs`)
- Update check → Lilith API: requests version (evidence: `src/utils/update.rs`)
- Release and artifact operations → Downloaded artifacts: writes download (evidence: `src/download.rs`)
- Configuration → Launcher directories: gets config path (evidence: `src/utils/config.rs`)
- Configuration → Launcher config file: reads and writes (evidence: `src/utils/config.rs`)
- Launch workflow → Lilith process: spawns and monitors (evidence: `src/launch.rs`)
- Lilith process → Launcher windows: signals runtime events
- Lilith process → Launcher windows: streams log lines
