# bingjian-remix/chert-wpf architecture

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

- Interactive diagram: https://gitdiagram.com/bingjian-remix/chert-wpf
- Repository: https://github.com/bingjian-remix/chert-wpf

## Overview

Chert Launcher is a Windows WPF Minecraft launcher backed by a shared core library. Its main player workflow is choosing or installing a game version, downloading required files, configuring an account and profile, then launching and monitoring the game. The README also describes mod management, recommendations, crash repair, and utility features; these are represented as major subsystems where the tree supports them. Evidence is limited to the supplied README and sampled files/SOURCE INDEX, so unsampled feature links are omitted rather than inferred.

Main entry points: [`src/Chert.App/Services/LauncherService.cs`](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/Services/LauncherService.cs) (Launcher service), [`src/Chert.Core/Mods/ModManager.cs`](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Mods/ModManager.cs) (Mod management), [`src/Chert.Core/Recommend/RecommendationEngine.cs`](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/RecommendationEngine.cs) (Recommendations), [`src/Chert.App/MainWindow.xaml.cs`](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/MainWindow.xaml.cs) (WPF interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_wpf["WPF interface<br/>[MainWindow.xaml.cs]"]
  node_app_startup["App startup<br/>[App.xaml.cs]"]
end

subgraph group_lifecycle["Game lifecycle"]
  node_launcher_service["Launcher service<br/>[LauncherService.cs]"]
  node_downloads["Download clients<br/>[IDownloader.cs]"]
  node_modrinth["Modrinth client<br/>[ModrinthClient.cs]"]
  node_installers["Version installers<br/>[Installers]"]
  node_version_merge["Version merger<br/>[VersionMerger.cs]"]
  node_version_data["Version metadata<br/>[VersionJson.cs]"]
  node_game_launcher["Game launcher<br/>[GameLauncher.cs]"]
  node_auth["Account authentication<br/>[Auth]"]
  node_crash_repair["Crash repair"]
end

subgraph group_mods["Mods and discovery"]
  node_mods_manager["Mod management<br/>[ModManager.cs]"]
  node_mod_entry["Mod records<br/>[ModEntry.cs]"]
  node_recommendations["Recommendations"]
  node_local_rules["Local mod rules<br/>[RuleEngine.cs]"]
  node_ranking["Popular ranking<br/>[HotRanking.cs]"]
end

subgraph group_player_tools["Player tools"]
  node_toolbox["Player toolbox<br/>[Toolbox]"]
  node_lan["LAN sharing<br/>[Lan]"]
  node_ai["AI assistant<br/>[Assistant.cs]"]
end

subgraph group_platform["Shared platform"]
  node_profiles["Profiles and accounts<br/>[LauncherProfile.cs]"]
  node_profile_store[("Profile persistence<br/>[ProfileStore.cs]")]
  node_localization["Localization<br/>[LocaleManager.cs]"]
  node_themes[("Theme preferences<br/>[ThemeManager.cs]")]
  node_paths["Game paths<br/>[PathEx.cs]"]
  node_update["Self updater<br/>[LauncherUpdater.cs]"]
end

node_player(("Player"))
node_game_files[("Minecraft files")]
node_modrinth_service(("Modrinth service"))
node_java_runtime(("Java runtime"))

node_player -.->|"uses"| node_wpf
node_wpf -.->|"requests installs"| node_launcher_service
node_app_startup -->|"initializes"| node_launcher_service
node_app_startup -->|"loads profiles"| node_profile_store
node_app_startup -->|"uses settings"| node_profiles
node_launcher_service -->|"uses downloader"| node_downloads
node_launcher_service -->|"requests modpacks"| node_modrinth
node_launcher_service -->|"dispatches installs"| node_installers
node_launcher_service -->|"merges versions"| node_version_merge
node_launcher_service -->|"reads metadata"| node_version_data
node_launcher_service -->|"saves profile"| node_profile_store
node_launcher_service -.->|"downloads files"| node_game_files
node_game_launcher -.->|"starts game"| node_java_runtime
node_mods_manager -->|"produces records"| node_mod_entry
node_mods_manager -->|"checks updates"| node_modrinth
node_mods_manager -->|"downloads updates"| node_downloads
node_recommendations -->|"scans installed mods"| node_mods_manager
node_recommendations -->|"evaluates rules"| node_local_rules
node_recommendations -->|"gets rankings"| node_ranking
node_recommendations -->|"filters preferences"| node_profiles
node_local_rules -->|"examines mods"| node_mod_entry
node_crash_repair -->|"checks mod issues"| node_mods_manager
node_crash_repair -->|"reads repair policy"| node_profiles
node_themes -.->|"notifies theme changes"| node_wpf
node_localization -.->|"provides translations"| node_wpf
node_paths -->|"resolves locations"| node_game_files

click node_wpf "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/MainWindow.xaml.cs"
click node_app_startup "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/App.xaml.cs"
click node_launcher_service "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/Services/LauncherService.cs"
click node_downloads "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Download/IDownloader.cs"
click node_modrinth "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Download/ModrinthClient.cs"
click node_installers "https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Installers"
click node_version_merge "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/VersionMerger.cs"
click node_version_data "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Models/VersionJson.cs"
click node_game_launcher "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/GameLauncher.cs"
click node_auth "https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Auth"
click node_profiles "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Profiles/LauncherProfile.cs"
click node_profile_store "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Profiles/ProfileStore.cs"
click node_mods_manager "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Mods/ModManager.cs"
click node_mod_entry "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Mods/ModEntry.cs"
click node_recommendations "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/RecommendationEngine.cs"
click node_local_rules "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/RuleEngine.cs"
click node_ranking "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/HotRanking.cs"
click node_crash_repair "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/CrashRepairEngine.cs"
click node_toolbox "https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Toolbox"
click node_lan "https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Lan"
click node_ai "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Ai/Assistant.cs"
click node_localization "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Localization/LocaleManager.cs"
click node_themes "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Theme/ThemeManager.cs"
click node_paths "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Utils/PathEx.cs"
click node_update "https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Update/LauncherUpdater.cs"

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_wpf,node_app_startup toneBlue
class node_launcher_service,node_downloads,node_modrinth,node_installers,node_version_merge,node_version_data,node_game_launcher,node_auth,node_crash_repair,node_game_files toneAmber
class node_mods_manager,node_mod_entry,node_recommendations,node_local_rules,node_ranking toneMint
class node_toolbox,node_lan,node_ai toneRose
class node_profiles,node_profile_store,node_localization,node_themes,node_paths,node_update,node_player,node_modrinth_service,node_java_runtime toneIndigo
```

## Components

### Desktop app

- [WPF interface](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/MainWindow.xaml.cs): `src/Chert.App/MainWindow.xaml.cs`
- [App startup](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/App.xaml.cs): `src/Chert.App/App.xaml.cs`

### Game lifecycle

- [Launcher service](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.App/Services/LauncherService.cs): `src/Chert.App/Services/LauncherService.cs`
- [Download clients](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Download/IDownloader.cs): `src/Chert.Core/Download/IDownloader.cs`
- [Modrinth client](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Download/ModrinthClient.cs): `src/Chert.Core/Download/ModrinthClient.cs`
- [Version installers](https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Installers): `src/Chert.Core/Installers`
- [Version merger](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/VersionMerger.cs): `src/Chert.Core/Launcher/VersionMerger.cs`
- [Version metadata](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Models/VersionJson.cs): `src/Chert.Core/Models/VersionJson.cs`
- [Game launcher](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/GameLauncher.cs): `src/Chert.Core/Launcher/GameLauncher.cs`
- [Account authentication](https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Auth): `src/Chert.Core/Auth`
- [Crash repair](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Launcher/CrashRepairEngine.cs): `src/Chert.Core/Launcher/CrashRepairEngine.cs`

### Mods and discovery

- [Mod management](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Mods/ModManager.cs): `src/Chert.Core/Mods/ModManager.cs`
- [Mod records](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Mods/ModEntry.cs): `src/Chert.Core/Mods/ModEntry.cs`
- [Recommendations](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/RecommendationEngine.cs): `src/Chert.Core/Recommend/RecommendationEngine.cs`
- [Local mod rules](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/RuleEngine.cs): `src/Chert.Core/Recommend/RuleEngine.cs`
- [Popular ranking](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Recommend/HotRanking.cs): `src/Chert.Core/Recommend/HotRanking.cs`

### Player tools

- [Player toolbox](https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Toolbox): `src/Chert.Core/Toolbox`
- [LAN sharing](https://github.com/bingjian-remix/chert-wpf/tree/main/src/Chert.Core/Lan): `src/Chert.Core/Lan`
- [AI assistant](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Ai/Assistant.cs): `src/Chert.Core/Ai/Assistant.cs`

### Shared platform

- [Profiles and accounts](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Profiles/LauncherProfile.cs): `src/Chert.Core/Profiles/LauncherProfile.cs`
- [Profile persistence](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Profiles/ProfileStore.cs): `src/Chert.Core/Profiles/ProfileStore.cs`
- [Localization](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Localization/LocaleManager.cs): `src/Chert.Core/Localization/LocaleManager.cs`
- [Theme preferences](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Theme/ThemeManager.cs): `src/Chert.Core/Theme/ThemeManager.cs`
- [Game paths](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Utils/PathEx.cs): `src/Chert.Core/Utils/PathEx.cs`
- [Self updater](https://github.com/bingjian-remix/chert-wpf/blob/main/src/Chert.Core/Update/LauncherUpdater.cs): `src/Chert.Core/Update/LauncherUpdater.cs`

### Other components

- **Player**
- **Minecraft files**
- **Modrinth service**
- **Java runtime**

## Connections

- Player → WPF interface: uses
- WPF interface → Launcher service: requests installs
- App startup → Launcher service: initializes (evidence: `src/Chert.App/App.xaml.cs`)
- App startup → Profile persistence: loads profiles (evidence: `src/Chert.App/App.xaml.cs`)
- App startup → Profiles and accounts: uses settings (evidence: `src/Chert.App/App.xaml.cs`)
- Launcher service → Download clients: uses downloader (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Modrinth client: requests modpacks (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Version installers: dispatches installs (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Version merger: merges versions (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Version metadata: reads metadata (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Profile persistence: saves profile (evidence: `src/Chert.App/Services/LauncherService.cs`)
- Launcher service → Minecraft files: downloads files
- Game launcher → Java runtime: starts game
- Mod management → Mod records: produces records (evidence: `src/Chert.Core/Mods/ModManager.cs`)
- Mod management → Modrinth client: checks updates (evidence: `src/Chert.Core/Mods/ModManager.cs`)
- Mod management → Download clients: downloads updates (evidence: `src/Chert.Core/Mods/ModManager.cs`)
- Recommendations → Mod management: scans installed mods (evidence: `src/Chert.Core/Recommend/RecommendationEngine.cs`)
- Recommendations → Local mod rules: evaluates rules (evidence: `src/Chert.Core/Recommend/RecommendationEngine.cs`)
- Recommendations → Popular ranking: gets rankings (evidence: `src/Chert.Core/Recommend/RecommendationEngine.cs`)
- Recommendations → Profiles and accounts: filters preferences (evidence: `src/Chert.Core/Recommend/RecommendationEngine.cs`)
- Local mod rules → Mod records: examines mods (evidence: `src/Chert.Core/Recommend/RuleEngine.cs`)
- Crash repair → Mod management: checks mod issues (evidence: `src/Chert.Core/Launcher/CrashRepairEngine.cs`)
- Crash repair → Profiles and accounts: reads repair policy (evidence: `src/Chert.Core/Launcher/CrashRepairEngine.cs`)
- Theme preferences → WPF interface: notifies theme changes
- Localization → WPF interface: provides translations
- Game paths → Minecraft files: resolves locations (evidence: `src/Chert.Core/Utils/PathEx.cs`)
