# secretsothep/eqmacemu architecture

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

- Interactive diagram: https://gitdiagram.com/secretsothep/eqmacemu
- Repository: https://github.com/secretsothep/eqmacemu

## Overview

EQMacEmu is an EverQuest server emulator using EQEmu-compatible game-server code, with a distinct login service. The documented player workflow is to point the game client at the login server, authenticate, choose a listed server, and enter the game; the login-server excerpt confirms that registered world servers supply the server list. The tree also exposes shared networking, persistence, zone simulation, and a zone-side loot-simulation API. Most runtime wiring is unsampled, so the graph omits speculative calls between those subsystems.

Main entry points: [`loginserver/server_manager.cpp`](https://github.com/secretsothep/eqmacemu/blob/main/loginserver/server_manager.cpp) (Server registry), [`zone/sidecar_api/loot_simulator_controller.cpp`](https://github.com/secretsothep/eqmacemu/blob/main/zone/sidecar_api/loot_simulator_controller.cpp) (Loot simulator API), [`common/database.cpp`](https://github.com/secretsothep/eqmacemu/blob/main/common/database.cpp) (Server database), [`loginserver`](https://github.com/secretsothep/eqmacemu/tree/main/loginserver) (Login server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_login["Login and Discovery"]
  node_loginserver["Login server"]
  node_servermanager["Server registry<br/>[server_manager.cpp]"]
end

subgraph group_game["World and Gameplay"]
  node_world["World server"]
  node_zone["Zone simulation"]
  node_movement["Mob movement"]
end

subgraph group_shared["Shared Services"]
  node_db[("Server database<br/>[database.cpp]")]
  node_repositories["Data repositories"]
  node_content["World content"]
  node_eqnet["EQ packet streams<br/>[eq_stream.cpp]"]
  node_servertalk["Server messaging"]
  node_discord["Discord webhooks"]
end

subgraph group_ops["Zone API"]
  node_sidecar["Loot simulator API"]
end

node_player(("Game player"))
node_gameclient(("Game client"))
node_httpclient(("API caller"))
node_mariadb[("MariaDB")]
node_discordservice["Discord"]

node_player -->|"plays through"| node_gameclient
node_gameclient -->|"connects to"| node_loginserver
node_loginserver -->|"requests server list"| node_servermanager
node_servermanager -->|"returns server list"| node_gameclient
node_servermanager -->|"queries server status"| node_db
node_db -->|"reads and writes"| node_mariadb
node_world --> node_servertalk
node_zone -->|"updates movement"| node_movement
node_httpclient -->|"requests simulation"| node_sidecar
node_sidecar -->|"uses zone state"| node_zone
node_sidecar -->|"loads NPC and item data"| node_db
node_discord -->|"sends webhooks"| node_discordservice

click node_loginserver "https://github.com/secretsothep/eqmacemu/tree/main/loginserver"
click node_servermanager "https://github.com/secretsothep/eqmacemu/blob/main/loginserver/server_manager.cpp"
click node_world "https://github.com/secretsothep/eqmacemu/tree/main/world"
click node_zone "https://github.com/secretsothep/eqmacemu/tree/main/zone"
click node_movement "https://github.com/secretsothep/eqmacemu/blob/main/zone/mob_movement_manager.cpp"
click node_db "https://github.com/secretsothep/eqmacemu/blob/main/common/database.cpp"
click node_repositories "https://github.com/secretsothep/eqmacemu/tree/main/common/repositories"
click node_content "https://github.com/secretsothep/eqmacemu/tree/main/common/content"
click node_eqnet "https://github.com/secretsothep/eqmacemu/blob/main/common/eq_stream.cpp"
click node_servertalk "https://github.com/secretsothep/eqmacemu/tree/main/common/net"
click node_discord "https://github.com/secretsothep/eqmacemu/blob/main/common/discord/discord_manager.cpp"
click node_sidecar "https://github.com/secretsothep/eqmacemu/blob/main/zone/sidecar_api/loot_simulator_controller.cpp"

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_loginserver,node_servermanager,node_gameclient toneBlue
class node_world,node_zone,node_movement,node_mariadb toneAmber
class node_db,node_repositories,node_content,node_eqnet,node_servertalk,node_discord,node_httpclient toneMint
class node_sidecar toneRose
class node_player,node_discordservice toneIndigo
```

## Components

### Login and Discovery

- [Login server](https://github.com/secretsothep/eqmacemu/tree/main/loginserver): `loginserver`
- [Server registry](https://github.com/secretsothep/eqmacemu/blob/main/loginserver/server_manager.cpp): `loginserver/server_manager.cpp`

### World and Gameplay

- [World server](https://github.com/secretsothep/eqmacemu/tree/main/world): `world`
- [Zone simulation](https://github.com/secretsothep/eqmacemu/tree/main/zone): `zone`
- [Mob movement](https://github.com/secretsothep/eqmacemu/blob/main/zone/mob_movement_manager.cpp): `zone/mob_movement_manager.cpp`

### Shared Services

- [Server database](https://github.com/secretsothep/eqmacemu/blob/main/common/database.cpp): `common/database.cpp`
- [Data repositories](https://github.com/secretsothep/eqmacemu/tree/main/common/repositories): `common/repositories`
- [World content](https://github.com/secretsothep/eqmacemu/tree/main/common/content): `common/content`
- [EQ packet streams](https://github.com/secretsothep/eqmacemu/blob/main/common/eq_stream.cpp): `common/eq_stream.cpp`
- [Server messaging](https://github.com/secretsothep/eqmacemu/tree/main/common/net): `common/net`
- [Discord webhooks](https://github.com/secretsothep/eqmacemu/blob/main/common/discord/discord_manager.cpp): `common/discord/discord_manager.cpp`

### Zone API

- [Loot simulator API](https://github.com/secretsothep/eqmacemu/blob/main/zone/sidecar_api/loot_simulator_controller.cpp): `zone/sidecar_api/loot_simulator_controller.cpp`

### Other components

- **Game player**
- **Game client**
- **API caller**
- **MariaDB**
- **Discord**

## Connections

- Game player → Game client: plays through
- Game client → Login server: connects to
- Login server → Server registry: requests server list
- Server registry → Game client: returns server list
- Server registry → Server database: queries server status
- Server database → MariaDB: reads and writes
- World server → Server messaging
- Zone simulation → Mob movement: updates movement
- API caller → Loot simulator API: requests simulation
- Loot simulator API → Zone simulation: uses zone state
- Loot simulator API → Server database: loads NPC and item data
- Discord webhooks → Discord: sends webhooks
