# yaagl/yet-another-anime-game-launcher architecture

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

- Interactive diagram: https://gitdiagram.com/yaagl/yet-another-anime-game-launcher
- Repository: https://github.com/yaagl/yet-another-anime-game-launcher

## Overview

Yaagl is a macOS game launcher for supported anime games. Users open the app, select a game client, configure it, then install or update game files and launch through Wine; the app also manages launcher updates and Wine setup. A separate Sophon server package provides manifest-based install, repair, and update tasks with progress messages. The frontend entry point and several orchestration relationships are excerpted; many client, configuration, and backend API implementations are unsampled, so their internal links are omitted unless documented by the source index.

Main entry points: [`src/app.tsx`](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/app.tsx) (App orchestration), [`sophon_server/progress_handlers.py`](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/progress_handlers.py) (Task progress), [`sophon_server/tasks.py`](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/tasks.py) (Game tasks), [`src/index.tsx`](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/index.tsx) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Launcher application"]
  node_entry["App entry<br/>[index.tsx]"]
  node_app["App orchestration<br/>[app.tsx]"]
  node_launcher["Launcher UI<br/>[index.tsx]"]
  node_config["Settings UI"]
end

subgraph group_games["Game clients"]
  node_gameclients["Game clients"]
  node_clientcontract["Client contract<br/>[channel-client.ts]"]
end

subgraph group_runtime["Wine runtime"]
  node_wine["Wine management"]
  node_wineinstall["Wine installer"]
end

subgraph group_sophon["Sophon service"]
  node_sophonserver["Sophon server<br/>[server.py]"]
  node_tasks["Game tasks<br/>[tasks.py]"]
  node_sophonapi["Manifest client<br/>[sophon_api.py]"]
  node_progress["Task progress"]
  node_models["Task models<br/>[models.py]"]
  node_connection["Connection manager<br/>[utils.py]"]
end

subgraph group_support["Shared services"]
  node_aria["Download engine<br/>[aria2.ts]"]
  node_updater["Launcher updater<br/>[updater.ts]"]
  node_commonupdate["Update interface"]
  node_github["GitHub endpoint<br/>[github.ts]"]
  node_neu["Desktop utilities<br/>[neu.ts]"]
  node_commands["Command builder<br/>[command-builder.ts]"]
end

node_user(("Player"))

node_user -->|"opens"| node_entry
node_entry -->|"starts"| node_app
node_app -->|"creates"| node_launcher
node_app -->|"selects client"| node_gameclients
node_app -->|"checks and creates"| node_wine
node_app -->|"installs if needed"| node_wineinstall
node_app -->|"starts download service"| node_aria
node_app -->|"checks updates"| node_updater
node_app -->|"creates endpoint"| node_github
node_app -->|"shows update UI"| node_commonupdate
node_launcher -.->|"configures"| node_config
node_gameclients -.->|"implements"| node_clientcontract
node_neu -->|"builds commands"| node_commands
node_tasks -->|"calls"| node_sophonapi
node_tasks -->|"reports task progress"| node_progress
node_progress -->|"sends messages"| node_connection
node_progress -->|"reads task status"| node_models

click node_entry "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/index.tsx"
click node_app "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/app.tsx"
click node_launcher "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/launcher/index.tsx"
click node_config "https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/config"
click node_gameclients "https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/clients"
click node_clientcontract "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/channel-client.ts"
click node_wine "https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/wine"
click node_wineinstall "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/wine/wine-install-program.ts"
click node_aria "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/aria2.ts"
click node_updater "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/updater.ts"
click node_commonupdate "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/common-update-ui.tsx"
click node_github "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/github.ts"
click node_neu "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/utils/neu.ts"
click node_commands "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/utils/command-builder.ts"
click node_sophonserver "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/server.py"
click node_tasks "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/tasks.py"
click node_sophonapi "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/sophon_api.py"
click node_progress "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/progress_handlers.py"
click node_models "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/models.py"
click node_connection "https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/utils.py"

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_entry,node_app,node_launcher,node_config toneBlue
class node_gameclients,node_clientcontract toneAmber
class node_wine,node_wineinstall toneMint
class node_sophonserver,node_tasks,node_sophonapi,node_progress,node_models,node_connection toneRose
class node_aria,node_updater,node_commonupdate,node_github,node_neu,node_commands,node_user toneIndigo
```

## Components

### Launcher application

- [App entry](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/index.tsx): `src/index.tsx`
- [App orchestration](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/app.tsx): `src/app.tsx`
- [Launcher UI](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/launcher/index.tsx): `src/launcher/index.tsx`
- [Settings UI](https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/config): `src/config`

### Game clients

- [Game clients](https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/clients): `src/clients`
- [Client contract](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/channel-client.ts): `src/channel-client.ts`

### Wine runtime

- [Wine management](https://github.com/yaagl/yet-another-anime-game-launcher/tree/main/src/wine): `src/wine`
- [Wine installer](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/wine/wine-install-program.ts): `src/wine/wine-install-program.ts`

### Sophon service

- [Sophon server](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/server.py): `sophon_server/server.py`
- [Game tasks](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/tasks.py): `sophon_server/tasks.py`
- [Manifest client](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/sophon_api.py): `sophon_server/sophon_api.py`
- [Task progress](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/progress_handlers.py): `sophon_server/progress_handlers.py`
- [Task models](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/models.py): `sophon_server/models.py`
- [Connection manager](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/sophon_server/utils.py): `sophon_server/utils.py`

### Shared services

- [Download engine](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/aria2.ts): `src/aria2.ts`
- [Launcher updater](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/updater.ts): `src/updater.ts`
- [Update interface](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/common-update-ui.tsx): `src/common-update-ui.tsx`
- [GitHub endpoint](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/github.ts): `src/github.ts`
- [Desktop utilities](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/utils/neu.ts): `src/utils/neu.ts`
- [Command builder](https://github.com/yaagl/yet-another-anime-game-launcher/blob/main/src/utils/command-builder.ts): `src/utils/command-builder.ts`

### Other components

- **Player**

## Connections

- Player → App entry: opens (evidence: `src/index.tsx`)
- App entry → App orchestration: starts (evidence: `src/index.tsx`)
- App orchestration → Launcher UI: creates (evidence: `src/app.tsx`)
- App orchestration → Game clients: selects client (evidence: `src/app.tsx`)
- App orchestration → Wine management: checks and creates (evidence: `src/app.tsx`)
- App orchestration → Wine installer: installs if needed (evidence: `src/app.tsx`)
- App orchestration → Download engine: starts download service (evidence: `src/app.tsx`)
- App orchestration → Launcher updater: checks updates (evidence: `src/app.tsx`)
- App orchestration → GitHub endpoint: creates endpoint (evidence: `src/app.tsx`)
- App orchestration → Update interface: shows update UI (evidence: `src/app.tsx`)
- Launcher UI → Settings UI: configures
- Game clients → Client contract: implements
- Desktop utilities → Command builder: builds commands (evidence: `src/utils/neu.ts`)
- Game tasks → Manifest client: calls (evidence: `sophon_server/tasks.py`)
- Game tasks → Task progress: reports task progress (evidence: `sophon_server/tasks.py`)
- Task progress → Connection manager: sends messages (evidence: `sophon_server/progress_handlers.py`)
- Task progress → Task models: reads task status (evidence: `sophon_server/progress_handlers.py`)
