# artem-pliusnin/reenbit-camp architecture

> Architecture diagram of the GitHub repository artem-pliusnin/reenbit-camp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/artem-pliusnin/reenbit-camp
- Repository: https://github.com/artem-pliusnin/reenbit-camp

## Overview

This repository is an ASP.NET Core API shell with application messaging contracts and small domain primitives; no business feature or endpoint is implemented in the sampled source. The visible runtime setup builds the web app, enables HTTPS redirection, and exposes Swagger only in development. Application defines MediatR command/query contracts with Result-based responses, while Domain supplies result/error types and a generic repository contract. Persistence and Infrastructure have no sampled runtime implementation, so their wiring and any user-to-result workflow cannot be established.

Main entry points: [`Reenbit-camp.backend/Domain/Shared/Result.cs`](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/Result.cs) (Result types), [`Reenbit-camp.backend/Application/Abstractions/Messaging/ICommandHandler.cs`](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/ICommandHandler.cs) (Command handlers), [`Reenbit-camp.backend/Application/Abstractions/Messaging/IQueryHandler.cs`](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/IQueryHandler.cs) (Query handlers), [`Reenbit-camp.backend/Presentation.API/Program.cs`](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Presentation.API/Program.cs) (Web app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API shell"]
  node_webapp["Web app<br/>[Program.cs]"]
  node_swagger["Swagger setup<br/>[Program.cs]"]
end

subgraph group_messaging["Messaging contracts"]
  node_commands["Command contracts<br/>[ICommand.cs]"]
  node_commandhandlers["Command handlers<br/>[ICommandHandler.cs]"]
  node_queries["Query contracts<br/>[IQuery.cs]"]
  node_queryhandlers["Query handlers<br/>[IQueryHandler.cs]"]
end

subgraph group_domain["Domain primitives"]
  node_result["Result types<br/>[Result.cs]"]
  node_typedresult["Typed result<br/>[ResultT.cs]"]
  node_error["Error value<br/>[Error.cs]"]
  node_repository["Repository contract<br/>[IRepository.cs]"]
end

node_caller(("HTTP caller"))
node_mediatr["MediatR"]

node_caller -->|"sends HTTP"| node_webapp
node_webapp -->|"registers"| node_swagger
node_commands -->|"extends request"| node_mediatr
node_queries -->|"extends request"| node_mediatr
node_commandhandlers -->|"implements handler"| node_mediatr
node_queryhandlers -->|"implements handler"| node_mediatr
node_commandhandlers -->|"returns"| node_result
node_queryhandlers -->|"returns"| node_typedresult
node_typedresult -->|"inherits"| node_result
node_result -->|"uses"| node_error

click node_webapp "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Presentation.API/Program.cs"
click node_swagger "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Presentation.API/Program.cs"
click node_commands "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/ICommand.cs"
click node_commandhandlers "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/ICommandHandler.cs"
click node_queries "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/IQuery.cs"
click node_queryhandlers "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/IQueryHandler.cs"
click node_result "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/Result.cs"
click node_typedresult "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/ResultT.cs"
click node_error "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/Error.cs"
click node_repository "https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Repositories/IRepository.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_swagger toneBlue
class node_commands,node_commandhandlers,node_queries,node_queryhandlers toneAmber
class node_result,node_typedresult,node_error,node_repository toneMint
class node_caller,node_mediatr toneIndigo
```

## Components

### API shell

- [Web app](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Presentation.API/Program.cs): `Reenbit-camp.backend/Presentation.API/Program.cs`
- [Swagger setup](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Presentation.API/Program.cs): `Reenbit-camp.backend/Presentation.API/Program.cs`

### Messaging contracts

- [Command contracts](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/ICommand.cs): `Reenbit-camp.backend/Application/Abstractions/Messaging/ICommand.cs`
- [Command handlers](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/ICommandHandler.cs): `Reenbit-camp.backend/Application/Abstractions/Messaging/ICommandHandler.cs`
- [Query contracts](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/IQuery.cs): `Reenbit-camp.backend/Application/Abstractions/Messaging/IQuery.cs`
- [Query handlers](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Application/Abstractions/Messaging/IQueryHandler.cs): `Reenbit-camp.backend/Application/Abstractions/Messaging/IQueryHandler.cs`

### Domain primitives

- [Result types](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/Result.cs): `Reenbit-camp.backend/Domain/Shared/Result.cs`
- [Typed result](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/ResultT.cs): `Reenbit-camp.backend/Domain/Shared/ResultT.cs`
- [Error value](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Shared/Error.cs): `Reenbit-camp.backend/Domain/Shared/Error.cs`
- [Repository contract](https://github.com/artem-pliusnin/reenbit-camp/blob/main/Reenbit-camp.backend/Domain/Repositories/IRepository.cs): `Reenbit-camp.backend/Domain/Repositories/IRepository.cs`

### Other components

- **HTTP caller**
- **MediatR**

## Connections

- HTTP caller → Web app: sends HTTP
- Web app → Swagger setup: registers
- Command contracts → MediatR: extends request
- Query contracts → MediatR: extends request
- Command handlers → MediatR: implements handler
- Query handlers → MediatR: implements handler
- Command handlers → Result types: returns
- Query handlers → Typed result: returns
- Typed result → Result types: inherits
- Result types → Error value: uses
