# funlightstudios/lubbacms architecture

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

- Interactive diagram: https://gitdiagram.com/funlightstudios/lubbacms
- Repository: https://github.com/funlightstudios/lubbacms

## Overview

LubbaCMS combines a Habbo hotel CMS/admin surface with LubbaEMU, which serves Flash TCP and Nitro WebSocket clients. The runtime path is client connection, packet parsing/dispatch, authenticated game session, then hotel-domain actions such as rooms, catalog, groups, and moderation, with persistent state in MySQL. The graph emphasizes this emulator workflow and preserves the documented CMS/admin and client capabilities. Some CMS internals and domain handlers were not sampled; those branches are shown only where the README or source index supports them.

Main entry points: [`#EMULATOR/Communication/Packets/Incoming`](https://github.com/funlightstudios/lubbacms/tree/main/%23EMULATOR/Communication/Packets/Incoming) (Incoming actions), [`#EMULATOR/Database/DatabaseManager.cs`](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Database/DatabaseManager.cs) (MySQL storage), [`#EMULATOR/Communication/ConnectionManager/ConnectionHandling.cs`](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/ConnectionManager/ConnectionHandling.cs) (TCP and WebSocket), [`#EMULATOR/PlusEnvironment.cs`](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/PlusEnvironment.cs) (Hotel services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transport["Client transport"]
  node_tcpws["TCP and WebSocket"]
  node_conn["Socket sessions"]
end

subgraph group_runtime["Emulator runtime"]
  node_client["Game session<br/>[GameClient.cs]"]
  node_packet["Packet dispatch<br/>[PacketManager.cs]"]
  node_inbound["Incoming actions"]
end

subgraph group_hotel["Hotel features"]
  node_room["Room simulation<br/>[Room.cs]"]
  node_roomusers["Room users<br/>[RoomUserManager.cs]"]
  node_habbo["Player profile<br/>[Habbo.cs]"]
  node_catalog["Catalog and shop<br/>[CatalogManager.cs]"]
  node_groups["Groups<br/>[GroupManager.cs]"]
  node_moderation["Moderation"]
end

subgraph group_platform["Platform services"]
  node_hotelservices["Hotel services<br/>[PlusEnvironment.cs]"]
  node_database[("MySQL storage<br/>[DatabaseManager.cs]")]
  node_query["Query adapter<br/>[QueryAdapter.cs]"]
  node_figure["Avatar data"]
end

subgraph group_cms["CMS and admin"]
  node_cms["CMS website<br/>[brain-config.php]"]
  node_admin["Admin panel<br/>[index.php]"]
end

node_players(("Game clients"))
node_moderators(("Hotel moderators"))

node_players -->|"connects"| node_tcpws
node_tcpws -->|"accepts sessions"| node_conn
node_conn -.->|"starts session"| node_client
node_client -->|"parses packets"| node_packet
node_packet -->|"dispatches actions"| node_inbound
node_inbound -.->|"handles room actions"| node_room
node_room -->|"manages occupants"| node_roomusers
node_roomusers -->|"uses player state"| node_habbo
node_inbound -.->|"handles shop actions"| node_catalog
node_inbound -.->|"handles group actions"| node_groups
node_inbound -.->|"handles reports"| node_moderation
node_hotelservices -->|"starts listeners"| node_tcpws
node_hotelservices -->|"initializes data"| node_figure
node_database -->|"creates adapter"| node_query
node_catalog -->|"loads catalog data"| node_database
node_groups -->|"loads group data"| node_database
node_moderation -->|"reads ban data"| node_database
node_players -.->|"registers and logs in"| node_cms
node_moderators -.->|"manages hotel"| node_admin
node_admin -.->|"configures content"| node_cms

click node_tcpws "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/ConnectionManager/ConnectionHandling.cs"
click node_conn "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/ConnectionManager/ConnectionInformation.cs"
click node_client "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/GameClients/GameClient.cs"
click node_packet "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/Packets/PacketManager.cs"
click node_inbound "https://github.com/funlightstudios/lubbacms/tree/main/%23EMULATOR/Communication/Packets/Incoming"
click node_room "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Rooms/Room.cs"
click node_roomusers "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Rooms/RoomUserManager.cs"
click node_habbo "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Users/Habbo.cs"
click node_catalog "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Catalog/CatalogManager.cs"
click node_groups "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Groups/GroupManager.cs"
click node_moderation "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Moderation/ModerationManager.cs"
click node_hotelservices "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/PlusEnvironment.cs"
click node_database "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Database/DatabaseManager.cs"
click node_query "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Database/Adapter/QueryAdapter.cs"
click node_figure "https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Core/FigureData/FigureDataManager.cs"
click node_cms "https://github.com/funlightstudios/lubbacms/blob/main/system/brain-config.php"
click node_admin "https://github.com/funlightstudios/lubbacms/blob/main/adminpan/index.php"

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_tcpws,node_conn,node_players toneBlue
class node_client,node_packet,node_inbound toneAmber
class node_room,node_roomusers,node_habbo,node_catalog,node_groups,node_moderation toneMint
class node_hotelservices,node_database,node_query,node_figure toneRose
class node_cms,node_admin,node_moderators toneIndigo
```

## Components

### Client transport

- [TCP and WebSocket](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/ConnectionManager/ConnectionHandling.cs): `#EMULATOR/Communication/ConnectionManager/ConnectionHandling.cs`
- [Socket sessions](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/ConnectionManager/ConnectionInformation.cs): `#EMULATOR/Communication/ConnectionManager/ConnectionInformation.cs`

### Emulator runtime

- [Game session](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/GameClients/GameClient.cs): `#EMULATOR/HabboHotel/GameClients/GameClient.cs`
- [Packet dispatch](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Communication/Packets/PacketManager.cs): `#EMULATOR/Communication/Packets/PacketManager.cs`
- [Incoming actions](https://github.com/funlightstudios/lubbacms/tree/main/%23EMULATOR/Communication/Packets/Incoming): `#EMULATOR/Communication/Packets/Incoming`

### Hotel features

- [Room simulation](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Rooms/Room.cs): `#EMULATOR/HabboHotel/Rooms/Room.cs`
- [Room users](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Rooms/RoomUserManager.cs): `#EMULATOR/HabboHotel/Rooms/RoomUserManager.cs`
- [Player profile](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Users/Habbo.cs): `#EMULATOR/HabboHotel/Users/Habbo.cs`
- [Catalog and shop](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Catalog/CatalogManager.cs): `#EMULATOR/HabboHotel/Catalog/CatalogManager.cs`
- [Groups](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Groups/GroupManager.cs): `#EMULATOR/HabboHotel/Groups/GroupManager.cs`
- [Moderation](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/HabboHotel/Moderation/ModerationManager.cs): `#EMULATOR/HabboHotel/Moderation/ModerationManager.cs`

### Platform services

- [Hotel services](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/PlusEnvironment.cs): `#EMULATOR/PlusEnvironment.cs`
- [MySQL storage](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Database/DatabaseManager.cs): `#EMULATOR/Database/DatabaseManager.cs`
- [Query adapter](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Database/Adapter/QueryAdapter.cs): `#EMULATOR/Database/Adapter/QueryAdapter.cs`
- [Avatar data](https://github.com/funlightstudios/lubbacms/blob/main/%23EMULATOR/Core/FigureData/FigureDataManager.cs): `#EMULATOR/Core/FigureData/FigureDataManager.cs`

### CMS and admin

- [CMS website](https://github.com/funlightstudios/lubbacms/blob/main/system/brain-config.php): `system/brain-config.php`
- [Admin panel](https://github.com/funlightstudios/lubbacms/blob/main/adminpan/index.php): `adminpan/index.php`

### Other components

- **Game clients**
- **Hotel moderators**

## Connections

- Game clients → TCP and WebSocket: connects
- TCP and WebSocket → Socket sessions: accepts sessions
- Socket sessions → Game session: starts session (evidence: `#EMULATOR/HabboHotel/GameClients/GameClient.cs`)
- Game session → Packet dispatch: parses packets (evidence: `#EMULATOR/HabboHotel/GameClients/GameClient.cs`)
- Packet dispatch → Incoming actions: dispatches actions (evidence: `#EMULATOR/Communication/Packets/PacketManager.cs`)
- Incoming actions → Room simulation: handles room actions
- Room simulation → Room users: manages occupants (evidence: `#EMULATOR/HabboHotel/Rooms/RoomUserManager.cs`)
- Room users → Player profile: uses player state (evidence: `#EMULATOR/HabboHotel/Rooms/RoomUserManager.cs`)
- Incoming actions → Catalog and shop: handles shop actions
- Incoming actions → Groups: handles group actions
- Incoming actions → Moderation: handles reports
- Hotel services → TCP and WebSocket: starts listeners (evidence: `#EMULATOR/PlusEnvironment.cs`)
- Hotel services → Avatar data: initializes data (evidence: `#EMULATOR/PlusEnvironment.cs`)
- MySQL storage → Query adapter: creates adapter (evidence: `#EMULATOR/Database/DatabaseManager.cs`)
- Catalog and shop → MySQL storage: loads catalog data (evidence: `#EMULATOR/HabboHotel/Catalog/CatalogManager.cs`)
- Groups → MySQL storage: loads group data (evidence: `#EMULATOR/HabboHotel/Groups/GroupManager.cs`)
- Moderation → MySQL storage: reads ban data (evidence: `#EMULATOR/HabboHotel/Moderation/ModerationManager.cs`)
- Game clients → CMS website: registers and logs in
- Hotel moderators → Admin panel: manages hotel
- Admin panel → CMS website: configures content
