# h1z1rotk/rotk-launcher architecture

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

- Interactive diagram: https://gitdiagram.com/h1z1rotk/rotk-launcher
- Repository: https://github.com/h1z1rotk/rotk-launcher

## Overview

ROTK Launcher is an Electron desktop launcher for preparing or adopting an isolated H1Z1 client, configuring it for ROTK, and starting the game with account credentials protected by a short-lived ticket. The main process coordinates setup, identity, verification, and launch; the React interface initiates those operations through the preload IPC bridge. Other documented capabilities include news and updates, optional voice, and opt-in post-session diagnostics. Some service wiring is explicit in the README rather than visible in the sampled excerpts, so uncertain internal links are omitted.

Main entry points: [`electron/main.ts`](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/main.ts) (Main coordinator), [`electron/services/installer.ts`](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/installer.ts) (Client installer), [`electron/services/game-launcher.ts`](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/game-launcher.ts) (Game launcher), [`electron/services/diagnostic-controller.ts`](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-controller.ts) (Diagnostics controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["Launcher UI<br/>[App.tsx]"]
  node_preload["IPC bridge<br/>[preload.ts]"]
  node_main["Main coordinator<br/>[main.ts]"]
end

subgraph group_setup["Client setup"]
  node_installer["Client installer<br/>[installer.ts]"]
  node_path["Path policy<br/>[path-policy.ts]"]
  node_assets["Asset sync<br/>[asset-sync.ts]"]
  node_config[("Config store<br/>[config-store.ts]")]
end

subgraph group_identity["Identity and launch"]
  node_playerid["Player identity<br/>[player-identity.ts]"]
  node_keystore[("Player key store")]
  node_ticket["Launch ticket<br/>[launch-ticket.ts]"]
  node_attestation["Integrity attestation"]
  node_gateway["Session gateway<br/>[session-gateway.ts]"]
end

subgraph group_runtime["Game runtime"]
  node_launcher["Game launcher<br/>[game-launcher.ts]"]
  node_vivox["Vivox repair<br/>[vivox-client.ts]"]
  node_steamshim["Steam shim<br/>[steam_api64.c]"]
  node_vivoxproxy["Vivox proxy"]
  node_voice["Voice helper<br/>[Program.cs]"]
end

subgraph group_support["Updates and diagnostics"]
  node_updates["Update feed<br/>[update-feed.ts]"]
  node_status["Server status<br/>[server-status.ts]"]
  node_diagnostics["Diagnostics controller"]
  node_reports[("Diagnostic reports")]
  node_upload["Diagnostic upload"]
end

node_player(("Player"))
node_rotk(("ROTK services"))
node_windows[("Windows and client files")]
node_game["H1Z1 game"]

node_player -->|"uses"| node_app
node_app -->|"requests operations"| node_preload
node_preload -->|"dispatches IPC"| node_main
node_main -->|"publishes snapshots"| node_app
node_main -->|"coordinates setup"| node_installer
node_installer -->|"validates paths"| node_path
node_installer -->|"synchronizes files"| node_assets
node_installer -->|"repairs voice assets"| node_vivox
node_installer -->|"copies and configures"| node_windows
node_main -->|"persists settings"| node_config
node_main -->|"manages identity"| node_playerid
node_playerid -->|"stores launcher key"| node_keystore
node_main -->|"requests launch ticket"| node_ticket
node_ticket -->|"exchanges key"| node_rotk
node_main -->|"requests challenge"| node_attestation
node_attestation -->|"requests challenge"| node_rotk
node_main -->|"starts game"| node_launcher
node_launcher -->|"starts session gateway"| node_gateway
node_launcher -->|"verifies and repairs"| node_vivox
node_launcher -->|"launches"| node_game
node_game -->|"loads shim"| node_steamshim
node_game -->|"loads proxy"| node_vivoxproxy
node_launcher -.->|"starts optional helper"| node_voice
node_main -->|"loads updates"| node_updates
node_updates -->|"fetches news"| node_rotk
node_main -->|"fetches status"| node_status
node_status -->|"queries servers"| node_rotk
node_main -->|"handles reports"| node_diagnostics
node_diagnostics -->|"collects and stores"| node_reports
node_diagnostics -.->|"sends opted-in reports"| node_upload
node_upload -.->|"uploads reports"| node_rotk
node_diagnostics -->|"collects session evidence"| node_windows

click node_app "https://github.com/h1z1rotk/rotk-launcher/blob/main/src/App.tsx"
click node_preload "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/preload.ts"
click node_main "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/main.ts"
click node_installer "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/installer.ts"
click node_path "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/path-policy.ts"
click node_assets "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/asset-sync.ts"
click node_config "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/config-store.ts"
click node_playerid "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/player-identity.ts"
click node_keystore "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/player-key-store.ts"
click node_ticket "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/launch-ticket.ts"
click node_attestation "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/integrity-attestation.ts"
click node_gateway "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/session-gateway.ts"
click node_launcher "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/game-launcher.ts"
click node_vivox "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/vivox-client.ts"
click node_steamshim "https://github.com/h1z1rotk/rotk-launcher/blob/main/native/steamshim/steam_api64.c"
click node_vivoxproxy "https://github.com/h1z1rotk/rotk-launcher/blob/main/native/vivoxproxy/vivoxsdk_x64_proxy.c"
click node_voice "https://github.com/h1z1rotk/rotk-launcher/blob/main/native/RotkDeathcomm/Program.cs"
click node_updates "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/update-feed.ts"
click node_status "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/server-status.ts"
click node_diagnostics "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-controller.ts"
click node_reports "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-reports.ts"
click node_upload "https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-upload.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_app,node_preload,node_main toneBlue
class node_installer,node_path,node_assets,node_config,node_windows toneAmber
class node_playerid,node_keystore,node_ticket,node_attestation,node_gateway toneMint
class node_launcher,node_vivox,node_steamshim,node_vivoxproxy,node_voice toneRose
class node_updates,node_status,node_diagnostics,node_reports,node_upload,node_player,node_rotk,node_game toneIndigo
```

## Components

### Desktop interface

- [Launcher UI](https://github.com/h1z1rotk/rotk-launcher/blob/main/src/App.tsx): `src/App.tsx`
- [IPC bridge](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/preload.ts): `electron/preload.ts`
- [Main coordinator](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/main.ts): `electron/main.ts`

### Client setup

- [Client installer](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/installer.ts): `electron/services/installer.ts`
- [Path policy](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/path-policy.ts): `electron/services/path-policy.ts`
- [Asset sync](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/asset-sync.ts): `electron/services/asset-sync.ts`
- [Config store](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/config-store.ts): `electron/services/config-store.ts`

### Identity and launch

- [Player identity](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/player-identity.ts): `electron/services/player-identity.ts`
- [Player key store](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/player-key-store.ts): `electron/services/player-key-store.ts`
- [Launch ticket](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/launch-ticket.ts): `electron/services/launch-ticket.ts`
- [Integrity attestation](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/integrity-attestation.ts): `electron/services/integrity-attestation.ts`
- [Session gateway](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/session-gateway.ts): `electron/services/session-gateway.ts`

### Game runtime

- [Game launcher](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/game-launcher.ts): `electron/services/game-launcher.ts`
- [Vivox repair](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/vivox-client.ts): `electron/services/vivox-client.ts`
- [Steam shim](https://github.com/h1z1rotk/rotk-launcher/blob/main/native/steamshim/steam_api64.c): `native/steamshim/steam_api64.c`
- [Vivox proxy](https://github.com/h1z1rotk/rotk-launcher/blob/main/native/vivoxproxy/vivoxsdk_x64_proxy.c): `native/vivoxproxy/vivoxsdk_x64_proxy.c`
- [Voice helper](https://github.com/h1z1rotk/rotk-launcher/blob/main/native/RotkDeathcomm/Program.cs): `native/RotkDeathcomm/Program.cs`

### Updates and diagnostics

- [Update feed](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/update-feed.ts): `electron/services/update-feed.ts`
- [Server status](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/server-status.ts): `electron/services/server-status.ts`
- [Diagnostics controller](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-controller.ts): `electron/services/diagnostic-controller.ts`
- [Diagnostic reports](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-reports.ts): `electron/services/diagnostic-reports.ts`
- [Diagnostic upload](https://github.com/h1z1rotk/rotk-launcher/blob/main/electron/services/diagnostic-upload.ts): `electron/services/diagnostic-upload.ts`

### Other components

- **Player**
- **ROTK services**
- **Windows and client files**
- **H1Z1 game**

## Connections

- Player → Launcher UI: uses
- Launcher UI → IPC bridge: requests operations
- IPC bridge → Main coordinator: dispatches IPC
- Main coordinator → Launcher UI: publishes snapshots
- Main coordinator → Client installer: coordinates setup
- Client installer → Path policy: validates paths
- Client installer → Asset sync: synchronizes files
- Client installer → Vivox repair: repairs voice assets
- Client installer → Windows and client files: copies and configures
- Main coordinator → Config store: persists settings
- Main coordinator → Player identity: manages identity
- Player identity → Player key store: stores launcher key
- Main coordinator → Launch ticket: requests launch ticket
- Launch ticket → ROTK services: exchanges key
- Main coordinator → Integrity attestation: requests challenge
- Integrity attestation → ROTK services: requests challenge
- Main coordinator → Game launcher: starts game
- Game launcher → Session gateway: starts session gateway
- Game launcher → Vivox repair: verifies and repairs
- Game launcher → H1Z1 game: launches
- H1Z1 game → Steam shim: loads shim
- H1Z1 game → Vivox proxy: loads proxy
- Game launcher → Voice helper: starts optional helper
- Main coordinator → Update feed: loads updates
- Update feed → ROTK services: fetches news
- Main coordinator → Server status: fetches status
- Server status → ROTK services: queries servers
- Main coordinator → Diagnostics controller: handles reports
- Diagnostics controller → Diagnostic reports: collects and stores
- Diagnostics controller → Diagnostic upload: sends opted-in reports
- Diagnostic upload → ROTK services: uploads reports
- Diagnostics controller → Windows and client files: collects session evidence
