# aethai/ro3emu-server architecture

> Architecture diagram of the GitHub repository aethai/ro3emu-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aethai/ro3emu-server
- Repository: https://github.com/aethai/ro3emu-server

## Overview

RO3Emu is a self-hosted Ragnarok Online 3 emulator with a Windows play/hosting flow, a game server, client compatibility patches, and an operator panel. The main user path is to locate or obtain game files, start or join a server, patch and launch the client, then log in and play; server gameplay spans sessions, characters, combat, and dungeons. The README documents this flow and major capabilities; sampled source supports selected internal links, while unsampled subsystem links are omitted or marked unverified.

Main entry points: [`src/Ro3Emu.Server/Program.cs`](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Program.cs) (Server runtime), [`src/Ro3Emu.Setup/Program.cs`](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Setup/Program.cs) (Setup flows), [`src/Ro3Emu.Server/Data/GameData.cs`](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Data/GameData.cs) (Config and game data), [`src/Ro3Emu.ClientPatching/Launcher.cs`](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientPatching/Launcher.cs) (Game launch proof)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Play and setup"]
  node_setup["Setup flows<br/>[Program.cs]"]
  node_installer["Client install<br/>[ClientInstaller.cs]"]
  node_launcher["Desktop launcher"]
end

subgraph group_client["Client compatibility"]
  node_patcher["Client patcher<br/>[ClientPatcher.cs]"]
  node_game_launch["Game launch proof<br/>[Launcher.cs]"]
  node_client_hooks["Client hooks<br/>[Diagnostics.cs]"]
end

subgraph group_server["Game server"]
  node_server["Server runtime<br/>[Program.cs]"]
  node_session["Game sessions<br/>[GameSession.cs]"]
  node_characters["Character services"]
  node_role_store[("Role persistence<br/>[RoleStore.cs]")]
  node_combat["Combat and monsters<br/>[CombatService.cs]"]
  node_dungeons["Dungeon gameplay<br/>[DungeonService.cs]"]
  node_activities["Activities<br/>[Activities]"]
end

subgraph group_ops["Operations and community"]
  node_panel["Operator panel<br/>[PanelSite.cs]"]
  node_panel_ui["Panel interface<br/>[app.js]"]
  node_bots["Bot client<br/>[BotClient.cs]"]
  node_bot_cli["Bot controls<br/>[Program.cs]"]
end

subgraph group_data["Game data"]
  node_game_data[("Config and game data<br/>[GameData.cs]")]
  node_data_export["Game data export<br/>[GameDataExport.cs]"]
end

node_player(("Player / host"))
node_genesis{{"Genesis update servers"}}
node_game_client(("RO3 game client"))
node_server_operator(("Server operator"))

node_player -->|"starts or joins"| node_setup
node_setup -.->|"prepares files"| node_installer
node_setup -->|"starts server"| node_server
node_setup -->|"patches client"| node_patcher
node_setup -.->|"starts game"| node_game_launch
node_installer -->|"downloads game"| node_genesis
node_launcher -->|"starts game"| node_game_launch
node_patcher -->|"adds hooks"| node_client_hooks
node_game_launch -->|"launches"| node_game_client
node_client_hooks -.->|"extends client"| node_game_client
node_game_client -->|"plays on"| node_server
node_server -.->|"serves sessions"| node_session
node_session -.->|"handles character state"| node_characters
node_characters -.->|"persists roles"| node_role_store
node_server -.->|"provides combat"| node_combat
node_server -.->|"provides dungeons"| node_dungeons
node_server -.->|"hosts activities"| node_activities
node_game_data -.->|"supplies config"| node_characters
node_game_data -.->|"supplies config"| node_combat
node_data_export -.->|"exports data"| node_game_data
node_server_operator -->|"uses panel"| node_panel_ui
node_panel_ui -.->|"requests operations"| node_panel
node_panel -.->|"administers server"| node_server
node_bots -.->|"connects to"| node_server
node_bot_cli -->|"drives bot"| node_bots

click node_setup "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Setup/Program.cs"
click node_installer "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Setup.Core/Install/ClientInstaller.cs"
click node_launcher "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Launcher/Ro3EmuController.cs"
click node_patcher "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientPatching/ClientPatcher.cs"
click node_game_launch "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientPatching/Launcher.cs"
click node_client_hooks "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientHooks/Diagnostics.cs"
click node_server "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Program.cs"
click node_session "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Core/GameSession.cs"
click node_characters "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Character/CharacterService.cs"
click node_role_store "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Accounts/RoleStore.cs"
click node_combat "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Combat/CombatService.cs"
click node_dungeons "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Dungeon/DungeonService.cs"
click node_activities "https://github.com/aethai/ro3emu-server/tree/main/src/Ro3Emu.Server/Game/Activities"
click node_panel "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Panel/PanelSite.cs"
click node_panel_ui "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Panel/www/app.js"
click node_bots "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Bot/BotClient.cs"
click node_bot_cli "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.BotCli/Program.cs"
click node_game_data "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Data/GameData.cs"
click node_data_export "https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.DataExport/GameDataExport.cs"

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_setup,node_installer,node_launcher,node_game_client toneBlue
class node_patcher,node_game_launch,node_client_hooks toneAmber
class node_server,node_session,node_characters,node_role_store,node_combat,node_dungeons,node_activities,node_genesis,node_server_operator toneMint
class node_panel,node_panel_ui,node_bots,node_bot_cli toneRose
class node_game_data,node_data_export,node_player toneIndigo
```

## Components

### Play and setup

- [Setup flows](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Setup/Program.cs): `src/Ro3Emu.Setup/Program.cs`
- [Client install](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Setup.Core/Install/ClientInstaller.cs): `src/Ro3Emu.Setup.Core/Install/ClientInstaller.cs`
- [Desktop launcher](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Launcher/Ro3EmuController.cs): `src/Ro3Emu.Launcher/Ro3EmuController.cs`

### Client compatibility

- [Client patcher](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientPatching/ClientPatcher.cs): `src/Ro3Emu.ClientPatching/ClientPatcher.cs`
- [Game launch proof](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientPatching/Launcher.cs): `src/Ro3Emu.ClientPatching/Launcher.cs`
- [Client hooks](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.ClientHooks/Diagnostics.cs): `src/Ro3Emu.ClientHooks/Diagnostics.cs`

### Game server

- [Server runtime](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Program.cs): `src/Ro3Emu.Server/Program.cs`
- [Game sessions](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Core/GameSession.cs): `src/Ro3Emu.Server/Game/Core/GameSession.cs`
- [Character services](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Character/CharacterService.cs): `src/Ro3Emu.Server/Game/Character/CharacterService.cs`
- [Role persistence](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Accounts/RoleStore.cs): `src/Ro3Emu.Server/Accounts/RoleStore.cs`
- [Combat and monsters](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Combat/CombatService.cs): `src/Ro3Emu.Server/Game/Combat/CombatService.cs`
- [Dungeon gameplay](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Game/Dungeon/DungeonService.cs): `src/Ro3Emu.Server/Game/Dungeon/DungeonService.cs`
- [Activities](https://github.com/aethai/ro3emu-server/tree/main/src/Ro3Emu.Server/Game/Activities): `src/Ro3Emu.Server/Game/Activities`

### Operations and community

- [Operator panel](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Panel/PanelSite.cs): `src/Ro3Emu.Panel/PanelSite.cs`
- [Panel interface](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Panel/www/app.js): `src/Ro3Emu.Panel/www/app.js`
- [Bot client](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Bot/BotClient.cs): `src/Ro3Emu.Bot/BotClient.cs`
- [Bot controls](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.BotCli/Program.cs): `src/Ro3Emu.BotCli/Program.cs`

### Game data

- [Config and game data](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.Server/Data/GameData.cs): `src/Ro3Emu.Server/Data/GameData.cs`
- [Game data export](https://github.com/aethai/ro3emu-server/blob/main/src/Ro3Emu.DataExport/GameDataExport.cs): `src/Ro3Emu.DataExport/GameDataExport.cs`

### Other components

- **Player / host**
- **Genesis update servers**
- **RO3 game client**
- **Server operator**

## Connections

- Player / host → Setup flows: starts or joins (evidence: `README.md`)
- Setup flows → Client install: prepares files
- Setup flows → Server runtime: starts server (evidence: `README.md`)
- Setup flows → Client patcher: patches client (evidence: `README.md`)
- Setup flows → Game launch proof: starts game
- Client install → Genesis update servers: downloads game (evidence: `README.md`)
- Desktop launcher → Game launch proof: starts game (evidence: `src/Ro3Emu.Launcher/Ro3EmuController.cs`)
- Client patcher → Client hooks: adds hooks (evidence: `src/Ro3Emu.ClientPatching/ClientPatcher.cs`)
- Game launch proof → RO3 game client: launches (evidence: `src/Ro3Emu.ClientPatching/Launcher.cs`)
- Client hooks → RO3 game client: extends client
- RO3 game client → Server runtime: plays on (evidence: `README.md`)
- Server runtime → Game sessions: serves sessions
- Game sessions → Character services: handles character state (evidence: `src/Ro3Emu.Server/Game/Core/GameSession.cs`)
- Character services → Role persistence: persists roles (evidence: `src/Ro3Emu.Server/Game/Character/CharacterService.cs`)
- Server runtime → Combat and monsters: provides combat
- Server runtime → Dungeon gameplay: provides dungeons
- Server runtime → Activities: hosts activities
- Config and game data → Character services: supplies config (evidence: `src/Ro3Emu.Server/Game/Character/CharacterService.cs`)
- Config and game data → Combat and monsters: supplies config
- Game data export → Config and game data: exports data
- Server operator → Panel interface: uses panel (evidence: `README.md`)
- Panel interface → Operator panel: requests operations
- Operator panel → Server runtime: administers server
- Bot client → Server runtime: connects to
- Bot controls → Bot client: drives bot (evidence: `src/Ro3Emu.BotCli/Program.cs`)
