# bylka882-png/yanlan architecture

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

- Interactive diagram: https://gitdiagram.com/bylka882-png/yanlan
- Repository: https://github.com/bylka882-png/yanlan

## Overview

YanLan is a Windows game launcher for managing separate Yandere Simulator builds, browsing and installing YanMod mods, editing mod configs, and diagnosing crashes. The main workflow runs from the launcher UI through background jobs to build/mod installation and persistent library state; other UI sections expose configuration, launch, and crash-analysis workflows. The graph includes documented catalog, proxy, theme, localization, and journal capabilities. Some subsystem links rely on the SOURCE INDEX or README because their implementation was not excerpted; uncertain links are omitted.

Main entry points: [`src/app.rs`](https://github.com/bylka882-png/yanlan/blob/main/src/app.rs) (Application shell), [`src/jobs.rs`](https://github.com/bylka882-png/yanlan/blob/main/src/jobs.rs) (Mod operations), [`src/ui/builds_view.rs`](https://github.com/bylka882-png/yanlan/blob/main/src/ui/builds_view.rs) (Builds view), [`src/diagnose.rs`](https://github.com/bylka882-png/yanlan/blob/main/src/diagnose.rs) (Crash analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Launcher UI"]
  node_shell["Application shell<br/>[app.rs]"]
  node_build_view["Builds view<br/>[builds_view.rs]"]
  node_catalog_view["Catalog view<br/>[catalog.rs]"]
  node_installed_view["Installed mods view<br/>[installed.rs]"]
  node_settings_view["Settings view<br/>[settings.rs]"]
  node_crashes_view["Crashes view<br/>[crashes.rs]"]
  node_widgets["Shared widgets<br/>[widgets.rs]"]
end

subgraph group_builds["Build Management"]
  node_build_catalog["Build catalog<br/>[builds.rs]"]
  node_build_installs["Build installs<br/>[library.rs]"]
  node_game_runner["Game launcher<br/>[runner.rs]"]
end

subgraph group_mods["Mod Management"]
  node_mod_catalog["YanMod catalog<br/>[mods.rs]"]
  node_mod_jobs["Mod operations<br/>[jobs.rs]"]
  node_archive_installer["Archive installer<br/>[installer.rs]"]
  node_config_editor["Config editor<br/>[cfg_edit.rs]"]
end

subgraph group_support["Runtime Services"]
  node_crash_analyzer["Crash analyzer<br/>[diagnose.rs]"]
  node_network["Network and proxy<br/>[net.rs]"]
  node_job_progress["Job progress<br/>[progress.rs]"]
  node_preferences["Preferences<br/>[config.rs]"]
  node_localization["Localization<br/>[i18n.rs]"]
  node_appearance["Themes<br/>[theme.rs]"]
end

subgraph group_state["Persistent State"]
  node_activity_log["Activity journal<br/>[journal.rs]"]
  node_mod_library[("Installed mod library<br/>[library.rs]")]
end

node_user(("Launcher user"))
node_external_catalog["YanMod repository"]
node_game_sources["Game archives"]
node_game_process["Game process"]

node_user -->|"uses"| node_shell
node_shell -->|"presents"| node_build_view
node_shell -->|"presents"| node_catalog_view
node_shell -->|"presents"| node_installed_view
node_shell -->|"presents"| node_settings_view
node_shell -->|"presents"| node_crashes_view
node_build_view -->|"reads state"| node_shell
node_catalog_view -->|"reads state"| node_shell
node_installed_view -->|"reads state"| node_shell
node_settings_view -->|"updates settings"| node_shell
node_crashes_view -->|"requests analysis"| node_crash_analyzer
node_build_view -->|"launches game"| node_game_runner
node_build_view -->|"requests builds"| node_build_catalog
node_catalog_view -->|"browses mods"| node_mod_catalog
node_catalog_view -->|"requests install"| node_mod_jobs
node_installed_view -->|"reads installed"| node_mod_library
node_installed_view -->|"requests changes"| node_mod_jobs
node_shell -->|"dispatches jobs"| node_mod_jobs
node_shell -->|"starts analysis"| node_crash_analyzer
node_mod_jobs -->|"uses metadata"| node_mod_catalog
node_mod_jobs -->|"installs archives"| node_archive_installer
node_mod_jobs -->|"updates library"| node_mod_library
node_mod_jobs -->|"downloads files"| node_network
node_mod_jobs -->|"reports progress"| node_job_progress
node_build_view -->|"manages installs"| node_build_installs
node_build_view -->|"counts mods"| node_mod_library
node_build_catalog -.->|"fetches releases"| node_game_sources
node_mod_catalog -->|"fetches manifests"| node_external_catalog
node_mod_catalog -->|"uses network"| node_network
node_settings_view -->|"edits preferences"| node_preferences
node_preferences -.->|"configures proxy"| node_network
node_shell -.->|"records activity"| node_activity_log
node_game_runner -.->|"starts process"| node_game_process
node_game_runner -.->|"reports exit"| node_crash_analyzer
node_crash_analyzer -->|"checks installed mods"| node_mod_library
node_crash_analyzer -->|"checks run history"| node_activity_log
node_crashes_view -->|"shows progress"| node_job_progress
node_shell -->|"loads settings"| node_preferences
node_shell -.->|"applies theme"| node_appearance
node_shell -.->|"sets language"| node_localization
node_widgets -->|"uses palette"| node_appearance

click node_shell "https://github.com/bylka882-png/yanlan/blob/main/src/app.rs"
click node_build_view "https://github.com/bylka882-png/yanlan/blob/main/src/ui/builds_view.rs"
click node_catalog_view "https://github.com/bylka882-png/yanlan/blob/main/src/ui/catalog.rs"
click node_installed_view "https://github.com/bylka882-png/yanlan/blob/main/src/ui/installed.rs"
click node_settings_view "https://github.com/bylka882-png/yanlan/blob/main/src/ui/settings.rs"
click node_crashes_view "https://github.com/bylka882-png/yanlan/blob/main/src/ui/crashes.rs"
click node_widgets "https://github.com/bylka882-png/yanlan/blob/main/src/ui/widgets.rs"
click node_build_catalog "https://github.com/bylka882-png/yanlan/blob/main/src/builds.rs"
click node_build_installs "https://github.com/bylka882-png/yanlan/blob/main/src/library.rs"
click node_game_runner "https://github.com/bylka882-png/yanlan/blob/main/src/runner.rs"
click node_mod_catalog "https://github.com/bylka882-png/yanlan/blob/main/src/mods.rs"
click node_mod_jobs "https://github.com/bylka882-png/yanlan/blob/main/src/jobs.rs"
click node_archive_installer "https://github.com/bylka882-png/yanlan/blob/main/src/installer.rs"
click node_config_editor "https://github.com/bylka882-png/yanlan/blob/main/src/cfg_edit.rs"
click node_crash_analyzer "https://github.com/bylka882-png/yanlan/blob/main/src/diagnose.rs"
click node_network "https://github.com/bylka882-png/yanlan/blob/main/src/net.rs"
click node_job_progress "https://github.com/bylka882-png/yanlan/blob/main/src/progress.rs"
click node_preferences "https://github.com/bylka882-png/yanlan/blob/main/src/config.rs"
click node_localization "https://github.com/bylka882-png/yanlan/blob/main/src/i18n.rs"
click node_appearance "https://github.com/bylka882-png/yanlan/blob/main/src/theme.rs"
click node_activity_log "https://github.com/bylka882-png/yanlan/blob/main/src/journal.rs"
click node_mod_library "https://github.com/bylka882-png/yanlan/blob/main/src/library.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_shell,node_build_view,node_catalog_view,node_installed_view,node_settings_view,node_crashes_view,node_widgets,node_user toneBlue
class node_build_catalog,node_build_installs,node_game_runner toneAmber
class node_mod_catalog,node_mod_jobs,node_archive_installer,node_config_editor toneMint
class node_crash_analyzer,node_network,node_job_progress,node_preferences,node_localization,node_appearance toneRose
class node_activity_log,node_mod_library,node_external_catalog,node_game_sources,node_game_process toneIndigo
```

## Components

### Launcher UI

- [Application shell](https://github.com/bylka882-png/yanlan/blob/main/src/app.rs): `src/app.rs`
- [Builds view](https://github.com/bylka882-png/yanlan/blob/main/src/ui/builds_view.rs): `src/ui/builds_view.rs`
- [Catalog view](https://github.com/bylka882-png/yanlan/blob/main/src/ui/catalog.rs): `src/ui/catalog.rs`
- [Installed mods view](https://github.com/bylka882-png/yanlan/blob/main/src/ui/installed.rs): `src/ui/installed.rs`
- [Settings view](https://github.com/bylka882-png/yanlan/blob/main/src/ui/settings.rs): `src/ui/settings.rs`
- [Crashes view](https://github.com/bylka882-png/yanlan/blob/main/src/ui/crashes.rs): `src/ui/crashes.rs`
- [Shared widgets](https://github.com/bylka882-png/yanlan/blob/main/src/ui/widgets.rs): `src/ui/widgets.rs`

### Build Management

- [Build catalog](https://github.com/bylka882-png/yanlan/blob/main/src/builds.rs): `src/builds.rs`
- [Build installs](https://github.com/bylka882-png/yanlan/blob/main/src/library.rs): `src/library.rs`
- [Game launcher](https://github.com/bylka882-png/yanlan/blob/main/src/runner.rs): `src/runner.rs`

### Mod Management

- [YanMod catalog](https://github.com/bylka882-png/yanlan/blob/main/src/mods.rs): `src/mods.rs`
- [Mod operations](https://github.com/bylka882-png/yanlan/blob/main/src/jobs.rs): `src/jobs.rs`
- [Archive installer](https://github.com/bylka882-png/yanlan/blob/main/src/installer.rs): `src/installer.rs`
- [Config editor](https://github.com/bylka882-png/yanlan/blob/main/src/cfg_edit.rs): `src/cfg_edit.rs`

### Runtime Services

- [Crash analyzer](https://github.com/bylka882-png/yanlan/blob/main/src/diagnose.rs): `src/diagnose.rs`
- [Network and proxy](https://github.com/bylka882-png/yanlan/blob/main/src/net.rs): `src/net.rs`
- [Job progress](https://github.com/bylka882-png/yanlan/blob/main/src/progress.rs): `src/progress.rs`
- [Preferences](https://github.com/bylka882-png/yanlan/blob/main/src/config.rs): `src/config.rs`
- [Localization](https://github.com/bylka882-png/yanlan/blob/main/src/i18n.rs): `src/i18n.rs`
- [Themes](https://github.com/bylka882-png/yanlan/blob/main/src/theme.rs): `src/theme.rs`

### Persistent State

- [Activity journal](https://github.com/bylka882-png/yanlan/blob/main/src/journal.rs): `src/journal.rs`
- [Installed mod library](https://github.com/bylka882-png/yanlan/blob/main/src/library.rs): `src/library.rs`

### Other components

- **Launcher user**
- **YanMod repository**
- **Game archives**
- **Game process**

## Connections

- Launcher user → Application shell: uses (evidence: `README.md`)
- Application shell → Builds view: presents (evidence: `src/ui/builds_view.rs`)
- Application shell → Catalog view: presents (evidence: `src/ui/catalog.rs`)
- Application shell → Installed mods view: presents (evidence: `src/ui/installed.rs`)
- Application shell → Settings view: presents (evidence: `src/ui/settings.rs`)
- Application shell → Crashes view: presents (evidence: `src/ui/crashes.rs`)
- Builds view → Application shell: reads state (evidence: `src/ui/builds_view.rs`)
- Catalog view → Application shell: reads state (evidence: `src/ui/catalog.rs`)
- Installed mods view → Application shell: reads state (evidence: `src/ui/installed.rs`)
- Settings view → Application shell: updates settings (evidence: `src/ui/settings.rs`)
- Crashes view → Crash analyzer: requests analysis (evidence: `src/ui/crashes.rs`)
- Builds view → Game launcher: launches game (evidence: `src/ui/builds_view.rs`)
- Builds view → Build catalog: requests builds (evidence: `src/ui/builds_view.rs`)
- Catalog view → YanMod catalog: browses mods (evidence: `src/ui/catalog.rs`)
- Catalog view → Mod operations: requests install (evidence: `src/ui/catalog.rs`)
- Installed mods view → Installed mod library: reads installed (evidence: `src/ui/installed.rs`)
- Installed mods view → Mod operations: requests changes (evidence: `src/ui/installed.rs`)
- Application shell → Mod operations: dispatches jobs (evidence: `src/app.rs`)
- Application shell → Crash analyzer: starts analysis (evidence: `src/app.rs`)
- Mod operations → YanMod catalog: uses metadata (evidence: `src/jobs.rs`)
- Mod operations → Archive installer: installs archives (evidence: `src/jobs.rs`)
- Mod operations → Installed mod library: updates library (evidence: `src/jobs.rs`)
- Mod operations → Network and proxy: downloads files (evidence: `src/jobs.rs`)
- Mod operations → Job progress: reports progress (evidence: `src/jobs.rs`)
- Builds view → Build installs: manages installs (evidence: `src/ui/builds_view.rs`)
- Builds view → Installed mod library: counts mods (evidence: `src/ui/builds_view.rs`)
- Build catalog → Game archives: fetches releases (evidence: `README.md`)
- YanMod catalog → YanMod repository: fetches manifests (evidence: `src/mods.rs`)
- YanMod catalog → Network and proxy: uses network (evidence: `src/mods.rs`)
- Settings view → Preferences: edits preferences (evidence: `src/ui/settings.rs`)
- Preferences → Network and proxy: configures proxy (evidence: `README.md`)
- Application shell → Activity journal: records activity (evidence: `README.md`)
- Game launcher → Game process: starts process (evidence: `README.md`)
- Game launcher → Crash analyzer: reports exit (evidence: `README.md`)
- Crash analyzer → Installed mod library: checks installed mods (evidence: `src/diagnose.rs`)
- Crash analyzer → Activity journal: checks run history (evidence: `src/diagnose.rs`)
- Crashes view → Job progress: shows progress (evidence: `src/ui/crashes.rs`)
- Application shell → Preferences: loads settings (evidence: `src/app.rs`)
- Application shell → Themes: applies theme (evidence: `src/app.rs`)
- Application shell → Localization: sets language (evidence: `src/app.rs`)
- Shared widgets → Themes: uses palette (evidence: `src/ui/widgets.rs`)
