# sebadri/bootcampcltnoviembre architecture

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

- Interactive diagram: https://gitdiagram.com/sebadri/bootcampcltnoviembre
- Repository: https://github.com/sebadri/bootcampcltnoviembre

## Overview

BootcampCLTNoviembre is a .NET Products API. Its main workflow is HTTP product requests routed through Minimal API endpoints and a custom CQRS sender to command or query logic, then PostgreSQL-backed persistence; responses and errors return through the API boundary. Writes use the domain Product aggregate and repository/unit-of-work interfaces, while reads use a separate DTO projection store. The README also documents SQL schema and seed scripts. Some handler wiring and registrations are not shown in the excerpts, so those links are omitted or marked unverified.

Main entry points: [`src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs`](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs) (EF DbContext), [`src/BootcampCLTNoviembre.Application/Messaging/Sender.cs`](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Messaging/Sender.cs) (CQRS Sender), [`src/BootcampCLTNoviembre.Application/Products/Commands`](https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Products/Commands) (Product Commands), [`src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs`](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs) (Exception Mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_endpoints["Product Endpoints"]
  node_exceptions["Exception Mapping"]
end

subgraph group_application["CQRS Application"]
  node_sender["CQRS Sender<br/>[Sender.cs]"]
  node_commands["Product Commands<br/>[Commands]"]
  node_queries["Product Queries<br/>[Queries]"]
  node_behaviors["Pipeline Behaviors<br/>[Behaviors]"]
  node_responses["Product Responses<br/>[Responses.cs]"]
  node_notfound["Not Found Error"]
  node_readport["Read Store Port"]
end

subgraph group_domain["Product Domain"]
  node_product["Product Aggregate<br/>[Product.cs]"]
  node_domainerror["Domain Error<br/>[DomainException.cs]"]
  node_repository["Write Repository"]
end

subgraph group_persistence["PostgreSQL Persistence"]
  node_writeadapter["Product Repository"]
  node_readadapter["Read Projections"]
  node_dbcontext["EF DbContext<br/>[AppDbContext.cs]"]
  node_mapping["Product Mapping"]
end

node_client(("API Client"))
node_database[("PostgreSQL")]
node_sqlscripts["Schema and Seed SQL"]

node_client -->|"sends requests"| node_endpoints
node_endpoints -->|"dispatches requests"| node_sender
node_sender -.->|"dispatches commands"| node_commands
node_sender -.->|"dispatches queries"| node_queries
node_sender -->|"wraps handlers"| node_behaviors
node_commands -->|"uses write port"| node_repository
node_commands -->|"changes aggregate"| node_product
node_commands -->|"raises when absent"| node_notfound
node_product -->|"throws on invalid data"| node_domainerror
node_queries -->|"reads through"| node_readport
node_queries -->|"returns projections"| node_responses
node_readadapter -->|"implements"| node_readport
node_readadapter -->|"queries products"| node_dbcontext
node_writeadapter -->|"implements"| node_repository
node_writeadapter -->|"tracks writes"| node_dbcontext
node_dbcontext -->|"persists aggregate"| node_product
node_dbcontext -->|"loads mappings"| node_mapping
node_dbcontext -->|"reads and commits"| node_database
node_sqlscripts -->|"defines and seeds"| node_database
node_exceptions -->|"maps to 404"| node_notfound
node_exceptions -->|"maps to 400"| node_domainerror
node_exceptions -->|"returns problem details"| node_client

click node_endpoints "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Api/Endpoints/ProductsEndpoints.cs"
click node_exceptions "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs"
click node_sender "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Messaging/Sender.cs"
click node_commands "https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Products/Commands"
click node_queries "https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Products/Queries"
click node_behaviors "https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Behaviors"
click node_responses "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Products/Responses.cs"
click node_notfound "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Common/NotFoundException.cs"
click node_product "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/Products/Product.cs"
click node_domainerror "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/DomainException.cs"
click node_repository "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/Products/IProductRepository.cs"
click node_readport "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Abstractions/Data/IProductsReadStore.cs"
click node_writeadapter "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/ProductRepository.cs"
click node_readadapter "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/ReadModels/ProductsReadStore.cs"
click node_dbcontext "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs"
click node_mapping "https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/Configurations/ProductConfiguration.cs"
click node_sqlscripts "https://github.com/sebadri/bootcampcltnoviembre/blob/main/database/01_create_tables.sql"

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_endpoints,node_exceptions,node_client toneBlue
class node_sender,node_commands,node_queries,node_behaviors,node_responses,node_notfound,node_readport,node_database toneAmber
class node_product,node_domainerror,node_repository toneMint
class node_writeadapter,node_readadapter,node_dbcontext,node_mapping toneRose
class node_sqlscripts toneTeal
```

## Components

### HTTP API

- [Product Endpoints](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Api/Endpoints/ProductsEndpoints.cs): `src/BootcampCLTNoviembre.Api/Endpoints/ProductsEndpoints.cs`
- [Exception Mapping](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs): `src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs`

### CQRS Application

- [CQRS Sender](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Messaging/Sender.cs): `src/BootcampCLTNoviembre.Application/Messaging/Sender.cs`
- [Product Commands](https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Products/Commands): `src/BootcampCLTNoviembre.Application/Products/Commands`
- [Product Queries](https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Products/Queries): `src/BootcampCLTNoviembre.Application/Products/Queries`
- [Pipeline Behaviors](https://github.com/sebadri/bootcampcltnoviembre/tree/main/src/BootcampCLTNoviembre.Application/Behaviors): `src/BootcampCLTNoviembre.Application/Behaviors`
- [Product Responses](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Products/Responses.cs): `src/BootcampCLTNoviembre.Application/Products/Responses.cs`
- [Not Found Error](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Common/NotFoundException.cs): `src/BootcampCLTNoviembre.Application/Common/NotFoundException.cs`
- [Read Store Port](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Application/Abstractions/Data/IProductsReadStore.cs): `src/BootcampCLTNoviembre.Application/Abstractions/Data/IProductsReadStore.cs`

### Product Domain

- [Product Aggregate](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/Products/Product.cs): `src/BootcampCLTNoviembre.Domain/Products/Product.cs`
- [Domain Error](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/DomainException.cs): `src/BootcampCLTNoviembre.Domain/DomainException.cs`
- [Write Repository](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Domain/Products/IProductRepository.cs): `src/BootcampCLTNoviembre.Domain/Products/IProductRepository.cs`

### PostgreSQL Persistence

- [Product Repository](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/ProductRepository.cs): `src/BootcampCLTNoviembre.Infrastructure/Persistence/ProductRepository.cs`
- [Read Projections](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/ReadModels/ProductsReadStore.cs): `src/BootcampCLTNoviembre.Infrastructure/ReadModels/ProductsReadStore.cs`
- [EF DbContext](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs): `src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs`
- [Product Mapping](https://github.com/sebadri/bootcampcltnoviembre/blob/main/src/BootcampCLTNoviembre.Infrastructure/Persistence/Configurations/ProductConfiguration.cs): `src/BootcampCLTNoviembre.Infrastructure/Persistence/Configurations/ProductConfiguration.cs`

### Other components

- **API Client**
- **PostgreSQL**
- [Schema and Seed SQL](https://github.com/sebadri/bootcampcltnoviembre/blob/main/database/01_create_tables.sql): `database/01_create_tables.sql`

## Connections

- API Client → Product Endpoints: sends requests (evidence: `README.md`)
- Product Endpoints → CQRS Sender: dispatches requests (evidence: `src/BootcampCLTNoviembre.Api/Endpoints/ProductsEndpoints.cs`)
- CQRS Sender → Product Commands: dispatches commands
- CQRS Sender → Product Queries: dispatches queries
- CQRS Sender → Pipeline Behaviors: wraps handlers (evidence: `src/BootcampCLTNoviembre.Application/Messaging/Sender.cs`)
- Product Commands → Write Repository: uses write port (evidence: `src/BootcampCLTNoviembre.Application/Products/Commands/CreateProduct/CreateProductCommand.cs`)
- Product Commands → Product Aggregate: changes aggregate (evidence: `src/BootcampCLTNoviembre.Application/Products/Commands/CreateProduct/CreateProductCommand.cs`)
- Product Commands → Not Found Error: raises when absent (evidence: `src/BootcampCLTNoviembre.Application/Products/Commands/DeleteProduct/DeleteProductCommand.cs`)
- Product Aggregate → Domain Error: throws on invalid data (evidence: `src/BootcampCLTNoviembre.Domain/Products/Product.cs`)
- Product Queries → Read Store Port: reads through (evidence: `src/BootcampCLTNoviembre.Application/Products/Queries/GetProducts.cs`)
- Product Queries → Product Responses: returns projections (evidence: `src/BootcampCLTNoviembre.Application/Products/Queries/GetProducts.cs`)
- Read Projections → Read Store Port: implements (evidence: `src/BootcampCLTNoviembre.Infrastructure/ReadModels/ProductsReadStore.cs`)
- Read Projections → EF DbContext: queries products (evidence: `src/BootcampCLTNoviembre.Infrastructure/ReadModels/ProductsReadStore.cs`)
- Product Repository → Write Repository: implements (evidence: `src/BootcampCLTNoviembre.Infrastructure/Persistence/ProductRepository.cs`)
- Product Repository → EF DbContext: tracks writes (evidence: `src/BootcampCLTNoviembre.Infrastructure/Persistence/ProductRepository.cs`)
- EF DbContext → Product Aggregate: persists aggregate (evidence: `src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs`)
- EF DbContext → Product Mapping: loads mappings (evidence: `src/BootcampCLTNoviembre.Infrastructure/Persistence/AppDbContext.cs`)
- EF DbContext → PostgreSQL: reads and commits (evidence: `README.md`)
- Schema and Seed SQL → PostgreSQL: defines and seeds (evidence: `README.md`)
- Exception Mapping → Not Found Error: maps to 404 (evidence: `src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs`)
- Exception Mapping → Domain Error: maps to 400 (evidence: `src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs`)
- Exception Mapping → API Client: returns problem details (evidence: `src/BootcampCLTNoviembre.Api/ExceptionHandling/GlobalExceptionHandler.cs`)
