# festivaldev/paradise architecture

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

- Interactive diagram: https://gitdiagram.com/festivaldev/paradise
- Repository: https://github.com/festivaldev/paradise

## Overview

Project Paradise emulates UberStrike, combining a patched game client with web services and realtime communication/game servers. The principal flow is client login and game use through web-service authentication, followed by lobby and gameplay sessions handled by the realtime servers; server events also feed persistence and optional Discord integration. The graph retains documented client, file-serving, console, and compatibility capabilities. Relationships not visible in the sampled excerpts or SOURCE INDEX are omitted or marked unverified rather than inferred from names alone.

Main entry points: [`packages/ws/src/ParadiseService.ts`](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/ParadiseService.ts) (Service orchestrator), [`packages/ws/src/services/web-services/current`](https://github.com/festivaldev/paradise/tree/dev/packages/ws/src/services/web-services/current) (Current APIs), [`packages/client/current/Paradise.Client/Hooks`](https://github.com/festivaldev/paradise/tree/dev/packages/client/current/Paradise.Client/Hooks) (Client hooks), [`packages/ws/src/services/web-services/WebServiceHost.ts`](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/web-services/WebServiceHost.ts) (Web-service host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Game client"]
  node_client_hooks["Client hooks<br/>[Hooks]"]
  node_client_prefs["Client preferences<br/>[ParadisePrefs.cs]"]
  node_client_maps["Custom maps"]
  node_client_music["Menu music"]
  node_client_rpc["Rich presence"]
end

subgraph group_web["Web services"]
  node_web_host["Web-service host<br/>[WebServiceHost.ts]"]
  node_web_current["Current APIs"]
  node_web_legacy["Legacy APIs"]
  node_database[("Persistent data<br/>[Database.ts]")]
  node_sessions["Game sessions"]
end

subgraph group_realtime["Realtime servers"]
  node_realtime_host["Realtime host"]
  node_comm_server["Comm server"]
  node_lobby["Lobby rooms<br/>[LobbyManager.cs]"]
  node_game_server["Game server"]
  node_game_peer["Game peer"]
  node_room_manager["Room manager<br/>[GameRoomManager.cs]"]
  node_game_room["Match rooms<br/>[BaseGameRoom.cs]"]
  node_statistics["Match statistics"]
  node_realtime_services["Web-service clients"]
  node_photon_shim["Photon protocol shim<br/>[ClientPeer.cs]"]
end

subgraph group_shared["Shared and operations"]
  node_models["Domain models"]
  node_service["Service orchestrator<br/>[ParadiseService.ts]"]
  node_console["Admin console<br/>[CommandHandler.ts]"]
  node_discord["Discord integration<br/>[DiscordClient.ts]"]
  node_file_server["File server<br/>[FileServerHost.ts]"]
  node_socket["Server socket<br/>[Host.ts]"]
end

node_player(("Player"))
node_game["UberStrike game"]

node_player -->|"plays"| node_game
node_game -->|"patched by"| node_client_hooks
node_client_hooks -->|"authenticates via"| node_web_current
node_client_hooks -->|"loads maps"| node_client_maps
node_client_prefs -->|"configures"| node_client_music
node_client_hooks -.->|"calls APIs"| node_web_host
node_web_host -.->|"routes requests"| node_web_current
node_web_host -.->|"supports legacy"| node_web_legacy
node_web_current -.->|"reads and writes"| node_database
node_web_current -->|"uses models"| node_models
node_web_current -.->|"manages sessions"| node_sessions
node_sessions -->|"persists sessions"| node_models
node_service -->|"starts host"| node_web_host
node_service -->|"creates manager"| node_sessions
node_service -->|"starts console"| node_console
node_service -->|"notifies events"| node_discord
node_service -->|"starts host"| node_file_server
node_service -.->|"starts service"| node_socket
node_realtime_host -.->|"hosts application"| node_comm_server
node_realtime_host -.->|"hosts application"| node_game_server
node_comm_server -.->|"manages lobby"| node_lobby
node_game_server -->|"creates peers"| node_game_peer
node_game_server -->|"creates manager"| node_room_manager
node_room_manager -->|"creates rooms"| node_game_room
node_game_peer -->|"handles operations"| node_game_room
node_game_room -.->|"calculates results"| node_statistics
node_game_peer -->|"requests player data"| node_realtime_services
node_photon_shim -.->|"dispatches requests"| node_game_peer
node_client_rpc -.->|"shares presence"| node_discord

click node_client_hooks "https://github.com/festivaldev/paradise/tree/dev/packages/client/current/Paradise.Client/Hooks"
click node_client_prefs "https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/ParadisePrefs.cs"
click node_client_maps "https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/Maps/ParadiseMapManager.cs"
click node_client_music "https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/ParadiseMainMenuMusicManager.cs"
click node_client_rpc "https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/RichPresence/RichPresenceClient.cs"
click node_web_host "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/web-services/WebServiceHost.ts"
click node_web_current "https://github.com/festivaldev/paradise/tree/dev/packages/ws/src/services/web-services/current"
click node_web_legacy "https://github.com/festivaldev/paradise/tree/dev/packages/ws/src/services/web-services/legacy"
click node_database "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/Database.ts"
click node_sessions "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/utils/GameSessionManager.ts"
click node_models "https://github.com/festivaldev/paradise/tree/dev/packages/paradise-models/src"
click node_service "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/ParadiseService.ts"
click node_console "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/console/CommandHandler.ts"
click node_discord "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/discord/DiscordClient.ts"
click node_file_server "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/file-server/FileServerHost.ts"
click node_socket "https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/socket/Host.ts"
click node_realtime_host "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime.Host/PhotonDomainManager.cs"
click node_comm_server "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Comm/CommServerApplication.cs"
click node_lobby "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Comm/Lobby/LobbyManager.cs"
click node_game_server "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/GameServerApplication.cs"
click node_game_peer "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/GamePeer.OperationHandler.cs"
click node_room_manager "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Managers/GameRoomManager.cs"
click node_game_room "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Rooms/BaseGameRoom.cs"
click node_statistics "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Managers/StatisticsManager.cs"
click node_realtime_services "https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/ServiceClients/UserWebServiceClient.cs"
click node_photon_shim "https://github.com/festivaldev/paradise/blob/dev/packages/shims/Photon.SocketServer/ClientPeer.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_client_hooks,node_client_prefs,node_client_maps,node_client_music,node_client_rpc toneBlue
class node_web_host,node_web_current,node_web_legacy,node_database,node_sessions toneAmber
class node_realtime_host,node_comm_server,node_lobby,node_game_server,node_game_peer,node_room_manager,node_game_room,node_statistics,node_realtime_services,node_photon_shim toneMint
class node_models,node_service,node_console,node_discord,node_file_server,node_socket toneRose
class node_player,node_game toneIndigo
```

## Components

### Game client

- [Client hooks](https://github.com/festivaldev/paradise/tree/dev/packages/client/current/Paradise.Client/Hooks): `packages/client/current/Paradise.Client/Hooks`
- [Client preferences](https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/ParadisePrefs.cs): `packages/client/current/Paradise.Client/ParadisePrefs.cs`
- [Custom maps](https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/Maps/ParadiseMapManager.cs): `packages/client/current/Paradise.Client/Plugins/Maps/ParadiseMapManager.cs`
- [Menu music](https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/ParadiseMainMenuMusicManager.cs): `packages/client/current/Paradise.Client/Plugins/ParadiseMainMenuMusicManager.cs`
- [Rich presence](https://github.com/festivaldev/paradise/blob/dev/packages/client/current/Paradise.Client/Plugins/RichPresence/RichPresenceClient.cs): `packages/client/current/Paradise.Client/Plugins/RichPresence/RichPresenceClient.cs`

### Web services

- [Web-service host](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/web-services/WebServiceHost.ts): `packages/ws/src/services/web-services/WebServiceHost.ts`
- [Current APIs](https://github.com/festivaldev/paradise/tree/dev/packages/ws/src/services/web-services/current): `packages/ws/src/services/web-services/current`
- [Legacy APIs](https://github.com/festivaldev/paradise/tree/dev/packages/ws/src/services/web-services/legacy): `packages/ws/src/services/web-services/legacy`
- [Persistent data](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/Database.ts): `packages/ws/src/Database.ts`
- [Game sessions](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/utils/GameSessionManager.ts): `packages/ws/src/utils/GameSessionManager.ts`

### Realtime servers

- [Realtime host](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime.Host/PhotonDomainManager.cs): `packages/realtime/Paradise.Realtime.Host/PhotonDomainManager.cs`
- [Comm server](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Comm/CommServerApplication.cs): `packages/realtime/Paradise.Realtime/Server/Comm/CommServerApplication.cs`
- [Lobby rooms](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Comm/Lobby/LobbyManager.cs): `packages/realtime/Paradise.Realtime/Server/Comm/Lobby/LobbyManager.cs`
- [Game server](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/GameServerApplication.cs): `packages/realtime/Paradise.Realtime/Server/Game/GameServerApplication.cs`
- [Game peer](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/GamePeer.OperationHandler.cs): `packages/realtime/Paradise.Realtime/Server/Game/GamePeer.OperationHandler.cs`
- [Room manager](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Managers/GameRoomManager.cs): `packages/realtime/Paradise.Realtime/Server/Game/Managers/GameRoomManager.cs`
- [Match rooms](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Rooms/BaseGameRoom.cs): `packages/realtime/Paradise.Realtime/Server/Game/Rooms/BaseGameRoom.cs`
- [Match statistics](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/Server/Game/Managers/StatisticsManager.cs): `packages/realtime/Paradise.Realtime/Server/Game/Managers/StatisticsManager.cs`
- [Web-service clients](https://github.com/festivaldev/paradise/blob/dev/packages/realtime/Paradise.Realtime/ServiceClients/UserWebServiceClient.cs): `packages/realtime/Paradise.Realtime/ServiceClients/UserWebServiceClient.cs`
- [Photon protocol shim](https://github.com/festivaldev/paradise/blob/dev/packages/shims/Photon.SocketServer/ClientPeer.cs): `packages/shims/Photon.SocketServer/ClientPeer.cs`

### Shared and operations

- [Domain models](https://github.com/festivaldev/paradise/tree/dev/packages/paradise-models/src): `packages/paradise-models/src`
- [Service orchestrator](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/ParadiseService.ts): `packages/ws/src/ParadiseService.ts`
- [Admin console](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/console/CommandHandler.ts): `packages/ws/src/console/CommandHandler.ts`
- [Discord integration](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/discord/DiscordClient.ts): `packages/ws/src/discord/DiscordClient.ts`
- [File server](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/file-server/FileServerHost.ts): `packages/ws/src/services/file-server/FileServerHost.ts`
- [Server socket](https://github.com/festivaldev/paradise/blob/dev/packages/ws/src/services/socket/Host.ts): `packages/ws/src/services/socket/Host.ts`

### Other components

- **Player**
- **UberStrike game**

## Connections

- Player → UberStrike game: plays (evidence: `README.md`)
- UberStrike game → Client hooks: patched by (evidence: `README.md`)
- Client hooks → Current APIs: authenticates via (evidence: `packages/client/current/Paradise.Client/Hooks/AuthenticationManagerHook.cs`)
- Client hooks → Custom maps: loads maps (evidence: `packages/client/current/Paradise.Client/Hooks/AuthenticationManagerHook.cs`)
- Client preferences → Menu music: configures (evidence: `packages/client/current/Paradise.Client/Plugins/ParadiseMainMenuMusicManager.cs`)
- Client hooks → Web-service host: calls APIs
- Web-service host → Current APIs: routes requests
- Web-service host → Legacy APIs: supports legacy
- Current APIs → Persistent data: reads and writes
- Current APIs → Domain models: uses models (evidence: `packages/ws/src/services/web-services/current/AuthenticationWebService.ts`)
- Current APIs → Game sessions: manages sessions
- Game sessions → Domain models: persists sessions (evidence: `packages/ws/src/utils/GameSessionManager.ts`)
- Service orchestrator → Web-service host: starts host (evidence: `packages/ws/src/ParadiseService.ts`)
- Service orchestrator → Game sessions: creates manager (evidence: `packages/ws/src/ParadiseService.ts`)
- Service orchestrator → Admin console: starts console (evidence: `packages/ws/src/ParadiseService.ts`)
- Service orchestrator → Discord integration: notifies events (evidence: `packages/ws/src/ParadiseService.ts`)
- Service orchestrator → File server: starts host (evidence: `packages/ws/src/ParadiseService.ts`)
- Service orchestrator → Server socket: starts service
- Realtime host → Comm server: hosts application
- Realtime host → Game server: hosts application
- Comm server → Lobby rooms: manages lobby
- Game server → Game peer: creates peers (evidence: `packages/realtime/Paradise.Realtime/Server/Game/GameServerApplication.cs`)
- Game server → Room manager: creates manager (evidence: `packages/realtime/Paradise.Realtime/Server/Game/GameServerApplication.cs`)
- Room manager → Match rooms: creates rooms (evidence: `packages/realtime/Paradise.Realtime/Server/Game/Managers/GameRoomManager.cs`)
- Game peer → Match rooms: handles operations (evidence: `packages/realtime/Paradise.Realtime/Server/Game/GamePeer.OperationHandler.cs`)
- Match rooms → Match statistics: calculates results (evidence: `packages/realtime/Paradise.Realtime/Server/Game/Rooms/BaseGameRoom.cs`)
- Game peer → Web-service clients: requests player data (evidence: `packages/realtime/Paradise.Realtime/Server/Game/GamePeer.OperationHandler.cs`)
- Photon protocol shim → Game peer: dispatches requests
- Rich presence → Discord integration: shares presence
