# qlg0/eternia-launcher architecture

> Architecture diagram of the GitHub repository qlg0/eternia-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/qlg0/eternia-launcher
- Repository: https://github.com/qlg0/eternia-launcher

## Overview

Eternia is a Tauri desktop Minecraft launcher. The user interacts with the React launcher to manage accounts and start or repair Minecraft; the Rust backend handles authentication, prepares the game installation and runtime, then launches the game. A separate console window displays launcher and download events. The README is only a Vite template and documents no product capabilities. Unsampled backend wiring is included only where the source index identifies module references; the graph avoids inferring unshown runtime details.

Main entry points: [`src-tauri/src/launcher.rs`](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/launcher.rs) (Launch and repair), [`src-tauri/src/lib.rs`](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/lib.rs) (Tauri commands), [`src-tauri/src/auth.rs`](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/auth.rs) (Microsoft authentication), [`src-tauri/src/download.rs`](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/download.rs) (Download and verify)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_entry["Window entry<br/>[main.tsx]"]
  node_launcher_ui["Launcher UI<br/>[App.tsx]"]
  node_console_ui["Console window<br/>[Console.tsx]"]
end

subgraph group_orchestration["Launcher orchestration"]
  node_tauri["Tauri commands<br/>[lib.rs]"]
  node_launch["Launch and repair<br/>[launcher.rs]"]
end

subgraph group_installation["Game installation"]
  node_game_dir["Game directory<br/>[minecraft.rs]"]
  node_manifest["Version and assets"]
  node_java["Java runtime<br/>[java.rs]"]
  node_fabric["Fabric installer<br/>[fabric.rs]"]
  node_libraries["Game libraries<br/>[libraries.rs]"]
  node_mods["Eternia mods<br/>[mods.rs]"]
  node_native["Native libraries<br/>[native.rs]"]
  node_download["Download and verify<br/>[download.rs]"]
end

subgraph group_identity["Accounts and identity"]
  node_auth["Microsoft authentication<br/>[auth.rs]"]
  node_accounts[("Account sessions<br/>[session.rs]")]
end

node_user(("User"))
node_microsoft{{"Microsoft services"}}
node_game_services{{"Minecraft services"}}

node_user -->|"opens"| node_entry
node_entry -->|"renders"| node_launcher_ui
node_entry -->|"renders"| node_console_ui
node_user -->|"operates"| node_launcher_ui
node_launcher_ui -->|"invokes commands"| node_tauri
node_tauri -.->|"registers commands"| node_auth
node_tauri -.->|"registers commands"| node_launch
node_tauri -.->|"registers commands"| node_accounts
node_tauri -.->|"registers commands"| node_game_dir
node_launch -->|"installs"| node_fabric
node_launch -.->|"prepares runtime"| node_java
node_launch -.->|"prepares game data"| node_manifest
node_launch -.->|"prepares libraries"| node_libraries
node_launch -.->|"installs mods"| node_mods
node_launch -.->|"prepares natives"| node_native
node_manifest -->|"uses directory"| node_game_dir
node_manifest -->|"downloads assets"| node_download
node_java -->|"downloads runtime"| node_download
node_libraries -.->|"downloads artifacts"| node_download
node_mods -.->|"downloads mods"| node_download
node_native -.->|"uses directory"| node_game_dir
node_auth -->|"authenticates with"| node_microsoft
node_auth -->|"requests profile"| node_game_services
node_auth -->|"persists accounts"| node_accounts
node_console_ui -->|"listens for events"| node_tauri

click node_entry "https://github.com/qlg0/eternia-launcher/blob/main/src/main.tsx"
click node_launcher_ui "https://github.com/qlg0/eternia-launcher/blob/main/src/App.tsx"
click node_console_ui "https://github.com/qlg0/eternia-launcher/blob/main/src/Console.tsx"
click node_tauri "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/lib.rs"
click node_launch "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/launcher.rs"
click node_auth "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/auth.rs"
click node_accounts "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/session.rs"
click node_game_dir "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/minecraft.rs"
click node_manifest "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/minecraft_manifest.rs"
click node_java "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/java.rs"
click node_fabric "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/fabric.rs"
click node_libraries "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/libraries.rs"
click node_mods "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/mods.rs"
click node_native "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/native.rs"
click node_download "https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/download.rs"

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_launcher_ui,node_console_ui,node_user toneBlue
class node_tauri,node_launch toneAmber
class node_game_dir,node_manifest,node_java,node_fabric,node_libraries,node_mods,node_native,node_download toneMint
class node_auth,node_accounts toneRose
class node_microsoft,node_game_services toneIndigo
```

## Components

### Desktop interface

- [Window entry](https://github.com/qlg0/eternia-launcher/blob/main/src/main.tsx): `src/main.tsx`
- [Launcher UI](https://github.com/qlg0/eternia-launcher/blob/main/src/App.tsx): `src/App.tsx`
- [Console window](https://github.com/qlg0/eternia-launcher/blob/main/src/Console.tsx): `src/Console.tsx`

### Launcher orchestration

- [Tauri commands](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Launch and repair](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/launcher.rs): `src-tauri/src/launcher.rs`

### Game installation

- [Game directory](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/minecraft.rs): `src-tauri/src/minecraft.rs`
- [Version and assets](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/minecraft_manifest.rs): `src-tauri/src/minecraft_manifest.rs`
- [Java runtime](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/java.rs): `src-tauri/src/java.rs`
- [Fabric installer](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/fabric.rs): `src-tauri/src/fabric.rs`
- [Game libraries](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/libraries.rs): `src-tauri/src/libraries.rs`
- [Eternia mods](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/mods.rs): `src-tauri/src/mods.rs`
- [Native libraries](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/native.rs): `src-tauri/src/native.rs`
- [Download and verify](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/download.rs): `src-tauri/src/download.rs`

### Accounts and identity

- [Microsoft authentication](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/auth.rs): `src-tauri/src/auth.rs`
- [Account sessions](https://github.com/qlg0/eternia-launcher/blob/main/src-tauri/src/session.rs): `src-tauri/src/session.rs`

### Other components

- **User**
- **Microsoft services**
- **Minecraft services**

## Connections

- User → Window entry: opens (evidence: `src/main.tsx`)
- Window entry → Launcher UI: renders (evidence: `src/main.tsx`)
- Window entry → Console window: renders (evidence: `src/main.tsx`)
- User → Launcher UI: operates (evidence: `src/App.tsx`)
- Launcher UI → Tauri commands: invokes commands (evidence: `src/App.tsx`)
- Tauri commands → Microsoft authentication: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → Launch and repair: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → Account sessions: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → Game directory: registers commands (evidence: `src-tauri/src/lib.rs`)
- Launch and repair → Fabric installer: installs (evidence: `src-tauri/src/launcher.rs`)
- Launch and repair → Java runtime: prepares runtime (evidence: `src-tauri/src/launcher.rs`)
- Launch and repair → Version and assets: prepares game data (evidence: `src-tauri/src/launcher.rs`)
- Launch and repair → Game libraries: prepares libraries (evidence: `src-tauri/src/launcher.rs`)
- Launch and repair → Eternia mods: installs mods (evidence: `src-tauri/src/launcher.rs`)
- Launch and repair → Native libraries: prepares natives (evidence: `src-tauri/src/launcher.rs`)
- Version and assets → Game directory: uses directory (evidence: `src-tauri/src/minecraft_manifest.rs`)
- Version and assets → Download and verify: downloads assets (evidence: `src-tauri/src/minecraft_manifest.rs`)
- Java runtime → Download and verify: downloads runtime (evidence: `src-tauri/src/java.rs`)
- Game libraries → Download and verify: downloads artifacts (evidence: `src-tauri/src/libraries.rs`)
- Eternia mods → Download and verify: downloads mods (evidence: `src-tauri/src/mods.rs`)
- Native libraries → Game directory: uses directory (evidence: `src-tauri/src/native.rs`)
- Microsoft authentication → Microsoft services: authenticates with (evidence: `src-tauri/src/auth.rs`)
- Microsoft authentication → Minecraft services: requests profile (evidence: `src-tauri/src/auth.rs`)
- Microsoft authentication → Account sessions: persists accounts (evidence: `src-tauri/src/auth.rs`)
- Console window → Tauri commands: listens for events (evidence: `src/Console.tsx`)
