# tshadofr/leila architecture

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

- Interactive diagram: https://gitdiagram.com/tshadofr/leila
- Repository: https://github.com/tshadofr/leila

## Overview

Leila is a Windows game launcher: users select their own game folder, configure graphics and controls, check prerequisites, preload shaders, then start the game through the bundled engine. The launcher also manages engine installation, optional runtime/DLSS downloads, updates, and system reports. In-game features and engine fixes are delivered through the patched engine. The sampled backend excerpts show the launch and prerequisite dependencies; several UI-to-command and unsampled subsystem links are documented or left unverified rather than assumed.

Main entry points: [`launcher/src/App.tsx`](https://github.com/tshadofr/leila/blob/main/launcher/src/App.tsx) (App shell), [`launcher/src-tauri/src/launch.rs`](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/launch.rs) (Launch and preload), [`launcher/src/lib/api.ts`](https://github.com/tshadofr/leila/blob/main/launcher/src/lib/api.ts) (UI command API), [`launcher/src-tauri/src/lib.rs`](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/lib.rs) (Tauri commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Launcher interface"]
  node_app["App shell<br/>[App.tsx]"]
  node_library["Game library<br/>[Library.tsx]"]
  node_play["Play screen<br/>[Play.tsx]"]
  node_settings["Settings screen<br/>[Settings.tsx]"]
  node_ui_prereqs["Prerequisite UI<br/>[Prerequisites.tsx]"]
  node_ui_updates["Update UI<br/>[UpdateBar.tsx]"]
  node_api["UI command API<br/>[api.ts]"]
end

subgraph group_backend["Launcher services"]
  node_commands["Tauri commands<br/>[lib.rs]"]
  node_config[("Configuration<br/>[config.rs]")]
  node_game_settings["Game settings writer<br/>[game_settings.rs]"]
  node_launch["Launch and preload<br/>[launch.rs]"]
  node_system["System report<br/>[system.rs]"]
end

subgraph group_setup["Install and readiness"]
  node_prereqs["Prerequisite checks<br/>[prereqs.rs]"]
  node_engine_files["Engine installer<br/>[engine.rs]"]
  node_downloads["Dependency downloads<br/>[download.rs]"]
  node_updates["Self updater<br/>[update.rs]"]
end

subgraph group_game["Game runtime"]
  node_patched_engine["Patched game engine"]
end

node_player(("Player"))
node_external_releases{{"Release services"}}
node_external_runtime{{"NVIDIA and Microsoft"}}
node_game["Player's game"]

node_player -->|"uses"| node_app
node_app -->|"renders"| node_library
node_app -->|"renders"| node_play
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_ui_prereqs
node_app -->|"renders"| node_ui_updates
node_app -->|"calls"| node_api
node_ui_prereqs -->|"calls"| node_api
node_ui_updates -->|"calls"| node_api
node_library -->|"calls"| node_api
node_play -->|"calls"| node_api
node_settings -->|"calls"| node_api
node_api -.->|"invokes"| node_commands
node_commands -->|"loads and saves"| node_config
node_commands -->|"builds report"| node_system
node_commands -->|"dispatches checks"| node_prereqs
node_commands -->|"dispatches launch"| node_launch
node_commands -->|"dispatches update"| node_updates
node_launch -->|"reads options"| node_config
node_launch -->|"writes settings"| node_game_settings
node_launch -->|"uses engine"| node_engine_files
node_launch -->|"uses downloads"| node_downloads
node_launch -->|"reads specs"| node_system
node_prereqs -->|"reads config"| node_config
node_prereqs -->|"checks specs"| node_system
node_prereqs -->|"checks dependencies"| node_downloads
node_prereqs -->|"checks engine"| node_engine_files
node_updates -->|"downloads update"| node_downloads
node_updates -->|"checks releases"| node_external_releases
node_downloads -->|"fetches runtimes"| node_external_runtime
node_engine_files -->|"unpacks engine"| node_patched_engine
node_patched_engine -->|"runs game"| node_game
node_launch -->|"starts game"| node_game

click node_app "https://github.com/tshadofr/leila/blob/main/launcher/src/App.tsx"
click node_library "https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Library.tsx"
click node_play "https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Play.tsx"
click node_settings "https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Settings.tsx"
click node_ui_prereqs "https://github.com/tshadofr/leila/blob/main/launcher/src/components/Prerequisites.tsx"
click node_ui_updates "https://github.com/tshadofr/leila/blob/main/launcher/src/components/UpdateBar.tsx"
click node_api "https://github.com/tshadofr/leila/blob/main/launcher/src/lib/api.ts"
click node_commands "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/lib.rs"
click node_config "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/config.rs"
click node_game_settings "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/game_settings.rs"
click node_launch "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/launch.rs"
click node_system "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/system.rs"
click node_prereqs "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/prereqs.rs"
click node_engine_files "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/engine.rs"
click node_downloads "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/download.rs"
click node_updates "https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/update.rs"
click node_patched_engine "https://github.com/tshadofr/leila/tree/main/engine/patches"

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_library,node_play,node_settings,node_ui_prereqs,node_ui_updates,node_api toneBlue
class node_commands,node_config,node_game_settings,node_launch,node_system toneAmber
class node_prereqs,node_engine_files,node_downloads,node_updates toneMint
class node_patched_engine toneRose
class node_player,node_external_releases,node_external_runtime,node_game toneIndigo
```

## Components

### Launcher interface

- [App shell](https://github.com/tshadofr/leila/blob/main/launcher/src/App.tsx): `launcher/src/App.tsx`
- [Game library](https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Library.tsx): `launcher/src/screens/Library.tsx`
- [Play screen](https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Play.tsx): `launcher/src/screens/Play.tsx`
- [Settings screen](https://github.com/tshadofr/leila/blob/main/launcher/src/screens/Settings.tsx): `launcher/src/screens/Settings.tsx`
- [Prerequisite UI](https://github.com/tshadofr/leila/blob/main/launcher/src/components/Prerequisites.tsx): `launcher/src/components/Prerequisites.tsx`
- [Update UI](https://github.com/tshadofr/leila/blob/main/launcher/src/components/UpdateBar.tsx): `launcher/src/components/UpdateBar.tsx`
- [UI command API](https://github.com/tshadofr/leila/blob/main/launcher/src/lib/api.ts): `launcher/src/lib/api.ts`

### Launcher services

- [Tauri commands](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/lib.rs): `launcher/src-tauri/src/lib.rs`
- [Configuration](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/config.rs): `launcher/src-tauri/src/config.rs`
- [Game settings writer](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/game_settings.rs): `launcher/src-tauri/src/game_settings.rs`
- [Launch and preload](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/launch.rs): `launcher/src-tauri/src/launch.rs`
- [System report](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/system.rs): `launcher/src-tauri/src/system.rs`

### Install and readiness

- [Prerequisite checks](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/prereqs.rs): `launcher/src-tauri/src/prereqs.rs`
- [Engine installer](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/engine.rs): `launcher/src-tauri/src/engine.rs`
- [Dependency downloads](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/download.rs): `launcher/src-tauri/src/download.rs`
- [Self updater](https://github.com/tshadofr/leila/blob/main/launcher/src-tauri/src/update.rs): `launcher/src-tauri/src/update.rs`

### Game runtime

- [Patched game engine](https://github.com/tshadofr/leila/tree/main/engine/patches): `engine/patches`

### Other components

- **Player**
- **Release services**
- **NVIDIA and Microsoft**
- **Player's game**

## Connections

- Player → App shell: uses (evidence: `README.md`)
- App shell → Game library: renders (evidence: `launcher/src/App.tsx`)
- App shell → Play screen: renders (evidence: `launcher/src/App.tsx`)
- App shell → Settings screen: renders (evidence: `launcher/src/App.tsx`)
- App shell → Prerequisite UI: renders (evidence: `launcher/src/App.tsx`)
- App shell → Update UI: renders (evidence: `launcher/src/App.tsx`)
- App shell → UI command API: calls (evidence: `launcher/src/App.tsx`)
- Prerequisite UI → UI command API: calls (evidence: `launcher/src/components/Prerequisites.tsx`)
- Update UI → UI command API: calls (evidence: `launcher/src/components/UpdateBar.tsx`)
- Game library → UI command API: calls (evidence: `launcher/src/screens/Library.tsx`)
- Play screen → UI command API: calls (evidence: `launcher/src/screens/Play.tsx`)
- Settings screen → UI command API: calls (evidence: `launcher/src/screens/Settings.tsx`)
- UI command API → Tauri commands: invokes
- Tauri commands → Configuration: loads and saves (evidence: `launcher/src-tauri/src/lib.rs`)
- Tauri commands → System report: builds report (evidence: `launcher/src-tauri/src/lib.rs`)
- Tauri commands → Prerequisite checks: dispatches checks (evidence: `launcher/src-tauri/src/lib.rs`)
- Tauri commands → Launch and preload: dispatches launch (evidence: `launcher/src-tauri/src/lib.rs`)
- Tauri commands → Self updater: dispatches update (evidence: `launcher/src-tauri/src/lib.rs`)
- Launch and preload → Configuration: reads options (evidence: `launcher/src-tauri/src/launch.rs`)
- Launch and preload → Game settings writer: writes settings (evidence: `launcher/src-tauri/src/launch.rs`)
- Launch and preload → Engine installer: uses engine (evidence: `launcher/src-tauri/src/launch.rs`)
- Launch and preload → Dependency downloads: uses downloads (evidence: `launcher/src-tauri/src/launch.rs`)
- Launch and preload → System report: reads specs (evidence: `launcher/src-tauri/src/launch.rs`)
- Prerequisite checks → Configuration: reads config (evidence: `launcher/src-tauri/src/prereqs.rs`)
- Prerequisite checks → System report: checks specs (evidence: `launcher/src-tauri/src/prereqs.rs`)
- Prerequisite checks → Dependency downloads: checks dependencies (evidence: `launcher/src-tauri/src/prereqs.rs`)
- Prerequisite checks → Engine installer: checks engine (evidence: `launcher/src-tauri/src/prereqs.rs`)
- Self updater → Dependency downloads: downloads update (evidence: `launcher/src-tauri/src/update.rs`)
- Self updater → Release services: checks releases (evidence: `README.md`)
- Dependency downloads → NVIDIA and Microsoft: fetches runtimes (evidence: `README.md`)
- Engine installer → Patched game engine: unpacks engine (evidence: `launcher/src-tauri/src/engine.rs`)
- Patched game engine → Player's game: runs game (evidence: `README.md`)
- Launch and preload → Player's game: starts game (evidence: `README.md`)
