# noscoreio/noscore architecture

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

- Interactive diagram: https://gitdiagram.com/noscoreio/noscore
- Repository: https://github.com/noscoreio/noscore

## Overview

NosCore is a multiplayer game-server emulator. A client session receives game traffic and packet handlers dispatch gameplay requests to domain services that update player and map state and send packets back. The repository also includes game-data parsing, persistent account and world data, login/master coordination, inter-server messaging, and an HTTP API. The README documents the server startup and messaging model; sampled source confirms selected session, combat, inventory, and family interactions. Many listed subsystems were not sampled, so their internal connections are omitted.

Main entry points: [`src/NosCore.PacketHandlers`](https://github.com/noscoreio/noscore/tree/master/src/NosCore.PacketHandlers) (Packet handlers), [`src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs) (Client session), [`src/NosCore.MasterServer/MasterServerBootstrap.cs`](https://github.com/noscoreio/noscore/blob/master/src/NosCore.MasterServer/MasterServerBootstrap.cs) (Master server), [`src/NosCore.GameObject/InterChannelCommunication/MessagingTransport.cs`](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/InterChannelCommunication/MessagingTransport.cs) (Message transport)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_session["Client session<br/>[ClientSession.cs]"]
  node_handlers["Packet handlers"]
  node_playerstate["Player state"]
  node_map["Map instances<br/>[MapInstance.cs]"]
end

subgraph group_domain["Gameplay domains"]
  node_combat["Battle service<br/>[BattleService.cs]"]
  node_inventory["Inventory service"]
  node_itemgen["Item generation"]
  node_groups["Group service<br/>[Group.cs]"]
  node_family["Family service<br/>[FamilyService]"]
  node_quests["Quest service<br/>[QuestService]"]
  node_bazaar["Bazaar service<br/>[BazaarService.cs]"]
end

subgraph group_platform["Server platform"]
  node_login["Login server"]
  node_master["Master server"]
  node_world["World server"]
  node_hubs["Inter-server hubs<br/>[Hubs]"]
  node_authhub["Auth hub<br/>[AuthHub.cs]"]
  node_messaging["Message transport"]
end

subgraph group_data["Data platform"]
  node_parser["Game-data parser<br/>[Parser.cs]"]
  node_account["Account record<br/>[Account.cs]"]
  node_database[("PostgreSQL<br/>[NosCoreContext.cs]")]
end

subgraph group_integration["External interfaces"]
  node_api["Web API<br/>[Controllers]"]
end

node_player(("Game client"))

node_player -.->|"connects"| node_session
node_session -->|"dispatches packets"| node_handlers
node_handlers -->|"updates family"| node_family
node_handlers -->|"publishes changes"| node_hubs
node_handlers -->|"uses combat"| node_combat
node_handlers -->|"uses inventory"| node_inventory
node_handlers -->|"generates items"| node_itemgen
node_handlers -->|"uses groups"| node_groups
node_session -->|"holds entity"| node_playerstate
node_session -->|"registers session"| node_authhub
node_session -->|"runs map executor"| node_map
node_parser -->|"creates database"| node_database
node_login -->|"starts after"| node_master
node_world -->|"starts after"| node_master
node_login -->|"communicates through"| node_messaging
node_world -->|"communicates through"| node_messaging
node_master -->|"communicates through"| node_messaging
node_api -->|"uses auth hub"| node_authhub
node_account -.->|"stored in"| node_database

click node_session "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs"
click node_handlers "https://github.com/noscoreio/noscore/tree/master/src/NosCore.PacketHandlers"
click node_playerstate "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Ecs/PlayerComponentBundle.cs"
click node_map "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/MapInstanceGenerationService/MapInstance.cs"
click node_combat "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/BattleService/BattleService.cs"
click node_inventory "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/InventoryService/InventoryService.cs"
click node_itemgen "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/ItemGenerationService/ItemGenerationService.cs"
click node_groups "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/GroupService/Group.cs"
click node_family "https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/Services/FamilyService"
click node_quests "https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/Services/QuestService"
click node_bazaar "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/BazaarService/BazaarService.cs"
click node_login "https://github.com/noscoreio/noscore/blob/master/src/NosCore.LoginServer/LoginServerBootstrap.cs"
click node_master "https://github.com/noscoreio/noscore/blob/master/src/NosCore.MasterServer/MasterServerBootstrap.cs"
click node_world "https://github.com/noscoreio/noscore/blob/master/src/NosCore.WorldServer/WorldServerBootstrap.cs"
click node_hubs "https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/InterChannelCommunication/Hubs"
click node_authhub "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/InterChannelCommunication/Hubs/AuthHub/AuthHub.cs"
click node_api "https://github.com/noscoreio/noscore/tree/master/src/NosCore.WebApi/Controllers"
click node_parser "https://github.com/noscoreio/noscore/blob/master/src/NosCore.Parser/Parser.cs"
click node_account "https://github.com/noscoreio/noscore/blob/master/src/NosCore.Database/Entities/Account.cs"
click node_database "https://github.com/noscoreio/noscore/blob/master/src/NosCore.Database/NosCoreContext.cs"
click node_messaging "https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/InterChannelCommunication/MessagingTransport.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_session,node_handlers,node_playerstate,node_map,node_player toneBlue
class node_combat,node_inventory,node_itemgen,node_groups,node_family,node_quests,node_bazaar toneAmber
class node_login,node_master,node_world,node_hubs,node_authhub,node_messaging toneMint
class node_parser,node_account,node_database toneRose
class node_api toneIndigo
```

## Components

### Game runtime

- [Client session](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs): `src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`
- [Packet handlers](https://github.com/noscoreio/noscore/tree/master/src/NosCore.PacketHandlers): `src/NosCore.PacketHandlers`
- [Player state](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Ecs/PlayerComponentBundle.cs): `src/NosCore.GameObject/Ecs/PlayerComponentBundle.cs`
- [Map instances](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/MapInstanceGenerationService/MapInstance.cs): `src/NosCore.GameObject/Services/MapInstanceGenerationService/MapInstance.cs`

### Gameplay domains

- [Battle service](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/BattleService/BattleService.cs): `src/NosCore.GameObject/Services/BattleService/BattleService.cs`
- [Inventory service](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/InventoryService/InventoryService.cs): `src/NosCore.GameObject/Services/InventoryService/InventoryService.cs`
- [Item generation](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/ItemGenerationService/ItemGenerationService.cs): `src/NosCore.GameObject/Services/ItemGenerationService/ItemGenerationService.cs`
- [Group service](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/GroupService/Group.cs): `src/NosCore.GameObject/Services/GroupService/Group.cs`
- [Family service](https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/Services/FamilyService): `src/NosCore.GameObject/Services/FamilyService`
- [Quest service](https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/Services/QuestService): `src/NosCore.GameObject/Services/QuestService`
- [Bazaar service](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/Services/BazaarService/BazaarService.cs): `src/NosCore.GameObject/Services/BazaarService/BazaarService.cs`

### Server platform

- [Login server](https://github.com/noscoreio/noscore/blob/master/src/NosCore.LoginServer/LoginServerBootstrap.cs): `src/NosCore.LoginServer/LoginServerBootstrap.cs`
- [Master server](https://github.com/noscoreio/noscore/blob/master/src/NosCore.MasterServer/MasterServerBootstrap.cs): `src/NosCore.MasterServer/MasterServerBootstrap.cs`
- [World server](https://github.com/noscoreio/noscore/blob/master/src/NosCore.WorldServer/WorldServerBootstrap.cs): `src/NosCore.WorldServer/WorldServerBootstrap.cs`
- [Inter-server hubs](https://github.com/noscoreio/noscore/tree/master/src/NosCore.GameObject/InterChannelCommunication/Hubs): `src/NosCore.GameObject/InterChannelCommunication/Hubs`
- [Auth hub](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/InterChannelCommunication/Hubs/AuthHub/AuthHub.cs): `src/NosCore.GameObject/InterChannelCommunication/Hubs/AuthHub/AuthHub.cs`
- [Message transport](https://github.com/noscoreio/noscore/blob/master/src/NosCore.GameObject/InterChannelCommunication/MessagingTransport.cs): `src/NosCore.GameObject/InterChannelCommunication/MessagingTransport.cs`

### Data platform

- [Game-data parser](https://github.com/noscoreio/noscore/blob/master/src/NosCore.Parser/Parser.cs): `src/NosCore.Parser/Parser.cs`
- [Account record](https://github.com/noscoreio/noscore/blob/master/src/NosCore.Database/Entities/Account.cs): `src/NosCore.Database/Entities/Account.cs`
- [PostgreSQL](https://github.com/noscoreio/noscore/blob/master/src/NosCore.Database/NosCoreContext.cs): `src/NosCore.Database/NosCoreContext.cs`

### External interfaces

- [Web API](https://github.com/noscoreio/noscore/tree/master/src/NosCore.WebApi/Controllers): `src/NosCore.WebApi/Controllers`

### Other components

- **Game client**

## Connections

- Game client → Client session: connects
- Client session → Packet handlers: dispatches packets (evidence: `src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`)
- Packet handlers → Family service: updates family (evidence: `src/NosCore.PacketHandlers/Family/FAuthPacketHandler.cs`)
- Packet handlers → Inter-server hubs: publishes changes (evidence: `src/NosCore.PacketHandlers/Family/FAuthPacketHandler.cs`)
- Packet handlers → Battle service: uses combat (evidence: `src/NosCore.PacketHandlers/CharacterScreen/SelectPacketHandler.cs`)
- Packet handlers → Inventory service: uses inventory (evidence: `src/NosCore.PacketHandlers/CharacterScreen/SelectPacketHandler.cs`)
- Packet handlers → Item generation: generates items (evidence: `src/NosCore.PacketHandlers/CharacterScreen/SelectPacketHandler.cs`)
- Packet handlers → Group service: uses groups (evidence: `src/NosCore.PacketHandlers/Group/PjoinPacketHandler.cs`)
- Client session → Player state: holds entity (evidence: `src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`)
- Client session → Auth hub: registers session (evidence: `src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`)
- Client session → Map instances: runs map executor (evidence: `src/NosCore.GameObject/Networking/ClientSession/ClientSession.cs`)
- Game-data parser → PostgreSQL: creates database (evidence: `README.md`)
- Login server → Master server: starts after (evidence: `README.md`)
- World server → Master server: starts after (evidence: `README.md`)
- Login server → Message transport: communicates through (evidence: `README.md`)
- World server → Message transport: communicates through (evidence: `README.md`)
- Master server → Message transport: communicates through (evidence: `README.md`)
- Web API → Auth hub: uses auth hub (evidence: `src/NosCore.WebApi/Controllers/AuthController.cs`)
- Account record → PostgreSQL: stored in (evidence: `src/NosCore.Database/NosCoreContext.cs`)
