# munique/openmu architecture

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

- Interactive diagram: https://gitdiagram.com/munique/openmu
- Repository: https://github.com/munique/openmu

## Overview

OpenMU is a customizable, multi-version MU Online MMORPG server. Its principal runtime path starts with server startup and client connection, then game-server player/session handling and gameplay against shared game data and persistence. Major supporting capabilities include chat, extensible plug-ins, administration, and Discord integration. The graph uses the README, source index, and sampled excerpts; several domain modules are represented at directory level because their implementation was not sampled, so those links are omitted where call ownership cannot be established.

Main entry points: [`src/Startup/Program.cs`](https://github.com/munique/openmu/blob/master/src/Startup/Program.cs) (Server startup), [`src/GameServer/GameServer.cs`](https://github.com/munique/openmu/blob/master/src/GameServer/GameServer.cs) (Game server), [`src/GameLogic/Storage.cs`](https://github.com/munique/openmu/blob/master/src/GameLogic/Storage.cs) (Inventory operations), [`src/ConnectServer/ConnectServer.cs`](https://github.com/munique/openmu/blob/master/src/ConnectServer/ConnectServer.cs) (Connect server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server runtime"]
  node_startup["Server startup<br/>[Program.cs]"]
  node_connect["Connect server<br/>[ConnectServer.cs]"]
  node_game_server["Game server<br/>[GameServer.cs]"]
  node_chat["Chat service<br/>[ChatServer.cs]"]
  node_network["Network protocols"]
end

subgraph group_gameplay["Gameplay"]
  node_player["Player sessions<br/>[Player.cs]"]
  node_game_logic["Game mechanics"]
  node_inventory["Inventory operations<br/>[Storage.cs]"]
  node_cash_shop["Cash shop"]
  node_bots["Server-side bots"]
end

subgraph group_data["Game data"]
  node_model["Game data model"]
  node_item_storage[("Item storage records<br/>[ItemStorage.cs]")]
  node_persistence[("Persistence")]
end

subgraph group_extensions["Extensions and integrations"]
  node_plugins["Plug-in system<br/>[PlugInManager.cs]"]
  node_dapr_hosts["Distributed services"]
  node_discord["Discord integration"]
end

subgraph group_operations["Operations"]
  node_admin["Admin panel"]
  node_item_editor["Item editor"]
end

node_client(("Game client"))

node_startup -->|"starts"| node_connect
node_startup -->|"starts"| node_game_server
node_startup -->|"starts"| node_chat
node_client -.->|"connects"| node_connect
node_connect -.->|"routes clients"| node_game_server
node_game_server -->|"manages sessions"| node_player
node_game_server -->|"creates context"| node_game_logic
node_player -->|"uses storage"| node_inventory
node_inventory -->|"updates items"| node_item_storage
node_item_storage -->|"models entities"| node_model
node_inventory -->|"uses lists"| node_persistence
node_startup -->|"configures"| node_plugins
node_plugins -->|"uses lists"| node_persistence
node_startup -->|"hosts panel"| node_admin
node_startup -.->|"hosts services"| node_dapr_hosts
node_dapr_hosts -.->|"publishes events"| node_discord
node_item_editor -->|"builds views"| node_item_storage
node_network -.->|"exchanges packets"| node_client
node_game_server -.->|"supports features"| node_cash_shop
node_game_server -.->|"supports bots"| node_bots

click node_startup "https://github.com/munique/openmu/blob/master/src/Startup/Program.cs"
click node_connect "https://github.com/munique/openmu/blob/master/src/ConnectServer/ConnectServer.cs"
click node_game_server "https://github.com/munique/openmu/blob/master/src/GameServer/GameServer.cs"
click node_chat "https://github.com/munique/openmu/blob/master/src/ChatServer/ChatServer.cs"
click node_network "https://github.com/munique/openmu/tree/master/src/Network"
click node_player "https://github.com/munique/openmu/blob/master/src/GameLogic/Player.cs"
click node_game_logic "https://github.com/munique/openmu/tree/master/src/GameLogic"
click node_inventory "https://github.com/munique/openmu/blob/master/src/GameLogic/Storage.cs"
click node_cash_shop "https://github.com/munique/openmu/tree/master/src/GameLogic/CashShop"
click node_bots "https://github.com/munique/openmu/tree/master/src/GameLogic/Bots"
click node_model "https://github.com/munique/openmu/tree/master/src/DataModel"
click node_item_storage "https://github.com/munique/openmu/blob/master/src/DataModel/Entities/ItemStorage.cs"
click node_persistence "https://github.com/munique/openmu/tree/master/src/Persistence/EntityFramework"
click node_plugins "https://github.com/munique/openmu/blob/master/src/PlugIns/PlugInManager.cs"
click node_dapr_hosts "https://github.com/munique/openmu/tree/master/src/Dapr"
click node_discord "https://github.com/munique/openmu/tree/master/src/Discord"
click node_admin "https://github.com/munique/openmu/tree/master/src/Web/AdminPanel"
click node_item_editor "https://github.com/munique/openmu/tree/master/src/Web/ItemEditor"

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_startup,node_connect,node_game_server,node_chat,node_network,node_client toneBlue
class node_player,node_game_logic,node_inventory,node_cash_shop,node_bots toneAmber
class node_model,node_item_storage,node_persistence toneMint
class node_plugins,node_dapr_hosts,node_discord toneRose
class node_admin,node_item_editor toneIndigo
```

## Components

### Server runtime

- [Server startup](https://github.com/munique/openmu/blob/master/src/Startup/Program.cs): `src/Startup/Program.cs`
- [Connect server](https://github.com/munique/openmu/blob/master/src/ConnectServer/ConnectServer.cs): `src/ConnectServer/ConnectServer.cs`
- [Game server](https://github.com/munique/openmu/blob/master/src/GameServer/GameServer.cs): `src/GameServer/GameServer.cs`
- [Chat service](https://github.com/munique/openmu/blob/master/src/ChatServer/ChatServer.cs): `src/ChatServer/ChatServer.cs`
- [Network protocols](https://github.com/munique/openmu/tree/master/src/Network): `src/Network`

### Gameplay

- [Player sessions](https://github.com/munique/openmu/blob/master/src/GameLogic/Player.cs): `src/GameLogic/Player.cs`
- [Game mechanics](https://github.com/munique/openmu/tree/master/src/GameLogic): `src/GameLogic`
- [Inventory operations](https://github.com/munique/openmu/blob/master/src/GameLogic/Storage.cs): `src/GameLogic/Storage.cs`
- [Cash shop](https://github.com/munique/openmu/tree/master/src/GameLogic/CashShop): `src/GameLogic/CashShop`
- [Server-side bots](https://github.com/munique/openmu/tree/master/src/GameLogic/Bots): `src/GameLogic/Bots`

### Game data

- [Game data model](https://github.com/munique/openmu/tree/master/src/DataModel): `src/DataModel`
- [Item storage records](https://github.com/munique/openmu/blob/master/src/DataModel/Entities/ItemStorage.cs): `src/DataModel/Entities/ItemStorage.cs`
- [Persistence](https://github.com/munique/openmu/tree/master/src/Persistence/EntityFramework): `src/Persistence/EntityFramework`

### Extensions and integrations

- [Plug-in system](https://github.com/munique/openmu/blob/master/src/PlugIns/PlugInManager.cs): `src/PlugIns/PlugInManager.cs`
- [Distributed services](https://github.com/munique/openmu/tree/master/src/Dapr): `src/Dapr`
- [Discord integration](https://github.com/munique/openmu/tree/master/src/Discord): `src/Discord`

### Operations

- [Admin panel](https://github.com/munique/openmu/tree/master/src/Web/AdminPanel): `src/Web/AdminPanel`
- [Item editor](https://github.com/munique/openmu/tree/master/src/Web/ItemEditor): `src/Web/ItemEditor`

### Other components

- **Game client**

## Connections

- Server startup → Connect server: starts (evidence: `src/Startup/Program.cs`)
- Server startup → Game server: starts (evidence: `src/Startup/Program.cs`)
- Server startup → Chat service: starts (evidence: `src/Startup/Program.cs`)
- Game client → Connect server: connects (evidence: `README.md`)
- Connect server → Game server: routes clients
- Game server → Player sessions: manages sessions (evidence: `src/GameServer/GameServer.cs`)
- Game server → Game mechanics: creates context (evidence: `src/GameServer/GameServer.cs`)
- Player sessions → Inventory operations: uses storage (evidence: `src/GameLogic/InventoryStorage.cs`)
- Inventory operations → Item storage records: updates items (evidence: `src/GameLogic/Storage.cs`)
- Item storage records → Game data model: models entities (evidence: `src/DataModel/Entities/ItemStorage.cs`)
- Inventory operations → Persistence: uses lists (evidence: `src/GameLogic/InventoryStorage.cs`)
- Server startup → Plug-in system: configures (evidence: `src/Startup/Program.cs`)
- Plug-in system → Persistence: uses lists (evidence: `src/PlugIns/PlugInManager.cs`)
- Server startup → Admin panel: hosts panel (evidence: `src/Startup/Program.cs`)
- Server startup → Distributed services: hosts services
- Distributed services → Discord integration: publishes events
- Item editor → Item storage records: builds views (evidence: `src/Web/ItemEditor/StorageViewModelFactory.cs`)
- Network protocols → Game client: exchanges packets (evidence: `README.md`)
- Game server → Cash shop: supports features
- Game server → Server-side bots: supports bots (evidence: `README.md`)
