# simon0824/gamereserve architecture

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

- Interactive diagram: https://gitdiagram.com/simon0824/gamereserve
- Repository: https://github.com/simon0824/gamereserve

## Overview

GameReserve is an early-stage modular-monolith backend for game catalogs, user identity, reservations, and payments. Clients reach the product through Web API controllers, which dispatch application requests; the sampled catalog and reservation queries show application handlers reading through domain repository interfaces. Identity also supports registration, login, refresh, logout, banning, and user administration. Program configures Redis, RabbitMQ consumers, and inbox/outbox services, but the excerpts do not establish all persistence or event-publication paths. Dashed links mark documented infrastructure capabilities whose runtime callers were not shown.

Main entry points: [`src/GameReserve.WebApi/Program.cs`](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Program.cs) (Host configuration), [`src/GameReserve.WebApi/Controllers/IdentityController.cs`](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/IdentityController.cs) (Identity endpoints), [`src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs`](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs) (Reservation queries), [`src/Modules/Payments/Payments.Application`](https://github.com/simon0824/gamereserve/tree/main/src/Modules/Payments/Payments.Application) (Payment operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web API"]
  node_identity_api["Identity endpoints"]
  node_games_api["Games endpoints<br/>[GamesController.cs]"]
  node_reservations_api["Reservation endpoints"]
  node_runtime["Host configuration<br/>[Program.cs]"]
end

subgraph group_identity["Identity"]
  node_identity_app["Identity operations<br/>[Commands]"]
  node_identity_query["User queries<br/>[GetUsersQuery.cs]"]
  node_identity_domain["User aggregate<br/>[User.cs]"]
  node_identity_store[("Identity persistence<br/>[IdentityContext.cs]")]
end

subgraph group_games["Games"]
  node_games_app["Catalog query"]
  node_games_domain["Game repository contract<br/>[IGameRepository.cs]"]
  node_games_store[("Game persistence<br/>[GamesContext.cs]")]
end

subgraph group_reservations["Reservations"]
  node_reservations_app["Reservation queries"]
  node_reservations_domain["Reservation model<br/>[Reservation.cs]"]
  node_reservations_store[("Reservation persistence")]
end

subgraph group_payments["Payments and messaging"]
  node_payments_app["Payment operations"]
  node_payment_gateway["Payment gateway<br/>[PaymentGateway.cs]"]
  node_outbox["Outbox processor<br/>[OutboxProcessor.cs]"]
  node_inbox["Inbox processor<br/>[InboxProcessor.cs]"]
end

node_client(("API client"))
node_rabbitmq["RabbitMQ"]
node_redis[("Redis cache")]

node_client -->|"sends requests"| node_identity_api
node_client -->|"sends requests"| node_games_api
node_client -->|"sends requests"| node_reservations_api
node_identity_api -->|"dispatches commands"| node_identity_app
node_identity_api -->|"dispatches query"| node_identity_query
node_identity_query -->|"reads users"| node_identity_store
node_identity_app -.->|"uses aggregate"| node_identity_domain
node_games_api -->|"dispatches query"| node_games_app
node_games_app -->|"reads via"| node_games_domain
node_games_domain -.->|"implemented by"| node_games_store
node_games_store -.->|"uses cache"| node_redis
node_reservations_api -->|"dispatches queries"| node_reservations_app
node_reservations_app -->|"reads profiles"| node_reservations_store
node_reservations_app -->|"maps reservations"| node_reservations_domain
node_reservations_store -.->|"uses cache"| node_redis
node_runtime -->|"configures transport"| node_rabbitmq
node_runtime -->|"registers consumer"| node_payments_app
node_runtime -->|"registers processor"| node_inbox
node_runtime -->|"registers processor"| node_outbox
node_payments_app -.->|"uses gateway"| node_payment_gateway
node_payments_app -.->|"consumes events"| node_rabbitmq
node_identity_store -.->|"uses cache"| node_redis

click node_identity_api "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/IdentityController.cs"
click node_games_api "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/GamesController.cs"
click node_reservations_api "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/ReservationsController.cs"
click node_runtime "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Program.cs"
click node_identity_app "https://github.com/simon0824/gamereserve/tree/main/src/Modules/Identity/Identity.Application/Commands"
click node_identity_query "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Application/Queries/GetUsersQuery.cs"
click node_identity_domain "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Domain/UserAggregate/User.cs"
click node_identity_store "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Infrastructure/Data/IdentityContext.cs"
click node_games_app "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Application/Queries/GetGamesCatalogQuery.cs"
click node_games_domain "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Domain/Interfaces/IGameRepository.cs"
click node_games_store "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Infrastructure/Data/GamesContext.cs"
click node_reservations_app "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs"
click node_reservations_domain "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Domain/Aggregates/Reservation.cs"
click node_reservations_store "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Infrastructure/Data/ReservationsContext.cs"
click node_payments_app "https://github.com/simon0824/gamereserve/tree/main/src/Modules/Payments/Payments.Application"
click node_payment_gateway "https://github.com/simon0824/gamereserve/blob/main/src/Modules/Payments/Payments.Infrastructure/Gateways/PaymentGateway.cs"
click node_outbox "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Outbox/OutboxProcessor.cs"
click node_inbox "https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Inbox/InboxProcessor.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_identity_api,node_games_api,node_reservations_api,node_runtime,node_client toneBlue
class node_identity_app,node_identity_query,node_identity_domain,node_identity_store,node_redis toneAmber
class node_games_app,node_games_domain,node_games_store toneMint
class node_reservations_app,node_reservations_domain,node_reservations_store toneRose
class node_payments_app,node_payment_gateway,node_outbox,node_inbox,node_rabbitmq toneIndigo
```

## Components

### Web API

- [Identity endpoints](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/IdentityController.cs): `src/GameReserve.WebApi/Controllers/IdentityController.cs`
- [Games endpoints](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/GamesController.cs): `src/GameReserve.WebApi/Controllers/GamesController.cs`
- [Reservation endpoints](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Controllers/ReservationsController.cs): `src/GameReserve.WebApi/Controllers/ReservationsController.cs`
- [Host configuration](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Program.cs): `src/GameReserve.WebApi/Program.cs`

### Identity

- [Identity operations](https://github.com/simon0824/gamereserve/tree/main/src/Modules/Identity/Identity.Application/Commands): `src/Modules/Identity/Identity.Application/Commands`
- [User queries](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Application/Queries/GetUsersQuery.cs): `src/Modules/Identity/Identity.Application/Queries/GetUsersQuery.cs`
- [User aggregate](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Domain/UserAggregate/User.cs): `src/Modules/Identity/Identity.Domain/UserAggregate/User.cs`
- [Identity persistence](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Identity/Identity.Infrastructure/Data/IdentityContext.cs): `src/Modules/Identity/Identity.Infrastructure/Data/IdentityContext.cs`

### Games

- [Catalog query](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Application/Queries/GetGamesCatalogQuery.cs): `src/Modules/Games/Games.Application/Queries/GetGamesCatalogQuery.cs`
- [Game repository contract](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Domain/Interfaces/IGameRepository.cs): `src/Modules/Games/Games.Domain/Interfaces/IGameRepository.cs`
- [Game persistence](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Games/Games.Infrastructure/Data/GamesContext.cs): `src/Modules/Games/Games.Infrastructure/Data/GamesContext.cs`

### Reservations

- [Reservation queries](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs): `src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs`
- [Reservation model](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Domain/Aggregates/Reservation.cs): `src/Modules/Reservations/Reservations.Domain/Aggregates/Reservation.cs`
- [Reservation persistence](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Reservations/Reservations.Infrastructure/Data/ReservationsContext.cs): `src/Modules/Reservations/Reservations.Infrastructure/Data/ReservationsContext.cs`

### Payments and messaging

- [Payment operations](https://github.com/simon0824/gamereserve/tree/main/src/Modules/Payments/Payments.Application): `src/Modules/Payments/Payments.Application`
- [Payment gateway](https://github.com/simon0824/gamereserve/blob/main/src/Modules/Payments/Payments.Infrastructure/Gateways/PaymentGateway.cs): `src/Modules/Payments/Payments.Infrastructure/Gateways/PaymentGateway.cs`
- [Outbox processor](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Outbox/OutboxProcessor.cs): `src/GameReserve.WebApi/Outbox/OutboxProcessor.cs`
- [Inbox processor](https://github.com/simon0824/gamereserve/blob/main/src/GameReserve.WebApi/Inbox/InboxProcessor.cs): `src/GameReserve.WebApi/Inbox/InboxProcessor.cs`

### Other components

- **API client**
- **RabbitMQ**
- **Redis cache**

## Connections

- API client → Identity endpoints: sends requests
- API client → Games endpoints: sends requests
- API client → Reservation endpoints: sends requests
- Identity endpoints → Identity operations: dispatches commands (evidence: `src/GameReserve.WebApi/Controllers/IdentityController.cs`)
- Identity endpoints → User queries: dispatches query (evidence: `src/GameReserve.WebApi/Controllers/IdentityController.cs`)
- User queries → Identity persistence: reads users (evidence: `src/Modules/Identity/Identity.Application/Queries/GetUsersQuery.cs`)
- Identity operations → User aggregate: uses aggregate
- Games endpoints → Catalog query: dispatches query (evidence: `src/GameReserve.WebApi/Controllers/GamesController.cs`)
- Catalog query → Game repository contract: reads via (evidence: `src/Modules/Games/Games.Application/Queries/GetGamesCatalogQuery.cs`)
- Game repository contract → Game persistence: implemented by
- Game persistence → Redis cache: uses cache
- Reservation endpoints → Reservation queries: dispatches queries (evidence: `src/GameReserve.WebApi/Controllers/ReservationsController.cs`)
- Reservation queries → Reservation persistence: reads profiles (evidence: `src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs`)
- Reservation queries → Reservation model: maps reservations (evidence: `src/Modules/Reservations/Reservations.Application/Queries/GetReservationProfilesQuery.cs`)
- Reservation persistence → Redis cache: uses cache
- Host configuration → RabbitMQ: configures transport (evidence: `src/GameReserve.WebApi/Program.cs`)
- Host configuration → Payment operations: registers consumer (evidence: `src/GameReserve.WebApi/Program.cs`)
- Host configuration → Inbox processor: registers processor (evidence: `src/GameReserve.WebApi/Program.cs`)
- Host configuration → Outbox processor: registers processor (evidence: `src/GameReserve.WebApi/Program.cs`)
- Payment operations → Payment gateway: uses gateway
- Payment operations → RabbitMQ: consumes events
- Identity persistence → Redis cache: uses cache
