# shuabritze/mushroom-launcher architecture

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

- Interactive diagram: https://gitdiagram.com/shuabritze/mushroom-launcher
- Repository: https://github.com/shuabritze/mushroom-launcher

## Overview

Mushroom Launcher is an Electron desktop launcher for a MapleStory 2 client. The main workflow is selecting or downloading client files, configuring a server, running pre-launch checks and patching, then starting the game with server and mod arguments. The README also documents mod creation and hash-checked updates. Sampled excerpts establish the launch and download details; some UI-to-IPC handler wiring and unsampled subsystem behavior are represented only where the tree or README supports them.

Main entry points: [`src/app/preload.ts`](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/preload.ts) (Preload bridge), [`src/web/src/App.tsx`](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/App.tsx) (Launcher home), [`src/app/config.ts`](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/config.ts) (Config persistence), [`src/app/download-client.ts`](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/download-client.ts) (Client downloader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop runtime"]
  node_main["Electron entry<br/>[main.ts]"]
  node_appinit["App initialization<br/>[app.ts]"]
  node_preload["Preload bridge<br/>[preload.ts]"]
end

subgraph group_interface["Launcher interface"]
  node_renderer["Renderer entry<br/>[renderer.tsx]"]
  node_appui["Launcher home<br/>[App.tsx]"]
  node_state["Shared UI state<br/>[AppState.tsx]"]
  node_downloadui["Install controls<br/>[DownloadSheet.tsx]"]
  node_progressui["Download progress"]
  node_serverui["Server management<br/>[ServerList.tsx]"]
  node_serversheet["Server editor<br/>[ServerSheet.tsx]"]
  node_launchui["Launch controls<br/>[LaunchClient.tsx]"]
  node_modsui["Mod management<br/>[ModsSheet.tsx]"]
  node_settingsui["Settings panel<br/>[SettingsSheet.tsx]"]
end

subgraph group_client["Client management"]
  node_download["Client downloader<br/>[download-client.ts]"]
  node_launch["Checks and launch<br/>[launch-client.ts]"]
  node_mods["Mod services<br/>[mods.ts]"]
end

subgraph group_configuration["Launcher configuration"]
  node_serverapi["Server services<br/>[server-list.ts]"]
  node_config[("Config persistence<br/>[config.ts]")]
  node_events["App events<br/>[events.ts]"]
end

node_user(("Launcher user"))
node_game[("Game installation")]
node_gameprocess["Game process"]
node_downloadsource["Client sources"]
node_modhost["Mod file hosts"]
node_discord["Discord community"]

node_user -->|"uses"| node_appui
node_main -->|"initializes"| node_appinit
node_main -->|"loads"| node_preload
node_renderer -->|"renders"| node_appui
node_appui -->|"reads state"| node_state
node_appui -->|"presents"| node_downloadui
node_appui -->|"presents"| node_serverui
node_appui -->|"presents"| node_modsui
node_appui -->|"presents"| node_settingsui
node_appui -.->|"embeds"| node_discord
node_downloadui -->|"requests install"| node_preload
node_preload -->|"dispatches IPC"| node_download
node_download -->|"downloads from"| node_downloadsource
node_download -->|"writes client files"| node_game
node_download -->|"sends progress"| node_progressui
node_serverui -->|"opens editor"| node_serversheet
node_serversheet -->|"saves server"| node_preload
node_preload -->|"dispatches IPC"| node_serverapi
node_serverapi -->|"updates"| node_config
node_launchui -->|"requests launch"| node_preload
node_preload -->|"dispatches IPC"| node_launch
node_launch -->|"reads settings"| node_config
node_launch -->|"checks and patches"| node_game
node_launch -->|"spawns"| node_gameprocess
node_modsui -->|"manages mods"| node_preload
node_preload -->|"dispatches IPC"| node_mods
node_mods -->|"fetches mod files"| node_modhost
node_mods -->|"updates mod files"| node_game
node_settingsui -->|"updates settings"| node_preload
node_preload -->|"dispatches IPC"| node_events
node_events -->|"persists settings"| node_config
node_appinit -->|"initializes"| node_config
node_main -->|"saves on quit"| node_config

click node_main "https://github.com/shuabritze/mushroom-launcher/blob/main/src/main.ts"
click node_appinit "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/app.ts"
click node_preload "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/preload.ts"
click node_renderer "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/renderer.tsx"
click node_appui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/App.tsx"
click node_state "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/AppState.tsx"
click node_downloadui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/download/DownloadSheet.tsx"
click node_progressui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/download/DownloadProgress.tsx"
click node_serverui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/serverlist/ServerList.tsx"
click node_serversheet "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/serverlist/ServerSheet.tsx"
click node_launchui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/client/LaunchClient.tsx"
click node_modsui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/mods/ModsSheet.tsx"
click node_settingsui "https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/SettingsSheet.tsx"
click node_download "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/download-client.ts"
click node_launch "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/launch-client.ts"
click node_mods "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/mods.ts"
click node_serverapi "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/server-list.ts"
click node_config "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/config.ts"
click node_events "https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/events.ts"

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_main,node_appinit,node_preload,node_user,node_downloadsource toneBlue
class node_renderer,node_appui,node_state,node_downloadui,node_progressui,node_serverui,node_serversheet,node_launchui,node_modsui,node_settingsui,node_game toneAmber
class node_download,node_launch,node_mods toneMint
class node_serverapi,node_config,node_events toneRose
class node_gameprocess,node_modhost,node_discord toneIndigo
```

## Components

### Desktop runtime

- [Electron entry](https://github.com/shuabritze/mushroom-launcher/blob/main/src/main.ts): `src/main.ts`
- [App initialization](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/app.ts): `src/app/app.ts`
- [Preload bridge](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/preload.ts): `src/app/preload.ts`

### Launcher interface

- [Renderer entry](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/renderer.tsx): `src/web/renderer.tsx`
- [Launcher home](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/App.tsx): `src/web/src/App.tsx`
- [Shared UI state](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/AppState.tsx): `src/web/src/AppState.tsx`
- [Install controls](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/download/DownloadSheet.tsx): `src/web/src/download/DownloadSheet.tsx`
- [Download progress](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/download/DownloadProgress.tsx): `src/web/src/download/DownloadProgress.tsx`
- [Server management](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/serverlist/ServerList.tsx): `src/web/src/serverlist/ServerList.tsx`
- [Server editor](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/serverlist/ServerSheet.tsx): `src/web/src/serverlist/ServerSheet.tsx`
- [Launch controls](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/client/LaunchClient.tsx): `src/web/src/client/LaunchClient.tsx`
- [Mod management](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/mods/ModsSheet.tsx): `src/web/src/mods/ModsSheet.tsx`
- [Settings panel](https://github.com/shuabritze/mushroom-launcher/blob/main/src/web/src/SettingsSheet.tsx): `src/web/src/SettingsSheet.tsx`

### Client management

- [Client downloader](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/download-client.ts): `src/app/download-client.ts`
- [Checks and launch](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/launch-client.ts): `src/app/launch-client.ts`
- [Mod services](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/mods.ts): `src/app/mods.ts`

### Launcher configuration

- [Server services](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/server-list.ts): `src/app/server-list.ts`
- [Config persistence](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/config.ts): `src/app/config.ts`
- [App events](https://github.com/shuabritze/mushroom-launcher/blob/main/src/app/events.ts): `src/app/events.ts`

### Other components

- **Launcher user**
- **Game installation**
- **Game process**
- **Client sources**
- **Mod file hosts**
- **Discord community**

## Connections

- Launcher user → Launcher home: uses
- Electron entry → App initialization: initializes
- Electron entry → Preload bridge: loads
- Renderer entry → Launcher home: renders
- Launcher home → Shared UI state: reads state
- Launcher home → Install controls: presents
- Launcher home → Server management: presents
- Launcher home → Mod management: presents
- Launcher home → Settings panel: presents
- Launcher home → Discord community: embeds
- Install controls → Preload bridge: requests install
- Preload bridge → Client downloader: dispatches IPC
- Client downloader → Client sources: downloads from
- Client downloader → Game installation: writes client files
- Client downloader → Download progress: sends progress
- Server management → Server editor: opens editor
- Server editor → Preload bridge: saves server
- Preload bridge → Server services: dispatches IPC
- Server services → Config persistence: updates
- Launch controls → Preload bridge: requests launch
- Preload bridge → Checks and launch: dispatches IPC
- Checks and launch → Config persistence: reads settings
- Checks and launch → Game installation: checks and patches
- Checks and launch → Game process: spawns
- Mod management → Preload bridge: manages mods
- Preload bridge → Mod services: dispatches IPC
- Mod services → Mod file hosts: fetches mod files
- Mod services → Game installation: updates mod files
- Settings panel → Preload bridge: updates settings
- Preload bridge → App events: dispatches IPC
- App events → Config persistence: persists settings
- App initialization → Config persistence: initializes
- Electron entry → Config persistence: saves on quit
