# mrhyree/moffy-launcher architecture

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

- Interactive diagram: https://gitdiagram.com/mrhyree/moffy-launcher
- Repository: https://github.com/mrhyree/moffy-launcher

## Overview

moffy is a self-hosted modded-Minecraft service: an administrator provisions and supervises servers through an embedded panel, while players connect with a desktop launcher that authenticates, synchronizes the server’s modpack, installs game prerequisites, and launches Minecraft. The graph includes those workflows, account and content-management capabilities, and the shared game-installation layer. Some admin and launcher subsystems are represented from README descriptions and the file tree rather than sampled implementations; those relationships cite the README or are marked unverified.

Main entry points: [`crates/admin-core/src/main.rs`](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/main.rs) (Daemon entry), [`web/src/App.vue`](https://github.com/mrhyree/moffy-launcher/blob/main/web/src/App.vue) (Panel application), [`crates/launcher-client/src/commands.rs`](https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/commands.rs) (Launcher commands), [`crates/moffy-mc/src/client.rs`](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/client.rs) (Minecraft client install)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_daemon["Daemon and services"]
  node_admin["Daemon entry<br/>[main.rs]"]
  node_api["HTTP API"]
  node_accounts["Accounts and auth<br/>[users.rs]"]
  node_database[("SQLite state<br/>[db.rs]")]
  node_instances["Server instances<br/>[instances.rs]"]
  node_supervisor["Process supervision<br/>[supervisor.rs]"]
  node_packs["Modpack management<br/>[modpack.rs]"]
  node_sources["Mod sources<br/>[sources.rs]"]
  node_backups["Backups and files<br/>[backups.rs]"]
  node_yggdrasil["Game authentication<br/>[yggdrasil.rs]"]
end

subgraph group_panel["Admin panel"]
  node_webapp["Panel application<br/>[App.vue]"]
  node_panelauth["Panel sign-in<br/>[Auth.vue]"]
  node_panelpages["Management screens"]
  node_panelstore["Panel state and API<br/>[store.ts]"]
end

subgraph group_player["Player launcher"]
  node_launcher["Launcher commands<br/>[commands.rs]"]
  node_launchui["Launcher screens<br/>[App.vue]"]
  node_sync["Pack synchronization<br/>[sync.rs]"]
  node_launcherapi["Daemon connection<br/>[api.rs]"]
  node_game["Game preparation<br/>[game.rs]"]
end

subgraph group_mc["Minecraft tooling"]
  node_mcclient["Minecraft client install<br/>[client.rs]"]
  node_forgeclient["Forge installation<br/>[forge_client.rs]"]
  node_java["Java runtime install<br/>[java.rs]"]
  node_mcserver["Server installation<br/>[server.rs]"]
  node_http["Verified downloads<br/>[http.rs]"]
end

node_administrator(("Administrator"))
node_playeractor(("Player"))

node_administrator -->|"uses panel"| node_webapp
node_webapp -->|"shows auth"| node_panelauth
node_webapp -->|"checks session"| node_panelstore
node_webapp -->|"routes screens"| node_panelpages
node_panelauth -->|"submits credentials"| node_panelstore
node_panelstore -.->|"calls endpoints"| node_api
node_api -->|"authenticates users"| node_accounts
node_accounts -->|"reads and writes"| node_database
node_administrator -->|"configures daemon"| node_admin
node_admin -.->|"manages servers"| node_instances
node_admin -.->|"supervises servers"| node_supervisor
node_instances -.->|"assigns modpacks"| node_packs
node_packs -.->|"imports catalog content"| node_sources
node_admin -.->|"provides file and backup tools"| node_backups
node_playeractor -->|"connects and signs in"| node_launchui
node_launchui -->|"invokes commands"| node_launcher
node_launcher -->|"requests daemon data"| node_launcherapi
node_launcher -->|"synchronizes pack"| node_sync
node_launcher -->|"starts game workflow"| node_game
node_launcherapi -->|"uses daemon API"| node_api
node_sync -->|"fetches manifest and files"| node_launcherapi
node_game -.->|"prepares Minecraft"| node_mcclient
node_mcclient -->|"installs Forge variants"| node_forgeclient
node_mcclient -->|"ensures Java runtime"| node_java
node_mcserver -->|"ensures Java runtime"| node_java
node_mcclient -->|"downloads game files"| node_http
node_forgeclient -->|"downloads installer files"| node_http
node_java -->|"downloads runtime"| node_http
node_mcserver -->|"downloads server files"| node_http
node_api -.->|"serves game authentication"| node_yggdrasil

click node_admin "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/main.rs"
click node_api "https://github.com/mrhyree/moffy-launcher/tree/main/crates/admin-core/src/api"
click node_accounts "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/users.rs"
click node_database "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/db.rs"
click node_instances "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/instances.rs"
click node_supervisor "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/supervisor.rs"
click node_packs "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/modpack.rs"
click node_sources "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/sources.rs"
click node_backups "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/backups.rs"
click node_yggdrasil "https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/api/yggdrasil.rs"
click node_webapp "https://github.com/mrhyree/moffy-launcher/blob/main/web/src/App.vue"
click node_panelauth "https://github.com/mrhyree/moffy-launcher/blob/main/web/src/pages/Auth.vue"
click node_panelpages "https://github.com/mrhyree/moffy-launcher/tree/main/web/src/pages"
click node_panelstore "https://github.com/mrhyree/moffy-launcher/blob/main/web/src/lib/store.ts"
click node_launcher "https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/commands.rs"
click node_launchui "https://github.com/mrhyree/moffy-launcher/blob/main/web-launcher/src/App.vue"
click node_sync "https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/sync.rs"
click node_launcherapi "https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/api.rs"
click node_game "https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/game.rs"
click node_mcclient "https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/client.rs"
click node_forgeclient "https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/forge_client.rs"
click node_java "https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/java.rs"
click node_mcserver "https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/server.rs"
click node_http "https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/http.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_admin,node_api,node_accounts,node_database,node_instances,node_supervisor,node_packs,node_sources,node_backups,node_yggdrasil toneBlue
class node_webapp,node_panelauth,node_panelpages,node_panelstore toneAmber
class node_launcher,node_launchui,node_sync,node_launcherapi,node_game toneMint
class node_mcclient,node_forgeclient,node_java,node_mcserver,node_http toneRose
class node_administrator,node_playeractor toneIndigo
```

## Components

### Daemon and services

- [Daemon entry](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/main.rs): `crates/admin-core/src/main.rs`
- [HTTP API](https://github.com/mrhyree/moffy-launcher/tree/main/crates/admin-core/src/api): `crates/admin-core/src/api`
- [Accounts and auth](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/users.rs): `crates/admin-core/src/users.rs`
- [SQLite state](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/db.rs): `crates/admin-core/src/db.rs`
- [Server instances](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/instances.rs): `crates/admin-core/src/instances.rs`
- [Process supervision](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/supervisor.rs): `crates/admin-core/src/supervisor.rs`
- [Modpack management](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/modpack.rs): `crates/admin-core/src/modpack.rs`
- [Mod sources](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/sources.rs): `crates/admin-core/src/sources.rs`
- [Backups and files](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/backups.rs): `crates/admin-core/src/backups.rs`
- [Game authentication](https://github.com/mrhyree/moffy-launcher/blob/main/crates/admin-core/src/api/yggdrasil.rs): `crates/admin-core/src/api/yggdrasil.rs`

### Admin panel

- [Panel application](https://github.com/mrhyree/moffy-launcher/blob/main/web/src/App.vue): `web/src/App.vue`
- [Panel sign-in](https://github.com/mrhyree/moffy-launcher/blob/main/web/src/pages/Auth.vue): `web/src/pages/Auth.vue`
- [Management screens](https://github.com/mrhyree/moffy-launcher/tree/main/web/src/pages): `web/src/pages`
- [Panel state and API](https://github.com/mrhyree/moffy-launcher/blob/main/web/src/lib/store.ts): `web/src/lib/store.ts`

### Player launcher

- [Launcher commands](https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/commands.rs): `crates/launcher-client/src/commands.rs`
- [Launcher screens](https://github.com/mrhyree/moffy-launcher/blob/main/web-launcher/src/App.vue): `web-launcher/src/App.vue`
- [Pack synchronization](https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/sync.rs): `crates/launcher-client/src/backend/sync.rs`
- [Daemon connection](https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/api.rs): `crates/launcher-client/src/backend/api.rs`
- [Game preparation](https://github.com/mrhyree/moffy-launcher/blob/main/crates/launcher-client/src/backend/game.rs): `crates/launcher-client/src/backend/game.rs`

### Minecraft tooling

- [Minecraft client install](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/client.rs): `crates/moffy-mc/src/client.rs`
- [Forge installation](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/forge_client.rs): `crates/moffy-mc/src/forge_client.rs`
- [Java runtime install](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/java.rs): `crates/moffy-mc/src/java.rs`
- [Server installation](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/server.rs): `crates/moffy-mc/src/server.rs`
- [Verified downloads](https://github.com/mrhyree/moffy-launcher/blob/main/crates/moffy-mc/src/http.rs): `crates/moffy-mc/src/http.rs`

### Other components

- **Administrator**
- **Player**

## Connections

- Administrator → Panel application: uses panel (evidence: `README.md`)
- Panel application → Panel sign-in: shows auth (evidence: `web/src/App.vue`)
- Panel application → Panel state and API: checks session (evidence: `web/src/App.vue`)
- Panel application → Management screens: routes screens (evidence: `web/src/App.vue`)
- Panel sign-in → Panel state and API: submits credentials (evidence: `web/src/pages/Auth.vue`)
- Panel state and API → HTTP API: calls endpoints
- HTTP API → Accounts and auth: authenticates users (evidence: `crates/admin-core/src/api/auth.rs`)
- Accounts and auth → SQLite state: reads and writes (evidence: `crates/admin-core/src/users.rs`)
- Administrator → Daemon entry: configures daemon (evidence: `README.md`)
- Daemon entry → Server instances: manages servers
- Daemon entry → Process supervision: supervises servers
- Server instances → Modpack management: assigns modpacks
- Modpack management → Mod sources: imports catalog content
- Daemon entry → Backups and files: provides file and backup tools
- Player → Launcher screens: connects and signs in (evidence: `README.md`)
- Launcher screens → Launcher commands: invokes commands (evidence: `web-launcher/src/App.vue`)
- Launcher commands → Daemon connection: requests daemon data (evidence: `crates/launcher-client/src/commands.rs`)
- Launcher commands → Pack synchronization: synchronizes pack (evidence: `crates/launcher-client/src/commands.rs`)
- Launcher commands → Game preparation: starts game workflow (evidence: `crates/launcher-client/src/commands.rs`)
- Daemon connection → HTTP API: uses daemon API (evidence: `README.md`)
- Pack synchronization → Daemon connection: fetches manifest and files (evidence: `crates/launcher-client/src/backend/sync.rs`)
- Game preparation → Minecraft client install: prepares Minecraft
- Minecraft client install → Forge installation: installs Forge variants (evidence: `crates/moffy-mc/src/client.rs`)
- Minecraft client install → Java runtime install: ensures Java runtime (evidence: `crates/moffy-mc/src/client.rs`)
- Server installation → Java runtime install: ensures Java runtime (evidence: `crates/moffy-mc/src/server.rs`)
- Minecraft client install → Verified downloads: downloads game files (evidence: `crates/moffy-mc/src/client.rs`)
- Forge installation → Verified downloads: downloads installer files (evidence: `crates/moffy-mc/src/forge_client.rs`)
- Java runtime install → Verified downloads: downloads runtime (evidence: `crates/moffy-mc/src/java.rs`)
- Server installation → Verified downloads: downloads server files (evidence: `crates/moffy-mc/src/server.rs`)
- HTTP API → Game authentication: serves game authentication
