# suhanarda/retrospective-game architecture

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

- Interactive diagram: https://gitdiagram.com/suhanarda/retrospective-game
- Repository: https://github.com/suhanarda/retrospective-game

## Overview

Retrospective Game Platform is a multiplayer party-game suite: players create or join rooms, enter a lobby, vote for a game, and launch it with room/player context. The web platform handles room and game selection; the ASP.NET server is authoritative for room and game-session state, while standalone game applications provide their own gameplay interfaces. Shared contracts and realtime clients connect the frontends. The README also identifies a demo AI question service and eight independently runnable games. Some subsystem links are documented rather than source-verified because their implementation files were not excerpted.

Main entry points: [`apps/retro-platform-web/src/games/GameLauncher.ts`](https://github.com/suhanarda/retrospective-game/blob/main/apps/retro-platform-web/src/games/GameLauncher.ts) (Game Launcher), [`packages/realtime-client/src/index.ts`](https://github.com/suhanarda/retrospective-game/blob/main/packages/realtime-client/src/index.ts) (Realtime Client), [`ai-bot/src/server.ts`](https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/server.ts) (AI Service), [`services/retrospective-server/Program.cs`](https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Program.cs) (Room Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Platform Web"]
  node_platform["Platform Flow<br/>[App.jsx]"]
  node_room_pages["Room Pages"]
  node_room_services["Room Services"]
  node_platform_launch["Game Launcher<br/>[GameLauncher.ts]"]
end

subgraph group_server["Room Authority"]
  node_room_server["Room Server<br/>[Program.cs]"]
  node_room_manager["Room Lifecycle<br/>[RoomManager.cs]"]
  node_hide_seek_authority["Hide-and-Seek Authority<br/>[HideSeekManager.cs]"]
  node_api_service["Platform API<br/>[Program.cs]"]
end

subgraph group_games["Game Applications"]
  node_draw_guess["Draw &amp; Guess<br/>[App.tsx]"]
  node_hide_seek["Hide and Seek<br/>[App.tsx]"]
  node_imposter["Imposter<br/>[App.tsx]"]
  node_retro_rush["Retro Rush<br/>[App.tsx]"]
  node_tank_battle["Tank Battle<br/>[App.tsx]"]
  node_rus_ruleti["Rus Ruleti<br/>[App.tsx]"]
  node_spin_bottle["Spin the Bottle<br/>[page.tsx]"]
  node_wheel_fortune["Wheel of Fortune<br/>[App.tsx]"]
end

subgraph group_shared["Shared Frontend"]
  node_contracts["Launch Contracts<br/>[index.ts]"]
  node_realtime["Realtime Client<br/>[index.ts]"]
end

subgraph group_questions["Question Service"]
  node_ai_http["AI Service<br/>[server.ts]"]
  node_question_generation["Question Generation"]
  node_question_bank[("Question Bank<br/>[questionBank.ts]")]
  node_question_store[("Room Question Store")]
end

node_player(("Players"))

node_player -->|"opens"| node_platform
node_platform -->|"routes to"| node_room_pages
node_room_pages -.->|"uses"| node_room_services
node_room_services -.->|"synchronizes rooms"| node_room_server
node_room_server -->|"registers"| node_room_manager
node_room_manager -->|"delegates lifecycle"| node_hide_seek_authority
node_room_pages -.->|"selects game"| node_platform_launch
node_platform_launch -.->|"passes launch context"| node_contracts
node_platform_launch -.->|"launches"| node_draw_guess
node_platform_launch -.->|"launches"| node_hide_seek
node_platform_launch -.->|"launches"| node_imposter
node_platform_launch -.->|"launches"| node_retro_rush
node_platform_launch -.->|"launches"| node_tank_battle
node_platform_launch -.->|"launches"| node_rus_ruleti
node_platform_launch -.->|"launches"| node_spin_bottle
node_platform_launch -.->|"launches"| node_wheel_fortune
node_draw_guess -->|"uses"| node_realtime
node_hide_seek -->|"uses"| node_realtime
node_imposter -->|"uses"| node_realtime
node_tank_battle -->|"uses"| node_realtime
node_rus_ruleti -->|"uses"| node_realtime
node_realtime -.->|"exchanges room events"| node_room_server
node_player -.->|"requests questions"| node_ai_http
node_ai_http -->|"generates"| node_question_generation
node_ai_http -->|"persists and falls back"| node_question_bank
node_ai_http -->|"prepares room questions"| node_question_store
node_room_server -.->|"configures question gateway"| node_ai_http

click node_platform "https://github.com/suhanarda/retrospective-game/blob/main/apps/retro-platform-web/src/App.jsx"
click node_room_pages "https://github.com/suhanarda/retrospective-game/tree/main/apps/retro-platform-web/src/pages"
click node_room_services "https://github.com/suhanarda/retrospective-game/tree/main/apps/retro-platform-web/src/services"
click node_platform_launch "https://github.com/suhanarda/retrospective-game/blob/main/apps/retro-platform-web/src/games/GameLauncher.ts"
click node_room_server "https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Program.cs"
click node_room_manager "https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Rooms/RoomManager.cs"
click node_hide_seek_authority "https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Rooms/HideSeek/HideSeekManager.cs"
click node_api_service "https://github.com/suhanarda/retrospective-game/blob/main/services/retro-platform-api/Program.cs"
click node_draw_guess "https://github.com/suhanarda/retrospective-game/blob/main/games/draw-and-guess/src/app/App.tsx"
click node_hide_seek "https://github.com/suhanarda/retrospective-game/blob/main/games/hide-and-seek/src/app/App.tsx"
click node_imposter "https://github.com/suhanarda/retrospective-game/blob/main/games/imposter/src/app/App.tsx"
click node_retro_rush "https://github.com/suhanarda/retrospective-game/blob/main/games/retro-rush/src/app/App.tsx"
click node_tank_battle "https://github.com/suhanarda/retrospective-game/blob/main/games/tank-battle/src/app/App.tsx"
click node_rus_ruleti "https://github.com/suhanarda/retrospective-game/blob/main/games/rus-ruleti/src/app/App.tsx"
click node_spin_bottle "https://github.com/suhanarda/retrospective-game/blob/main/games/spin-the-bottle/app/page.tsx"
click node_wheel_fortune "https://github.com/suhanarda/retrospective-game/blob/main/games/wheel-of-fortune/src/App.tsx"
click node_contracts "https://github.com/suhanarda/retrospective-game/blob/main/packages/platform-contracts/src/index.ts"
click node_realtime "https://github.com/suhanarda/retrospective-game/blob/main/packages/realtime-client/src/index.ts"
click node_ai_http "https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/server.ts"
click node_question_generation "https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/questionGenerator.ts"
click node_question_bank "https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/questionBank.ts"
click node_question_store "https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/roomQuestionStore.ts"

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_platform,node_room_pages,node_room_services,node_platform_launch toneBlue
class node_room_server,node_room_manager,node_hide_seek_authority,node_api_service toneAmber
class node_draw_guess,node_hide_seek,node_imposter,node_retro_rush,node_tank_battle,node_rus_ruleti,node_spin_bottle,node_wheel_fortune toneMint
class node_contracts,node_realtime toneRose
class node_ai_http,node_question_generation,node_question_bank,node_question_store,node_player toneIndigo
```

## Components

### Platform Web

- [Platform Flow](https://github.com/suhanarda/retrospective-game/blob/main/apps/retro-platform-web/src/App.jsx): `apps/retro-platform-web/src/App.jsx`
- [Room Pages](https://github.com/suhanarda/retrospective-game/tree/main/apps/retro-platform-web/src/pages): `apps/retro-platform-web/src/pages`
- [Room Services](https://github.com/suhanarda/retrospective-game/tree/main/apps/retro-platform-web/src/services): `apps/retro-platform-web/src/services`
- [Game Launcher](https://github.com/suhanarda/retrospective-game/blob/main/apps/retro-platform-web/src/games/GameLauncher.ts): `apps/retro-platform-web/src/games/GameLauncher.ts`

### Room Authority

- [Room Server](https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Program.cs): `services/retrospective-server/Program.cs`
- [Room Lifecycle](https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Rooms/RoomManager.cs): `services/retrospective-server/Rooms/RoomManager.cs`
- [Hide-and-Seek Authority](https://github.com/suhanarda/retrospective-game/blob/main/services/retrospective-server/Rooms/HideSeek/HideSeekManager.cs): `services/retrospective-server/Rooms/HideSeek/HideSeekManager.cs`
- [Platform API](https://github.com/suhanarda/retrospective-game/blob/main/services/retro-platform-api/Program.cs): `services/retro-platform-api/Program.cs`

### Game Applications

- [Draw & Guess](https://github.com/suhanarda/retrospective-game/blob/main/games/draw-and-guess/src/app/App.tsx): `games/draw-and-guess/src/app/App.tsx`
- [Hide and Seek](https://github.com/suhanarda/retrospective-game/blob/main/games/hide-and-seek/src/app/App.tsx): `games/hide-and-seek/src/app/App.tsx`
- [Imposter](https://github.com/suhanarda/retrospective-game/blob/main/games/imposter/src/app/App.tsx): `games/imposter/src/app/App.tsx`
- [Retro Rush](https://github.com/suhanarda/retrospective-game/blob/main/games/retro-rush/src/app/App.tsx): `games/retro-rush/src/app/App.tsx`
- [Tank Battle](https://github.com/suhanarda/retrospective-game/blob/main/games/tank-battle/src/app/App.tsx): `games/tank-battle/src/app/App.tsx`
- [Rus Ruleti](https://github.com/suhanarda/retrospective-game/blob/main/games/rus-ruleti/src/app/App.tsx): `games/rus-ruleti/src/app/App.tsx`
- [Spin the Bottle](https://github.com/suhanarda/retrospective-game/blob/main/games/spin-the-bottle/app/page.tsx): `games/spin-the-bottle/app/page.tsx`
- [Wheel of Fortune](https://github.com/suhanarda/retrospective-game/blob/main/games/wheel-of-fortune/src/App.tsx): `games/wheel-of-fortune/src/App.tsx`

### Shared Frontend

- [Launch Contracts](https://github.com/suhanarda/retrospective-game/blob/main/packages/platform-contracts/src/index.ts): `packages/platform-contracts/src/index.ts`
- [Realtime Client](https://github.com/suhanarda/retrospective-game/blob/main/packages/realtime-client/src/index.ts): `packages/realtime-client/src/index.ts`

### Question Service

- [AI Service](https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/server.ts): `ai-bot/src/server.ts`
- [Question Generation](https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/questionGenerator.ts): `ai-bot/src/services/questionGenerator.ts`
- [Question Bank](https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/questionBank.ts): `ai-bot/src/services/questionBank.ts`
- [Room Question Store](https://github.com/suhanarda/retrospective-game/blob/main/ai-bot/src/services/roomQuestionStore.ts): `ai-bot/src/services/roomQuestionStore.ts`

### Other components

- **Players**

## Connections

- Players → Platform Flow: opens
- Platform Flow → Room Pages: routes to (evidence: `apps/retro-platform-web/src/App.jsx`)
- Room Pages → Room Services: uses
- Room Services → Room Server: synchronizes rooms
- Room Server → Room Lifecycle: registers (evidence: `services/retrospective-server/Program.cs`)
- Room Lifecycle → Hide-and-Seek Authority: delegates lifecycle (evidence: `services/retrospective-server/Rooms/HideSeek/HideSeekManager.cs`)
- Room Pages → Game Launcher: selects game
- Game Launcher → Launch Contracts: passes launch context
- Game Launcher → Draw & Guess: launches
- Game Launcher → Hide and Seek: launches
- Game Launcher → Imposter: launches
- Game Launcher → Retro Rush: launches
- Game Launcher → Tank Battle: launches
- Game Launcher → Rus Ruleti: launches
- Game Launcher → Spin the Bottle: launches
- Game Launcher → Wheel of Fortune: launches
- Draw & Guess → Realtime Client: uses (evidence: `games/draw-and-guess/src/app/App.tsx`)
- Hide and Seek → Realtime Client: uses (evidence: `games/hide-and-seek/src/app/App.tsx`)
- Imposter → Realtime Client: uses (evidence: `games/imposter/src/app/App.tsx`)
- Tank Battle → Realtime Client: uses (evidence: `games/tank-battle/src/app/App.tsx`)
- Rus Ruleti → Realtime Client: uses (evidence: `games/rus-ruleti/src/app/App.tsx`)
- Realtime Client → Room Server: exchanges room events
- Players → AI Service: requests questions
- AI Service → Question Generation: generates (evidence: `ai-bot/src/server.ts`)
- AI Service → Question Bank: persists and falls back (evidence: `ai-bot/src/server.ts`)
- AI Service → Room Question Store: prepares room questions (evidence: `ai-bot/src/server.ts`)
- Room Server → AI Service: configures question gateway (evidence: `services/retrospective-server/Program.cs`)
