# zounkla/agora architecture

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

- Interactive diagram: https://gitdiagram.com/zounkla/agora
- Repository: https://github.com/zounkla/agora

## Overview

Agora is a Symfony web application for creating lobbies and playing 6 qui prend, Splendor, Glenmore, and Myrmes online. The documented workflow is players creating or joining a game, launching it, and taking game-specific actions; sampled managers show game setup and initialization, while game controllers handle play requests. The source index supports the shared game dispatcher and several manager dependencies. Other platform routes and persistence wiring are represented cautiously because their implementations were not sampled.

Main entry points: [`app/src/Service/Game/GameManagerService.php`](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/GameManagerService.php) (Game dispatcher), [`app/src/Service/Game/Glenmore/GLMGameManagerService.php`](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Glenmore/GLMGameManagerService.php) (Glenmore lifecycle), [`app/src/Service/Game/Myrmes/MYRGameManagerService.php`](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Myrmes/MYRGameManagerService.php) (Myrmes lifecycle), [`app/src/Service/Platform/BoardManagerService.php`](https://github.com/zounkla/agora/blob/main/app/src/Service/Platform/BoardManagerService.php) (Lobby management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Platform and lobbies"]
  node_platform_lobbies["Lobby management"]
  node_platform_models[("Platform records<br/>[Board.php]")]
end

subgraph group_shared["Shared game runtime"]
  node_game_dispatch["Game dispatcher"]
  node_game_base["Game manager contract"]
  node_game_records[("Game and player state<br/>[Game.php]")]
  node_game_logs["Action logs<br/>[LogService.php]"]
end

subgraph group_glenmore["Glenmore"]
  node_glm_controller["Glenmore actions"]
  node_glm_manager["Glenmore lifecycle"]
  node_glm_rules["Glenmore rules<br/>[GLMService.php]"]
  node_glm_state[("Glenmore state<br/>[GameGLM.php]")]
end

subgraph group_myrmes["Myrmes"]
  node_myr_controller["Myrmes actions"]
  node_myr_manager["Myrmes lifecycle"]
  node_myr_rules["Myrmes rules<br/>[MYRService.php]"]
  node_myr_state[("Myrmes state<br/>[GameMYR.php]")]
end

subgraph group_othergames["Other games"]
  node_sixqp_manager["6 qui prend"]
  node_spl_manager["Splendor"]
end

node_player(("Players"))

node_player -->|"creates lobby"| node_platform_lobbies
node_platform_lobbies -->|"requests game"| node_game_dispatch
node_player -->|"plays"| node_glm_controller
node_player -->|"plays"| node_myr_controller
node_game_dispatch -->|"dispatches"| node_glm_manager
node_game_dispatch -->|"dispatches"| node_myr_manager
node_game_dispatch -->|"dispatches"| node_sixqp_manager
node_game_dispatch -->|"dispatches"| node_spl_manager
node_glm_manager -->|"initializes"| node_glm_rules
node_myr_manager -->|"initializes"| node_myr_rules
node_glm_manager -->|"records events"| node_game_logs
node_myr_manager -->|"records events"| node_game_logs
node_glm_manager -->|"creates state"| node_glm_state
node_myr_manager -->|"creates state"| node_myr_state
node_platform_lobbies -->|"manages records"| node_platform_models
node_game_dispatch -->|"uses contract"| node_game_base
node_glm_controller -->|"queries rules"| node_glm_rules
node_myr_controller -->|"uses rules"| node_myr_rules

click node_platform_lobbies "https://github.com/zounkla/agora/blob/main/app/src/Service/Platform/BoardManagerService.php"
click node_platform_models "https://github.com/zounkla/agora/blob/main/app/src/Entity/Platform/Board.php"
click node_game_dispatch "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/GameManagerService.php"
click node_game_base "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/AbstractGameManagerService.php"
click node_game_records "https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/DTO/Game.php"
click node_game_logs "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/LogService.php"
click node_glm_controller "https://github.com/zounkla/agora/blob/main/app/src/Controller/Game/GlenmoreController.php"
click node_glm_manager "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Glenmore/GLMGameManagerService.php"
click node_glm_rules "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Glenmore/GLMService.php"
click node_glm_state "https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/Glenmore/GameGLM.php"
click node_myr_controller "https://github.com/zounkla/agora/blob/main/app/src/Controller/Game/MyrmesController.php"
click node_myr_manager "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Myrmes/MYRGameManagerService.php"
click node_myr_rules "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Myrmes/MYRService.php"
click node_myr_state "https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/Myrmes/GameMYR.php"
click node_sixqp_manager "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/SixQP/SixQPGameManagerService.php"
click node_spl_manager "https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Splendor/SPLGameManagerService.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_platform_lobbies,node_platform_models toneBlue
class node_game_dispatch,node_game_base,node_game_records,node_game_logs toneAmber
class node_glm_controller,node_glm_manager,node_glm_rules,node_glm_state toneMint
class node_myr_controller,node_myr_manager,node_myr_rules,node_myr_state toneRose
class node_sixqp_manager,node_spl_manager,node_player toneIndigo
```

## Components

### Platform and lobbies

- [Lobby management](https://github.com/zounkla/agora/blob/main/app/src/Service/Platform/BoardManagerService.php): `app/src/Service/Platform/BoardManagerService.php`
- [Platform records](https://github.com/zounkla/agora/blob/main/app/src/Entity/Platform/Board.php): `app/src/Entity/Platform/Board.php`

### Shared game runtime

- [Game dispatcher](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/GameManagerService.php): `app/src/Service/Game/GameManagerService.php`
- [Game manager contract](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/AbstractGameManagerService.php): `app/src/Service/Game/AbstractGameManagerService.php`
- [Game and player state](https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/DTO/Game.php): `app/src/Entity/Game/DTO/Game.php`
- [Action logs](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/LogService.php): `app/src/Service/Game/LogService.php`

### Glenmore

- [Glenmore actions](https://github.com/zounkla/agora/blob/main/app/src/Controller/Game/GlenmoreController.php): `app/src/Controller/Game/GlenmoreController.php`
- [Glenmore lifecycle](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Glenmore/GLMGameManagerService.php): `app/src/Service/Game/Glenmore/GLMGameManagerService.php`
- [Glenmore rules](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Glenmore/GLMService.php): `app/src/Service/Game/Glenmore/GLMService.php`
- [Glenmore state](https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/Glenmore/GameGLM.php): `app/src/Entity/Game/Glenmore/GameGLM.php`

### Myrmes

- [Myrmes actions](https://github.com/zounkla/agora/blob/main/app/src/Controller/Game/MyrmesController.php): `app/src/Controller/Game/MyrmesController.php`
- [Myrmes lifecycle](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Myrmes/MYRGameManagerService.php): `app/src/Service/Game/Myrmes/MYRGameManagerService.php`
- [Myrmes rules](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Myrmes/MYRService.php): `app/src/Service/Game/Myrmes/MYRService.php`
- [Myrmes state](https://github.com/zounkla/agora/blob/main/app/src/Entity/Game/Myrmes/GameMYR.php): `app/src/Entity/Game/Myrmes/GameMYR.php`

### Other games

- [6 qui prend](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/SixQP/SixQPGameManagerService.php): `app/src/Service/Game/SixQP/SixQPGameManagerService.php`
- [Splendor](https://github.com/zounkla/agora/blob/main/app/src/Service/Game/Splendor/SPLGameManagerService.php): `app/src/Service/Game/Splendor/SPLGameManagerService.php`

### Other components

- **Players**

## Connections

- Players → Lobby management: creates lobby
- Lobby management → Game dispatcher: requests game (evidence: `app/src/Service/Platform/BoardManagerService.php`)
- Players → Glenmore actions: plays (evidence: `app/src/Controller/Game/GlenmoreController.php`)
- Players → Myrmes actions: plays (evidence: `app/src/Controller/Game/MyrmesController.php`)
- Game dispatcher → Glenmore lifecycle: dispatches (evidence: `app/src/Service/Game/GameManagerService.php`)
- Game dispatcher → Myrmes lifecycle: dispatches (evidence: `app/src/Service/Game/GameManagerService.php`)
- Game dispatcher → 6 qui prend: dispatches (evidence: `app/src/Service/Game/GameManagerService.php`)
- Game dispatcher → Splendor: dispatches (evidence: `app/src/Service/Game/GameManagerService.php`)
- Glenmore lifecycle → Glenmore rules: initializes (evidence: `app/src/Service/Game/Glenmore/GLMGameManagerService.php`)
- Myrmes lifecycle → Myrmes rules: initializes (evidence: `app/src/Service/Game/Myrmes/MYRGameManagerService.php`)
- Glenmore lifecycle → Action logs: records events (evidence: `app/src/Service/Game/Glenmore/GLMGameManagerService.php`)
- Myrmes lifecycle → Action logs: records events (evidence: `app/src/Service/Game/Myrmes/MYRGameManagerService.php`)
- Glenmore lifecycle → Glenmore state: creates state (evidence: `app/src/Service/Game/Glenmore/GLMGameManagerService.php`)
- Myrmes lifecycle → Myrmes state: creates state (evidence: `app/src/Service/Game/Myrmes/MYRGameManagerService.php`)
- Lobby management → Platform records: manages records (evidence: `app/src/Service/Platform/BoardManagerService.php`)
- Game dispatcher → Game manager contract: uses contract (evidence: `app/src/Service/Game/GameManagerService.php`)
- Glenmore actions → Glenmore rules: queries rules (evidence: `app/src/Controller/Game/GlenmoreController.php`)
- Myrmes actions → Myrmes rules: uses rules (evidence: `app/src/Controller/Game/MyrmesController.php`)
