# kotykssssssssss/nexlauncher architecture

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

- Interactive diagram: https://gitdiagram.com/kotykssssssssss/nexlauncher
- Repository: https://github.com/kotykssssssssss/nexlauncher

## Overview

NexLauncher is a Windows Avalonia launcher for Minecraft Java Edition. Users configure game instances and accounts, browse/install Modrinth content, then install or launch a selected game with progress and logs. Separate branches provide protected Microsoft sign-in, local profiles, loader installation, and user-controlled Quick CSS theming. The graph uses the SOURCE INDEX references and README capability descriptions; unsampled modules are represented at their exact listed paths, and uncertain implementation links are omitted.

Main entry points: [`ViewModels/MainWindowViewModel.cs`](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/MainWindowViewModel.cs) (Launcher coordinator), [`Services/MinecraftService.cs`](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/MinecraftService.cs) (Minecraft lifecycle), [`ViewModels/ModrinthViewModel.cs`](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/ModrinthViewModel.cs) (Modrinth browser), [`Services/Network/LauncherHttp.cs`](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Network/LauncherHttp.cs) (HTTP and downloads)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Launcher experience"]
  node_mainui["Launcher UI"]
  node_mainvm["Launcher coordinator"]
  node_config["Configuration store"]
  node_quickvm["Quick CSS controls"]
  node_quickcss["Quick CSS runtime<br/>[QuickCssService.cs]"]
  node_style["Style applier"]
end

subgraph group_game["Game lifecycle"]
  node_instance["Game instances<br/>[GameInstance.cs]"]
  node_minecraft["Minecraft lifecycle"]
  node_loadcatalog["Loader catalog<br/>[LoaderCatalog.cs]"]
  node_loadinstall["Loader installer<br/>[LoaderInstaller.cs]"]
end

subgraph group_accounts["Accounts"]
  node_accountui["Account controls"]
  node_account["Account service<br/>[AccountService.cs]"]
  node_msauth["Microsoft authentication"]
  node_vault[("Protected account vault")]
  node_localstore[("Local profiles")]
end

subgraph group_modrinth["Modrinth"]
  node_modvm["Modrinth browser"]
  node_modapi["Modrinth API<br/>[ModrinthService.cs]"]
  node_modmanager["Managed mods<br/>[ModManager.cs]"]
  node_packinstall["Modpack installer"]
end

subgraph group_platform["Runtime services"]
  node_http["HTTP and downloads<br/>[LauncherHttp.cs]"]
  node_paths["Safe game paths<br/>[SafePaths.cs]"]
  node_log["Launcher log<br/>[LauncherLog.cs]"]
end

node_user(("Player"))

node_user -->|"uses"| node_mainui
node_mainui -->|"presents"| node_mainvm
node_mainvm -->|"loads settings"| node_config
node_mainvm -->|"launches games"| node_minecraft
node_mainvm -->|"opens accounts"| node_accountui
node_mainvm -->|"opens catalog"| node_modvm
node_mainvm -->|"opens theming"| node_quickvm
node_quickvm -->|"configures"| node_quickcss
node_quickcss -->|"applies styles"| node_style
node_mainvm -->|"manages"| node_instance
node_minecraft -->|"installs loader"| node_loadinstall
node_loadinstall -->|"gets metadata"| node_loadcatalog
node_loadcatalog -->|"fetches metadata"| node_http
node_minecraft -->|"downloads files"| node_http
node_minecraft -->|"resolves game path"| node_paths
node_mainvm -->|"records events"| node_log
node_accountui -->|"manages profiles"| node_account
node_account -->|"uses Microsoft service"| node_msauth
node_account -->|"uses local store"| node_localstore
node_msauth -->|"persists credentials"| node_vault
node_modvm -->|"searches projects"| node_modapi
node_modvm -->|"installs mods"| node_modmanager
node_modvm -->|"installs packs"| node_packinstall
node_modapi -->|"requests metadata"| node_http
node_modmanager -->|"downloads mod files"| node_http
node_modmanager -->|"checks destinations"| node_paths

click node_mainui "https://github.com/kotykssssssssss/nexlauncher/blob/main/MainWindow.axaml.cs"
click node_mainvm "https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/MainWindowViewModel.cs"
click node_config "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/ConfigurationStore.cs"
click node_quickvm "https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/QuickCssViewModel.cs"
click node_quickcss "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/QuickCss/QuickCssService.cs"
click node_style "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/QuickCss/QuickCssStyleApplier.cs"
click node_instance "https://github.com/kotykssssssssss/nexlauncher/blob/main/Models/GameInstance.cs"
click node_minecraft "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/MinecraftService.cs"
click node_loadcatalog "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Loaders/LoaderCatalog.cs"
click node_loadinstall "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Loaders/LoaderInstaller.cs"
click node_accountui "https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/AccountsViewModel.cs"
click node_account "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/AccountService.cs"
click node_msauth "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/MicrosoftAccountService.cs"
click node_vault "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Authentication/ProtectedAccountVault.cs"
click node_localstore "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/LocalAccountStore.cs"
click node_modvm "https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/ModrinthViewModel.cs"
click node_modapi "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModrinthService.cs"
click node_modmanager "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModManager.cs"
click node_packinstall "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModpackInstaller.cs"
click node_http "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Network/LauncherHttp.cs"
click node_paths "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Storage/SafePaths.cs"
click node_log "https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/LauncherLog.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_mainui,node_mainvm,node_config,node_quickvm,node_quickcss,node_style toneBlue
class node_instance,node_minecraft,node_loadcatalog,node_loadinstall toneAmber
class node_accountui,node_account,node_msauth,node_vault,node_localstore toneMint
class node_modvm,node_modapi,node_modmanager,node_packinstall toneRose
class node_http,node_paths,node_log,node_user toneIndigo
```

## Components

### Launcher experience

- [Launcher UI](https://github.com/kotykssssssssss/nexlauncher/blob/main/MainWindow.axaml.cs): `MainWindow.axaml.cs`
- [Launcher coordinator](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/MainWindowViewModel.cs): `ViewModels/MainWindowViewModel.cs`
- [Configuration store](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/ConfigurationStore.cs): `Services/ConfigurationStore.cs`
- [Quick CSS controls](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/QuickCssViewModel.cs): `ViewModels/QuickCssViewModel.cs`
- [Quick CSS runtime](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/QuickCss/QuickCssService.cs): `Services/QuickCss/QuickCssService.cs`
- [Style applier](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/QuickCss/QuickCssStyleApplier.cs): `Services/QuickCss/QuickCssStyleApplier.cs`

### Game lifecycle

- [Game instances](https://github.com/kotykssssssssss/nexlauncher/blob/main/Models/GameInstance.cs): `Models/GameInstance.cs`
- [Minecraft lifecycle](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/MinecraftService.cs): `Services/MinecraftService.cs`
- [Loader catalog](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Loaders/LoaderCatalog.cs): `Services/Loaders/LoaderCatalog.cs`
- [Loader installer](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Loaders/LoaderInstaller.cs): `Services/Loaders/LoaderInstaller.cs`

### Accounts

- [Account controls](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/AccountsViewModel.cs): `ViewModels/AccountsViewModel.cs`
- [Account service](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/AccountService.cs): `Services/AccountService.cs`
- [Microsoft authentication](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/MicrosoftAccountService.cs): `Services/MicrosoftAccountService.cs`
- [Protected account vault](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Authentication/ProtectedAccountVault.cs): `Services/Authentication/ProtectedAccountVault.cs`
- [Local profiles](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/LocalAccountStore.cs): `Services/LocalAccountStore.cs`

### Modrinth

- [Modrinth browser](https://github.com/kotykssssssssss/nexlauncher/blob/main/ViewModels/ModrinthViewModel.cs): `ViewModels/ModrinthViewModel.cs`
- [Modrinth API](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModrinthService.cs): `Services/Modrinth/ModrinthService.cs`
- [Managed mods](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModManager.cs): `Services/Modrinth/ModManager.cs`
- [Modpack installer](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Modrinth/ModpackInstaller.cs): `Services/Modrinth/ModpackInstaller.cs`

### Runtime services

- [HTTP and downloads](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Network/LauncherHttp.cs): `Services/Network/LauncherHttp.cs`
- [Safe game paths](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/Storage/SafePaths.cs): `Services/Storage/SafePaths.cs`
- [Launcher log](https://github.com/kotykssssssssss/nexlauncher/blob/main/Services/LauncherLog.cs): `Services/LauncherLog.cs`

### Other components

- **Player**

## Connections

- Player → Launcher UI: uses
- Launcher UI → Launcher coordinator: presents (evidence: `ViewModels/MainWindowViewModel.cs`)
- Launcher coordinator → Configuration store: loads settings (evidence: `ViewModels/MainWindowViewModel.cs`)
- Launcher coordinator → Minecraft lifecycle: launches games (evidence: `ViewModels/MainWindowViewModel.cs`)
- Launcher coordinator → Account controls: opens accounts (evidence: `ViewModels/MainWindowViewModel.cs`)
- Launcher coordinator → Modrinth browser: opens catalog (evidence: `ViewModels/MainWindowViewModel.cs`)
- Launcher coordinator → Quick CSS controls: opens theming (evidence: `ViewModels/MainWindowViewModel.cs`)
- Quick CSS controls → Quick CSS runtime: configures (evidence: `ViewModels/QuickCssViewModel.cs`)
- Quick CSS runtime → Style applier: applies styles (evidence: `Services/QuickCss/QuickCssService.cs`)
- Launcher coordinator → Game instances: manages (evidence: `ViewModels/MainWindowViewModel.cs`)
- Minecraft lifecycle → Loader installer: installs loader (evidence: `Services/MinecraftService.cs`)
- Loader installer → Loader catalog: gets metadata (evidence: `Services/Loaders/LoaderInstaller.cs`)
- Loader catalog → HTTP and downloads: fetches metadata (evidence: `Services/Loaders/LoaderCatalog.cs`)
- Minecraft lifecycle → HTTP and downloads: downloads files (evidence: `Services/MinecraftService.cs`)
- Minecraft lifecycle → Safe game paths: resolves game path (evidence: `Services/MinecraftService.cs`)
- Launcher coordinator → Launcher log: records events (evidence: `ViewModels/MainWindowViewModel.cs`)
- Account controls → Account service: manages profiles (evidence: `ViewModels/AccountsViewModel.cs`)
- Account service → Microsoft authentication: uses Microsoft service (evidence: `Services/AccountService.cs`)
- Account service → Local profiles: uses local store (evidence: `Services/AccountService.cs`)
- Microsoft authentication → Protected account vault: persists credentials (evidence: `Services/MicrosoftAccountService.cs`)
- Modrinth browser → Modrinth API: searches projects (evidence: `ViewModels/ModrinthViewModel.cs`)
- Modrinth browser → Managed mods: installs mods (evidence: `ViewModels/ModrinthViewModel.cs`)
- Modrinth browser → Modpack installer: installs packs (evidence: `ViewModels/ModrinthViewModel.cs`)
- Modrinth API → HTTP and downloads: requests metadata (evidence: `Services/Modrinth/ModrinthService.cs`)
- Managed mods → HTTP and downloads: downloads mod files (evidence: `Services/Modrinth/ModManager.cs`)
- Managed mods → Safe game paths: checks destinations (evidence: `Services/Modrinth/ModManager.cs`)
