# sullaspqr/halak architecture

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

- Interactive diagram: https://gitdiagram.com/sullaspqr/halak
- Repository: https://github.com/sullaspqr/halak

## Overview

This is an ASP.NET Web API for managing fish, fishing lakes, anglers, catches, and login records, backed by a deployed MySQL database. The principal workflow is a client making HTTP requests to API controllers, which query or update the EF Core context and return entities or DTO-shaped results. The graph preserves the documented domain areas and the sampled DTO-based fish and angler flows. Some controllers are indexed but not excerpted, so their internal behavior is not expanded beyond indexed references.

Main entry points: [`Models/HalakDbContext.cs`](https://github.com/sullaspqr/halak/blob/main/Models/HalakDbContext.cs) (EF Core Context), [`Controllers/HorgaszDTOesController.cs`](https://github.com/sullaspqr/halak/blob/main/Controllers/HorgaszDTOesController.cs) (Angler DTO API), [`Controllers/HalakDTOesController.cs`](https://github.com/sullaspqr/halak/blob/main/Controllers/HalakDTOesController.cs) (Fish DTO API), [`Controllers/HalakController.cs`](https://github.com/sullaspqr/halak/blob/main/Controllers/HalakController.cs) (Fish API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_fish_api["Fish API<br/>[HalakController.cs]"]
  node_fish_dto_api["Fish DTO API"]
  node_angler_api["Angler API"]
  node_angler_dto_api["Angler DTO API"]
  node_lake_api["Lake API<br/>[TavakController.cs]"]
  node_login_api["Login API<br/>[LoginController.cs]"]
end

subgraph group_contracts["API Contracts"]
  node_fish_dto["Fish DTO<br/>[HalakDTO.cs]"]
  node_angler_dto["Angler DTO<br/>[HorgaszDTO.cs]"]
  node_catch_dto["Catch DTO<br/>[FogasDTO.cs]"]
  node_angler_create_dto["Angler Input DTO"]
end

subgraph group_domain["Fishing Domain"]
  node_fish["Fish Records<br/>[Halak.cs]"]
  node_angler["Angler Records<br/>[Horgaszok.cs]"]
  node_catch["Catch Records<br/>[Fogasok.cs]"]
  node_lake["Lake Records<br/>[Tavak.cs]"]
  node_login["Login Records<br/>[Login.cs]"]
end

subgraph group_persistence["Persistence"]
  node_startup["Application Startup<br/>[Program.cs]"]
  node_db_context["EF Core Context<br/>[HalakDbContext.cs]"]
  node_mysql[("MySQL Database")]
end

node_client(("API Client"))

node_client -->|"sends HTTP requests"| node_fish_api
node_client -->|"sends HTTP requests"| node_fish_dto_api
node_client -->|"sends HTTP requests"| node_angler_api
node_client -->|"sends HTTP requests"| node_angler_dto_api
node_client -->|"sends HTTP requests"| node_lake_api
node_client -->|"sends HTTP requests"| node_login_api
node_fish_dto_api -->|"maps responses"| node_fish_dto
node_angler_dto_api -->|"maps responses"| node_angler_dto
node_angler_dto_api -->|"maps catches"| node_catch_dto
node_angler_dto_api -->|"accepts input"| node_angler_create_dto
node_startup -->|"configures context"| node_db_context
node_fish_api -->|"queries and updates"| node_db_context
node_fish_dto_api -->|"queries and updates"| node_db_context
node_angler_api -->|"queries and updates"| node_db_context
node_angler_dto_api -->|"queries and updates"| node_db_context
node_lake_api -->|"uses context"| node_db_context
node_login_api -->|"uses context"| node_db_context
node_db_context -->|"maps database tables"| node_mysql
node_mysql -.->|"deployed backend"| node_db_context

click node_fish_api "https://github.com/sullaspqr/halak/blob/main/Controllers/HalakController.cs"
click node_fish_dto_api "https://github.com/sullaspqr/halak/blob/main/Controllers/HalakDTOesController.cs"
click node_angler_api "https://github.com/sullaspqr/halak/blob/main/Controllers/HorgaszokController.cs"
click node_angler_dto_api "https://github.com/sullaspqr/halak/blob/main/Controllers/HorgaszDTOesController.cs"
click node_lake_api "https://github.com/sullaspqr/halak/blob/main/Controllers/TavakController.cs"
click node_login_api "https://github.com/sullaspqr/halak/blob/main/Controllers/LoginController.cs"
click node_fish_dto "https://github.com/sullaspqr/halak/blob/main/DTOs/HalakDTO.cs"
click node_angler_dto "https://github.com/sullaspqr/halak/blob/main/DTOs/HorgaszDTO.cs"
click node_catch_dto "https://github.com/sullaspqr/halak/blob/main/DTOs/FogasDTO.cs"
click node_angler_create_dto "https://github.com/sullaspqr/halak/blob/main/DTOs/HorgaszCreateDTO.cs"
click node_fish "https://github.com/sullaspqr/halak/blob/main/Models/Halak.cs"
click node_angler "https://github.com/sullaspqr/halak/blob/main/Models/Horgaszok.cs"
click node_catch "https://github.com/sullaspqr/halak/blob/main/Models/Fogasok.cs"
click node_lake "https://github.com/sullaspqr/halak/blob/main/Models/Tavak.cs"
click node_login "https://github.com/sullaspqr/halak/blob/main/Models/Login.cs"
click node_startup "https://github.com/sullaspqr/halak/blob/main/Program.cs"
click node_db_context "https://github.com/sullaspqr/halak/blob/main/Models/HalakDbContext.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_fish_api,node_fish_dto_api,node_angler_api,node_angler_dto_api,node_lake_api,node_login_api,node_client toneBlue
class node_fish_dto,node_angler_dto,node_catch_dto,node_angler_create_dto toneAmber
class node_fish,node_angler,node_catch,node_lake,node_login toneMint
class node_startup,node_db_context,node_mysql toneRose
```

## Components

### HTTP API

- [Fish API](https://github.com/sullaspqr/halak/blob/main/Controllers/HalakController.cs): `Controllers/HalakController.cs`
- [Fish DTO API](https://github.com/sullaspqr/halak/blob/main/Controllers/HalakDTOesController.cs): `Controllers/HalakDTOesController.cs`
- [Angler API](https://github.com/sullaspqr/halak/blob/main/Controllers/HorgaszokController.cs): `Controllers/HorgaszokController.cs`
- [Angler DTO API](https://github.com/sullaspqr/halak/blob/main/Controllers/HorgaszDTOesController.cs): `Controllers/HorgaszDTOesController.cs`
- [Lake API](https://github.com/sullaspqr/halak/blob/main/Controllers/TavakController.cs): `Controllers/TavakController.cs`
- [Login API](https://github.com/sullaspqr/halak/blob/main/Controllers/LoginController.cs): `Controllers/LoginController.cs`

### API Contracts

- [Fish DTO](https://github.com/sullaspqr/halak/blob/main/DTOs/HalakDTO.cs): `DTOs/HalakDTO.cs`
- [Angler DTO](https://github.com/sullaspqr/halak/blob/main/DTOs/HorgaszDTO.cs): `DTOs/HorgaszDTO.cs`
- [Catch DTO](https://github.com/sullaspqr/halak/blob/main/DTOs/FogasDTO.cs): `DTOs/FogasDTO.cs`
- [Angler Input DTO](https://github.com/sullaspqr/halak/blob/main/DTOs/HorgaszCreateDTO.cs): `DTOs/HorgaszCreateDTO.cs`

### Fishing Domain

- [Fish Records](https://github.com/sullaspqr/halak/blob/main/Models/Halak.cs): `Models/Halak.cs`
- [Angler Records](https://github.com/sullaspqr/halak/blob/main/Models/Horgaszok.cs): `Models/Horgaszok.cs`
- [Catch Records](https://github.com/sullaspqr/halak/blob/main/Models/Fogasok.cs): `Models/Fogasok.cs`
- [Lake Records](https://github.com/sullaspqr/halak/blob/main/Models/Tavak.cs): `Models/Tavak.cs`
- [Login Records](https://github.com/sullaspqr/halak/blob/main/Models/Login.cs): `Models/Login.cs`

### Persistence

- [Application Startup](https://github.com/sullaspqr/halak/blob/main/Program.cs): `Program.cs`
- [EF Core Context](https://github.com/sullaspqr/halak/blob/main/Models/HalakDbContext.cs): `Models/HalakDbContext.cs`
- **MySQL Database**

### Other components

- **API Client**

## Connections

- API Client → Fish API: sends HTTP requests
- API Client → Fish DTO API: sends HTTP requests
- API Client → Angler API: sends HTTP requests
- API Client → Angler DTO API: sends HTTP requests
- API Client → Lake API: sends HTTP requests
- API Client → Login API: sends HTTP requests
- Fish DTO API → Fish DTO: maps responses (evidence: `Controllers/HalakDTOesController.cs`)
- Angler DTO API → Angler DTO: maps responses (evidence: `Controllers/HorgaszDTOesController.cs`)
- Angler DTO API → Catch DTO: maps catches (evidence: `Controllers/HorgaszDTOesController.cs`)
- Angler DTO API → Angler Input DTO: accepts input (evidence: `Controllers/HorgaszDTOesController.cs`)
- Application Startup → EF Core Context: configures context (evidence: `Program.cs`)
- Fish API → EF Core Context: queries and updates (evidence: `Controllers/HalakController.cs`)
- Fish DTO API → EF Core Context: queries and updates (evidence: `Controllers/HalakDTOesController.cs`)
- Angler API → EF Core Context: queries and updates (evidence: `Controllers/HorgaszokController.cs`)
- Angler DTO API → EF Core Context: queries and updates (evidence: `Controllers/HorgaszDTOesController.cs`)
- Lake API → EF Core Context: uses context (evidence: `Controllers/TavakController.cs`)
- Login API → EF Core Context: uses context (evidence: `Controllers/LoginController.cs`)
- EF Core Context → MySQL Database: maps database tables (evidence: `Models/HalakDbContext.cs`)
- MySQL Database → EF Core Context: deployed backend (evidence: `README.md`)
