# dazacode/vilauncher architecture

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

- Interactive diagram: https://gitdiagram.com/dazacode/vilauncher
- Repository: https://github.com/dazacode/vilauncher

## Overview

VILauncher is a cross-platform desktop launcher for community game projects. The user browses or imports a project, installs or updates it, then launches it using game files already on their PC. The Rust backend coordinates project operations and exposes snapshots/actions to the React interface. Other documented capabilities include diagnostics and fixes, rollback, saves, graphics and launch presets, shader warm-up, storage management, and reporting. Several subsystems are unsampled; those branches reflect README descriptions, not inspected implementation details.

Main entry points: [`src-tauri/src/launcher.rs`](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/launcher.rs) (Launcher commands), [`src/App.tsx`](https://github.com/dazacode/vilauncher/blob/main/src/App.tsx) (App shell), [`src/lib/store.ts`](https://github.com/dazacode/vilauncher/blob/main/src/lib/store.ts) (UI state store), [`src/features/library/library-view.tsx`](https://github.com/dazacode/vilauncher/blob/main/src/features/library/library-view.tsx) (Project library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["App shell<br/>[App.tsx]"]
  node_project_ui["Project library<br/>[library-view.tsx]"]
  node_settings_ui["Settings UI<br/>[settings-view.tsx]"]
  node_dialogs["Project dialogs<br/>[dialogs.tsx]"]
  node_api["Backend API<br/>[api.ts]"]
  node_store["UI state store<br/>[store.ts]"]
end

subgraph group_project_ops["Project lifecycle"]
  node_launcher["Launcher commands<br/>[launcher.rs]"]
  node_actions["Action dispatch<br/>[actions.rs]"]
  node_rust_project["Rust project builds<br/>[rust_project.rs]"]
  node_build_zip["ZIP projects<br/>[build_zip.rs]"]
  node_previous["Rollback builds<br/>[previous.rs]"]
end

subgraph group_play_support["Play and diagnostics"]
  node_diagnose["Problem diagnosis<br/>[diagnose.rs]"]
  node_known_problems["Problem fixes<br/>[known_problems.rs]"]
  node_runner["Game runner<br/>[runner.rs]"]
  node_shader_cache["Shader warm-up<br/>[shader_cache.rs]"]
  node_play_stats["Session statistics<br/>[play_stats.rs]"]
  node_report["Problem reports<br/>[report.rs]"]
end

subgraph group_user_data["Settings and data"]
  node_saves["Save management<br/>[saves.rs]"]
  node_save_zip["Save archives<br/>[save_zip.rs]"]
  node_presets["Launch presets<br/>[script_preset.rs]"]
  node_storage["Disk usage<br/>[storage.rs]"]
end

subgraph group_platform["Platform services"]
  node_tools["Build tools<br/>[tools.rs]"]
  node_system["System information<br/>[system.rs]"]
  node_platform_services["OS integration<br/>[mod.rs]"]
end

node_user(("Player"))
node_catalog["VIPortLive catalog"]
node_game_files["User game files"]
node_github["GitHub issues"]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_project_ui
node_app -->|"shows"| node_settings_ui
node_app -->|"mounts"| node_dialogs
node_app -->|"subscribes via"| node_api
node_app -->|"refreshes via"| node_store
node_project_ui -.->|"dispatches actions"| node_store
node_settings_ui -.->|"dispatches actions"| node_store
node_dialogs -->|"dispatches actions"| node_store
node_store -->|"sends actions"| node_api
node_api -.->|"invokes command"| node_actions
node_actions -->|"dispatches to"| node_launcher
node_launcher -->|"builds Rust projects"| node_rust_project
node_launcher -->|"handles ZIP projects"| node_build_zip
node_launcher -->|"keeps prior build"| node_previous
node_catalog -->|"lists projects"| node_project_ui
node_launcher -->|"loads projects"| node_catalog
node_launcher -->|"sets up tools"| node_tools
node_launcher -->|"checks before play"| node_diagnose
node_diagnose -->|"checks known issues"| node_known_problems
node_launcher -->|"starts builds"| node_runner
node_game_files -->|"provides required files"| node_runner
node_launcher -->|"warms shaders"| node_shader_cache
node_runner -->|"records session"| node_play_stats
node_launcher -->|"prepares failed-job report"| node_report
node_report -->|"opens issue draft"| node_github
node_launcher -->|"manages saves"| node_saves
node_saves -->|"imports or exports"| node_save_zip
node_launcher -->|"applies launch presets"| node_presets
node_launcher -->|"scans disk usage"| node_storage
node_launcher -->|"reads PC specs"| node_system
node_launcher -.->|"uses OS integration"| node_platform_services

click node_app "https://github.com/dazacode/vilauncher/blob/main/src/App.tsx"
click node_project_ui "https://github.com/dazacode/vilauncher/blob/main/src/features/library/library-view.tsx"
click node_settings_ui "https://github.com/dazacode/vilauncher/blob/main/src/features/settings/settings-view.tsx"
click node_dialogs "https://github.com/dazacode/vilauncher/blob/main/src/features/dialogs/dialogs.tsx"
click node_api "https://github.com/dazacode/vilauncher/blob/main/src/lib/api.ts"
click node_store "https://github.com/dazacode/vilauncher/blob/main/src/lib/store.ts"
click node_launcher "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/launcher.rs"
click node_actions "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/launcher/actions.rs"
click node_rust_project "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/rust_project.rs"
click node_build_zip "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/build_zip.rs"
click node_previous "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/previous.rs"
click node_diagnose "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/diagnose.rs"
click node_known_problems "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/known_problems.rs"
click node_runner "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/runner.rs"
click node_shader_cache "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/shader_cache.rs"
click node_play_stats "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/play_stats.rs"
click node_report "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/report.rs"
click node_saves "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/saves.rs"
click node_save_zip "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/save_zip.rs"
click node_presets "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/script_preset.rs"
click node_storage "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/storage.rs"
click node_tools "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/tools.rs"
click node_system "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/system.rs"
click node_platform_services "https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/platform/mod.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_app,node_project_ui,node_settings_ui,node_dialogs,node_api,node_store,node_game_files toneBlue
class node_launcher,node_actions,node_rust_project,node_build_zip,node_previous toneAmber
class node_diagnose,node_known_problems,node_runner,node_shader_cache,node_play_stats,node_report toneMint
class node_saves,node_save_zip,node_presets,node_storage toneRose
class node_tools,node_system,node_platform_services,node_user,node_catalog,node_github toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/dazacode/vilauncher/blob/main/src/App.tsx): `src/App.tsx`
- [Project library](https://github.com/dazacode/vilauncher/blob/main/src/features/library/library-view.tsx): `src/features/library/library-view.tsx`
- [Settings UI](https://github.com/dazacode/vilauncher/blob/main/src/features/settings/settings-view.tsx): `src/features/settings/settings-view.tsx`
- [Project dialogs](https://github.com/dazacode/vilauncher/blob/main/src/features/dialogs/dialogs.tsx): `src/features/dialogs/dialogs.tsx`
- [Backend API](https://github.com/dazacode/vilauncher/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [UI state store](https://github.com/dazacode/vilauncher/blob/main/src/lib/store.ts): `src/lib/store.ts`

### Project lifecycle

- [Launcher commands](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/launcher.rs): `src-tauri/src/launcher.rs`
- [Action dispatch](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/launcher/actions.rs): `src-tauri/src/launcher/actions.rs`
- [Rust project builds](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/rust_project.rs): `src-tauri/src/rust_project.rs`
- [ZIP projects](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/build_zip.rs): `src-tauri/src/build_zip.rs`
- [Rollback builds](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/previous.rs): `src-tauri/src/previous.rs`

### Play and diagnostics

- [Problem diagnosis](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/diagnose.rs): `src-tauri/src/diagnose.rs`
- [Problem fixes](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/known_problems.rs): `src-tauri/src/known_problems.rs`
- [Game runner](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/runner.rs): `src-tauri/src/runner.rs`
- [Shader warm-up](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/shader_cache.rs): `src-tauri/src/shader_cache.rs`
- [Session statistics](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/play_stats.rs): `src-tauri/src/play_stats.rs`
- [Problem reports](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/report.rs): `src-tauri/src/report.rs`

### Settings and data

- [Save management](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/saves.rs): `src-tauri/src/saves.rs`
- [Save archives](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/save_zip.rs): `src-tauri/src/save_zip.rs`
- [Launch presets](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/script_preset.rs): `src-tauri/src/script_preset.rs`
- [Disk usage](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/storage.rs): `src-tauri/src/storage.rs`

### Platform services

- [Build tools](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/tools.rs): `src-tauri/src/tools.rs`
- [System information](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/system.rs): `src-tauri/src/system.rs`
- [OS integration](https://github.com/dazacode/vilauncher/blob/main/src-tauri/src/platform/mod.rs): `src-tauri/src/platform/mod.rs`

### Other components

- **Player**
- **VIPortLive catalog**
- **User game files**
- **GitHub issues**

## Connections

- Player → App shell: uses (evidence: `src/App.tsx`)
- App shell → Project library: shows (evidence: `src/App.tsx`)
- App shell → Settings UI: shows (evidence: `src/App.tsx`)
- App shell → Project dialogs: mounts (evidence: `src/App.tsx`)
- App shell → Backend API: subscribes via (evidence: `src/App.tsx`)
- App shell → UI state store: refreshes via (evidence: `src/App.tsx`)
- Project library → UI state store: dispatches actions
- Settings UI → UI state store: dispatches actions
- Project dialogs → UI state store: dispatches actions (evidence: `src/features/dialogs/dialogs.tsx`)
- UI state store → Backend API: sends actions (evidence: `src/lib/store.ts`)
- Backend API → Action dispatch: invokes command
- Action dispatch → Launcher commands: dispatches to (evidence: `src-tauri/src/launcher/actions.rs`)
- Launcher commands → Rust project builds: builds Rust projects (evidence: `src-tauri/src/launcher.rs`)
- Launcher commands → ZIP projects: handles ZIP projects (evidence: `src-tauri/src/launcher.rs`)
- Launcher commands → Rollback builds: keeps prior build (evidence: `src-tauri/src/launcher.rs`)
- VIPortLive catalog → Project library: lists projects (evidence: `README.md`)
- Launcher commands → VIPortLive catalog: loads projects (evidence: `README.md`)
- Launcher commands → Build tools: sets up tools (evidence: `README.md`)
- Launcher commands → Problem diagnosis: checks before play (evidence: `src-tauri/src/launcher.rs`)
- Problem diagnosis → Problem fixes: checks known issues (evidence: `src-tauri/src/known_problems.rs`)
- Launcher commands → Game runner: starts builds (evidence: `README.md`)
- User game files → Game runner: provides required files (evidence: `README.md`)
- Launcher commands → Shader warm-up: warms shaders (evidence: `README.md`)
- Game runner → Session statistics: records session (evidence: `README.md`)
- Launcher commands → Problem reports: prepares failed-job report (evidence: `README.md`)
- Problem reports → GitHub issues: opens issue draft (evidence: `README.md`)
- Launcher commands → Save management: manages saves (evidence: `README.md`)
- Save management → Save archives: imports or exports (evidence: `README.md`)
- Launcher commands → Launch presets: applies launch presets (evidence: `README.md`)
- Launcher commands → Disk usage: scans disk usage (evidence: `src-tauri/src/storage.rs`)
- Launcher commands → System information: reads PC specs (evidence: `README.md`)
- Launcher commands → OS integration: uses OS integration (evidence: `src-tauri/src/launcher.rs`)
