# karthi25hzm/gamecatalog architecture

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

- Interactive diagram: https://gitdiagram.com/karthi25hzm/gamecatalog
- Repository: https://github.com/karthi25hzm/gamecatalog

## Overview

Game Catalog is an ASP.NET Core backend for managing games, studios, users, reviews, and scheduled discounts. Clients call API controllers, which use repository contracts to query or update domain entities; EF Core repositories persist catalog data. A separate Worker Service runs discount workflows against price schedules and games. The README documents JWT authentication and discount processing; sampled controller and repository references support the main API-to-repository paths. Some controller, repository, and worker implementations were not excerpted, so their internal call details are not expanded.

Main entry points: [`GameCatalog/GameCatalog/Interfaces`](https://github.com/karthi25hzm/gamecatalog/tree/master/GameCatalog/GameCatalog/Interfaces) (Repository Contracts), [`GameCatalog/GameCatalog.Infrastructure/Persistence/GameCatalogDbContext.cs`](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Persistence/GameCatalogDbContext.cs) (Catalog Database), [`GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs`](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs) (Game Repository), [`GameCatalog/GameCatalog.Worker/Worker.cs`](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Worker/Worker.cs) (Discount Worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_games_api["Games API<br/>[GamesController.cs]"]
  node_studios_api["Studio API"]
  node_studio_games_api["Studio Games API"]
  node_users_api["User API<br/>[UserController.cs]"]
  node_auth_api["Auth API<br/>[AuthController .cs]"]
  node_reviews_api["Review API"]
  node_schedules_api["Price Schedule API"]
  node_token["JWT Token Service<br/>[TokenService .cs]"]
end

subgraph group_catalog["Catalog Domain"]
  node_game["Games<br/>[Game.cs]"]
  node_studio["Studios<br/>[Studio.cs]"]
  node_user["Users<br/>[User.cs]"]
  node_review["Reviews<br/>[GameReview.cs]"]
  node_repo_contracts["Repository Contracts"]
end

subgraph group_persistence["Data Access"]
  node_game_repo["Game Repository<br/>[GameRepository.cs]"]
  node_studio_repo["Studio Repository"]
  node_user_repo["User Repository<br/>[UserRepository.cs]"]
  node_review_repo["Review Repository"]
  node_schedule_repo["Schedule Repository"]
  node_db[("Catalog Database")]
end

subgraph group_discounts["Discount Processing"]
  node_schedule["Price Schedules"]
  node_worker["Discount Worker<br/>[Worker.cs]"]
end

node_client(("API Client"))

node_client -->|"requests catalog"| node_games_api
node_client -->|"manages studios"| node_studios_api
node_client -->|"manages users"| node_users_api
node_client -->|"manages reviews"| node_reviews_api
node_client -.->|"manages discounts"| node_schedules_api
node_games_api -->|"calls game contract"| node_repo_contracts
node_studios_api -->|"calls studio contract"| node_repo_contracts
node_studio_games_api -.->|"uses game contract"| node_repo_contracts
node_users_api -->|"calls user contract"| node_repo_contracts
node_reviews_api -->|"calls review contract"| node_repo_contracts
node_schedules_api -.->|"uses schedule contract"| node_repo_contracts
node_auth_api -.->|"issues JWT"| node_token
node_repo_contracts -->|"implemented by"| node_game_repo
node_game_repo -->|"reads and writes"| node_db
node_studio_repo -->|"accesses data"| node_db
node_user_repo -->|"accesses data"| node_db
node_review_repo -->|"accesses data"| node_db
node_schedule_repo -->|"accesses data"| node_db
node_worker -->|"processes schedules"| node_schedule_repo
node_worker -.->|"updates discounts"| node_game_repo
node_game_repo -->|"loads games"| node_game
node_review_repo -->|"loads reviews"| node_review
node_user_repo -->|"loads users"| node_user
node_schedule_repo -->|"loads schedules"| node_schedule
node_game -->|"references studio"| node_studio
node_worker -->|"applies price changes"| node_game

click node_games_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/GamesController.cs"
click node_studios_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/StudioController.cs"
click node_studio_games_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/StudioGamesController.cs"
click node_users_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/UserController.cs"
click node_auth_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/AuthController%20.cs"
click node_reviews_api "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/GameReviewController.cs"
click node_game "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/Game.cs"
click node_studio "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/Studio.cs"
click node_user "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/User.cs"
click node_review "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/GameReview.cs"
click node_schedule "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/GamePriceSchedule.cs"
click node_repo_contracts "https://github.com/karthi25hzm/gamecatalog/tree/master/GameCatalog/GameCatalog/Interfaces"
click node_game_repo "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs"
click node_studio_repo "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/StudioRepository.cs"
click node_user_repo "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/UserRepository.cs"
click node_review_repo "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GameReviewRepository%20.cs"
click node_schedule_repo "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GamePriceScheduleRepository%20.cs"
click node_db "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Persistence/GameCatalogDbContext.cs"
click node_worker "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Worker/Worker.cs"
click node_token "https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Helper/TokenService%20.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_games_api,node_studios_api,node_studio_games_api,node_users_api,node_auth_api,node_reviews_api,node_schedules_api,node_token,node_client toneBlue
class node_game,node_studio,node_user,node_review,node_repo_contracts toneAmber
class node_game_repo,node_studio_repo,node_user_repo,node_review_repo,node_schedule_repo,node_db toneMint
class node_schedule,node_worker toneRose
```

## Components

### HTTP API

- [Games API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/GamesController.cs): `GameCatalog/GameCatalog.Api/Controllers/GamesController.cs`
- [Studio API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/StudioController.cs): `GameCatalog/GameCatalog.Api/Controllers/StudioController.cs`
- [Studio Games API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/StudioGamesController.cs): `GameCatalog/GameCatalog.Api/Controllers/StudioGamesController.cs`
- [User API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/UserController.cs): `GameCatalog/GameCatalog.Api/Controllers/UserController.cs`
- [Auth API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/AuthController%20.cs): `GameCatalog/GameCatalog.Api/Controllers/AuthController .cs`
- [Review API](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Controllers/GameReviewController.cs): `GameCatalog/GameCatalog.Api/Controllers/GameReviewController.cs`
- **Price Schedule API**
- [JWT Token Service](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Api/Helper/TokenService%20.cs): `GameCatalog/GameCatalog.Api/Helper/TokenService .cs`

### Catalog Domain

- [Games](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/Game.cs): `GameCatalog/GameCatalog/Domain/Game.cs`
- [Studios](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/Studio.cs): `GameCatalog/GameCatalog/Domain/Studio.cs`
- [Users](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/User.cs): `GameCatalog/GameCatalog/Domain/User.cs`
- [Reviews](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/GameReview.cs): `GameCatalog/GameCatalog/Domain/GameReview.cs`
- [Repository Contracts](https://github.com/karthi25hzm/gamecatalog/tree/master/GameCatalog/GameCatalog/Interfaces): `GameCatalog/GameCatalog/Interfaces`

### Data Access

- [Game Repository](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs): `GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs`
- [Studio Repository](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/StudioRepository.cs): `GameCatalog/GameCatalog.Infrastructure/Repository/StudioRepository.cs`
- [User Repository](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/UserRepository.cs): `GameCatalog/GameCatalog.Infrastructure/Repository/UserRepository.cs`
- [Review Repository](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GameReviewRepository%20.cs): `GameCatalog/GameCatalog.Infrastructure/Repository/GameReviewRepository .cs`
- [Schedule Repository](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Repository/GamePriceScheduleRepository%20.cs): `GameCatalog/GameCatalog.Infrastructure/Repository/GamePriceScheduleRepository .cs`
- [Catalog Database](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Infrastructure/Persistence/GameCatalogDbContext.cs): `GameCatalog/GameCatalog.Infrastructure/Persistence/GameCatalogDbContext.cs`

### Discount Processing

- [Price Schedules](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog/Domain/GamePriceSchedule.cs): `GameCatalog/GameCatalog/Domain/GamePriceSchedule.cs`
- [Discount Worker](https://github.com/karthi25hzm/gamecatalog/blob/master/GameCatalog/GameCatalog.Worker/Worker.cs): `GameCatalog/GameCatalog.Worker/Worker.cs`

### Other components

- **API Client**

## Connections

- API Client → Games API: requests catalog (evidence: `README.md`)
- API Client → Studio API: manages studios (evidence: `README.md`)
- API Client → User API: manages users (evidence: `README.md`)
- API Client → Review API: manages reviews (evidence: `README.md`)
- API Client → Price Schedule API: manages discounts
- Games API → Repository Contracts: calls game contract (evidence: `GameCatalog/GameCatalog.Api/Controllers/GamesController.cs`)
- Studio API → Repository Contracts: calls studio contract (evidence: `GameCatalog/GameCatalog.Api/Controllers/StudioController.cs`)
- Studio Games API → Repository Contracts: uses game contract
- User API → Repository Contracts: calls user contract (evidence: `GameCatalog/GameCatalog.Api/Controllers/UserController.cs`)
- Review API → Repository Contracts: calls review contract (evidence: `GameCatalog/GameCatalog.Api/Controllers/GameReviewController.cs`)
- Price Schedule API → Repository Contracts: uses schedule contract
- Auth API → JWT Token Service: issues JWT
- Repository Contracts → Game Repository: implemented by (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs`)
- Game Repository → Catalog Database: reads and writes (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs`)
- Studio Repository → Catalog Database: accesses data (evidence: `GameCatalog/GameCatalog.Tests/GameCatalog/GameCatalogTests.cs`)
- User Repository → Catalog Database: accesses data (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/UserRepository.cs`)
- Review Repository → Catalog Database: accesses data (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GameReviewRepository .cs`)
- Schedule Repository → Catalog Database: accesses data (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GamePriceScheduleRepository .cs`)
- Discount Worker → Schedule Repository: processes schedules (evidence: `GameCatalog/GameCatalog.Worker/Worker.cs`)
- Discount Worker → Game Repository: updates discounts (evidence: `GameCatalog/GameCatalog.Worker/Program.cs`)
- Game Repository → Games: loads games (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GameRepository.cs`)
- Review Repository → Reviews: loads reviews (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GameReviewRepository .cs`)
- User Repository → Users: loads users (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/UserRepository.cs`)
- Schedule Repository → Price Schedules: loads schedules (evidence: `GameCatalog/GameCatalog.Infrastructure/Repository/GamePriceScheduleRepository .cs`)
- Games → Studios: references studio (evidence: `GameCatalog/GameCatalog/Domain/Game.cs`)
- Discount Worker → Games: applies price changes (evidence: `GameCatalog/GameCatalog.Worker/Worker.cs`)
