# emanuelmath/joygames architecture

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

- Interactive diagram: https://gitdiagram.com/emanuelmath/joygames
- Repository: https://github.com/emanuelmath/joygames

## Overview

JoyGames is an ASP.NET Core MVC game-catalog and management platform. The documented user journey is browsing and filtering games, viewing game details and media, and submitting contact or account requests; management, authentication, and notifications are supporting capabilities. The sampled code confirms domain validation, dependency registration, SMTP delivery, and only game add/update repository stubs. Several README features have no corresponding implementation in the supplied tree or excerpts, so those are shown as documented subsystems without invented call paths.

Main entry points: [`src/JoyGames.Infrastructure/DependencyInjection.cs`](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/DependencyInjection.cs) (Service registration), [`src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs`](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs) (Game repository), [`src/JoyGames.Infrastructure/Services/EmailService.cs`](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/EmailService.cs) (SMTP email service), [`src/JoyGames.Web`](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web) (MVC application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["MVC application<br/>[JoyGames.Web]"]
  node_home["Home controller<br/>[HomeController.cs]"]
  node_catalogviews["Catalog views<br/>[Views]"]
  node_webmodels["View models<br/>[ViewModels]"]
  node_frontend["Browser assets<br/>[wwwroot]"]
  node_di["Web startup<br/>[Program.cs]"]
end

subgraph group_domain["Catalog domain"]
  node_game["Game domain<br/>[Game.cs]"]
  node_domainmodels["Other domain models<br/>[Entities]"]
  node_contracts["Repository contracts<br/>[Repositories]"]
end

subgraph group_infra["Infrastructure"]
  node_gamerespository["Game repository<br/>[GameRepository.cs]"]
  node_sql[("SQL database")]
  node_dbfactory["Connection factory"]
  node_registration["Service registration"]
  node_storage["Image storage"]
  node_smtpoptions["SMTP settings<br/>[SmtpOptions.cs]"]
end

subgraph group_access["Requests and access"]
  node_accounts["Account security"]
  node_requests["Contact and account requests<br/>[Controllers]"]
  node_emailcontract["Email service contract<br/>[IEmailService.cs]"]
  node_email["SMTP email service<br/>[EmailService.cs]"]
end

node_visitor(("Visitor"))
node_cloudinary["Cloudinary"]
node_smtp["SMTP server"]

node_visitor -->|"browses"| node_webapp
node_webapp -.->|"routes requests"| node_home
node_home -.->|"renders"| node_catalogviews
node_catalogviews -.->|"uses models"| node_webmodels
node_visitor -.->|"submits requests"| node_requests
node_webapp -.->|"serves assets"| node_frontend
node_game -->|"represented by"| node_contracts
node_gamerespository -->|"implements"| node_contracts
node_gamerespository -->|"accepts game"| node_game
node_gamerespository -.->|"persists games"| node_sql
node_dbfactory -.->|"opens connections"| node_sql
node_registration -->|"registers"| node_gamerespository
node_registration -->|"registers"| node_dbfactory
node_di -.->|"configures services"| node_registration
node_storage -.->|"optional storage"| node_cloudinary
node_accounts -->|"registers hashing"| node_registration
node_requests -.->|"sends notifications"| node_emailcontract
node_email -->|"implements"| node_emailcontract
node_email -->|"reads settings"| node_smtpoptions
node_email -->|"sends mail"| node_smtp
node_registration -->|"registers"| node_email
node_registration -->|"binds settings"| node_smtpoptions

click node_webapp "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web"
click node_home "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Web/Controllers/HomeController.cs"
click node_catalogviews "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Views"
click node_webmodels "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Models/ViewModels"
click node_frontend "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/wwwroot"
click node_game "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Core/Entities/Game.cs"
click node_domainmodels "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Core/Entities"
click node_contracts "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Core/Interfaces/Repositories"
click node_gamerespository "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs"
click node_sql "https://github.com/emanuelmath/joygames/tree/main/database"
click node_dbfactory "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Data/DbConnectionFactory.cs"
click node_registration "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/DependencyInjection.cs"
click node_storage "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/LocalFileStorageService.cs"
click node_accounts "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/BcryptPasswordHasher.cs"
click node_requests "https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Controllers"
click node_emailcontract "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Core/Interfaces/Services/IEmailService.cs"
click node_email "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/EmailService.cs"
click node_smtpoptions "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Options/SmtpOptions.cs"
click node_di "https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Web/Program.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_webapp,node_home,node_catalogviews,node_webmodels,node_frontend,node_di toneBlue
class node_game,node_domainmodels,node_contracts toneAmber
class node_gamerespository,node_sql,node_dbfactory,node_registration,node_storage,node_smtpoptions,node_smtp toneMint
class node_accounts,node_requests,node_emailcontract,node_email toneRose
class node_visitor,node_cloudinary toneIndigo
```

## Components

### Web experience

- [MVC application](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web): `src/JoyGames.Web`
- [Home controller](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Web/Controllers/HomeController.cs): `src/JoyGames.Web/Controllers/HomeController.cs`
- [Catalog views](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Views): `src/JoyGames.Web/Views`
- [View models](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Models/ViewModels): `src/JoyGames.Web/Models/ViewModels`
- [Browser assets](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/wwwroot): `src/JoyGames.Web/wwwroot`
- [Web startup](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Web/Program.cs): `src/JoyGames.Web/Program.cs`

### Catalog domain

- [Game domain](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Core/Entities/Game.cs): `src/JoyGames.Core/Entities/Game.cs`
- [Other domain models](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Core/Entities): `src/JoyGames.Core/Entities`
- [Repository contracts](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Core/Interfaces/Repositories): `src/JoyGames.Core/Interfaces/Repositories`

### Infrastructure

- [Game repository](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs): `src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs`
- [SQL database](https://github.com/emanuelmath/joygames/tree/main/database): `database`
- [Connection factory](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Data/DbConnectionFactory.cs): `src/JoyGames.Infrastructure/Data/DbConnectionFactory.cs`
- [Service registration](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/DependencyInjection.cs): `src/JoyGames.Infrastructure/DependencyInjection.cs`
- [Image storage](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/LocalFileStorageService.cs): `src/JoyGames.Infrastructure/Services/LocalFileStorageService.cs`
- [SMTP settings](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Options/SmtpOptions.cs): `src/JoyGames.Infrastructure/Options/SmtpOptions.cs`

### Requests and access

- [Account security](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/BcryptPasswordHasher.cs): `src/JoyGames.Infrastructure/Services/BcryptPasswordHasher.cs`
- [Contact and account requests](https://github.com/emanuelmath/joygames/tree/main/src/JoyGames.Web/Controllers): `src/JoyGames.Web/Controllers`
- [Email service contract](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Core/Interfaces/Services/IEmailService.cs): `src/JoyGames.Core/Interfaces/Services/IEmailService.cs`
- [SMTP email service](https://github.com/emanuelmath/joygames/blob/main/src/JoyGames.Infrastructure/Services/EmailService.cs): `src/JoyGames.Infrastructure/Services/EmailService.cs`

### Other components

- **Visitor**
- **Cloudinary**
- **SMTP server**

## Connections

- Visitor → MVC application: browses (evidence: `README.md`)
- MVC application → Home controller: routes requests (evidence: `src/JoyGames.Web/Controllers/HomeController.cs`)
- Home controller → Catalog views: renders
- Catalog views → View models: uses models
- Visitor → Contact and account requests: submits requests (evidence: `README.md`)
- MVC application → Browser assets: serves assets (evidence: `README.md`)
- Game domain → Repository contracts: represented by (evidence: `src/JoyGames.Core/Interfaces/Repositories/IGameRepository.cs`)
- Game repository → Repository contracts: implements (evidence: `src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs`)
- Game repository → Game domain: accepts game (evidence: `src/JoyGames.Infrastructure/Data/Repositories/GameRepository.cs`)
- Game repository → SQL database: persists games
- Connection factory → SQL database: opens connections
- Service registration → Game repository: registers (evidence: `src/JoyGames.Infrastructure/DependencyInjection.cs`)
- Service registration → Connection factory: registers (evidence: `src/JoyGames.Infrastructure/DependencyInjection.cs`)
- Web startup → Service registration: configures services
- Image storage → Cloudinary: optional storage (evidence: `README.md`)
- Account security → Service registration: registers hashing (evidence: `src/JoyGames.Infrastructure/DependencyInjection.cs`)
- Contact and account requests → Email service contract: sends notifications (evidence: `README.md`)
- SMTP email service → Email service contract: implements (evidence: `src/JoyGames.Infrastructure/Services/EmailService.cs`)
- SMTP email service → SMTP settings: reads settings (evidence: `src/JoyGames.Infrastructure/Services/EmailService.cs`)
- SMTP email service → SMTP server: sends mail (evidence: `src/JoyGames.Infrastructure/Services/EmailService.cs`)
- Service registration → SMTP email service: registers (evidence: `src/JoyGames.Infrastructure/DependencyInjection.cs`)
- Service registration → SMTP settings: binds settings (evidence: `src/JoyGames.Infrastructure/DependencyInjection.cs`)
