# vardan000/auctionplatform architecture

> Architecture diagram of the GitHub repository vardan000/auctionplatform, 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/vardan000/auctionplatform
- Repository: https://github.com/vardan000/auctionplatform

## Overview

AuctionPlatform is an in-development auction API. Users register or log in for JWT authentication; authenticated sellers create lots, users browse active lots, and authenticated bidders place bids. Controllers send commands and queries through MediatR to application handlers, which use repositories and domain entities for auction behavior. Infrastructure supplies EF Core repositories and JWT generation. The README also plans real-time bidding and fuller lot CRUD, but those features are not represented as implemented components here; wiring is inferred only where supported by sampled source and the tree.

Main entry points: [`AuctionPlatform.Application/Auth`](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Auth) (Auth handlers), [`AuctionPlatform.WebApi/Controllers`](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.WebApi/Controllers) (API controllers), [`AuctionPlatform.Application/Lots`](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Lots) (Lot handlers), [`AuctionPlatform.Application/Bids/PlaceBidCommandHandler.cs`](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Bids/PlaceBidCommandHandler.cs) (Bid handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Web API"]
  node_controllers["API controllers<br/>[Controllers]"]
  node_mediator["MediatR"]
end

subgraph group_application["Application workflows"]
  node_auth_handlers["Auth handlers<br/>[Auth]"]
  node_lot_handlers["Lot handlers<br/>[Lots]"]
  node_bid_handler["Bid handler"]
  node_user_interface["User repository contract<br/>[IUserRepository.cs]"]
  node_lot_interface["Lot repository contract<br/>[ILotRepository.cs]"]
  node_token_interface["Token service contract<br/>[ITokenService.cs]"]
end

subgraph group_domain["Auction domain"]
  node_user["User entity<br/>[User.cs]"]
  node_lot["Lot entity<br/>[Lot.cs]"]
  node_bid["Bid entity<br/>[Bid.cs]"]
end

subgraph group_infrastructure["Infrastructure"]
  node_user_repo["User repository<br/>[UserRepository.cs]"]
  node_lot_repo["Lot repository<br/>[LotRepository.cs]"]
  node_token_service["JWT token service<br/>[JwtTokenService.cs]"]
  node_dbcontext["EF Core context<br/>[AppDbContext.cs]"]
end

node_client(("API client"))
node_sql[("SQL Server")]
node_jwt_config["JWT configuration<br/>[appsettings.json]"]

node_client -->|"sends HTTP"| node_controllers
node_controllers -->|"sends requests"| node_mediator
node_mediator -->|"dispatches auth"| node_auth_handlers
node_mediator -->|"dispatches lots"| node_lot_handlers
node_mediator -->|"dispatches bids"| node_bid_handler
node_auth_handlers -->|"uses"| node_user_interface
node_auth_handlers -->|"uses"| node_token_interface
node_lot_handlers -->|"uses"| node_lot_interface
node_bid_handler -->|"uses"| node_lot_interface
node_auth_handlers -->|"creates"| node_user
node_auth_handlers -->|"verifies"| node_user
node_bid_handler -->|"places bid"| node_lot
node_lot -->|"records"| node_bid
node_user_interface -->|"implemented by"| node_user_repo
node_lot_interface -->|"implemented by"| node_lot_repo
node_token_interface -->|"implemented by"| node_token_service
node_user_repo -->|"queries and adds"| node_dbcontext
node_lot_repo -->|"queries and saves"| node_dbcontext
node_dbcontext -->|"reads and writes"| node_sql
node_token_service -->|"reads settings"| node_jwt_config
node_auth_handlers -->|"generates token"| node_token_service
node_controllers -->|"returns HTTP"| node_client
node_lot_handlers -->|"maps lot data"| node_lot

click node_controllers "https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.WebApi/Controllers"
click node_auth_handlers "https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Auth"
click node_lot_handlers "https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Lots"
click node_bid_handler "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Bids/PlaceBidCommandHandler.cs"
click node_user_interface "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/IUserRepository.cs"
click node_lot_interface "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/ILotRepository.cs"
click node_token_interface "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/ITokenService.cs"
click node_user_repo "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/UserRepository.cs"
click node_lot_repo "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/LotRepository.cs"
click node_token_service "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/Services/JwtTokenService.cs"
click node_dbcontext "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/AppDbContext.cs"
click node_user "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/User.cs"
click node_lot "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/Lot.cs"
click node_bid "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/Bid.cs"
click node_jwt_config "https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.WebApi/appsettings.json"

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_controllers,node_mediator,node_client toneBlue
class node_auth_handlers,node_lot_handlers,node_bid_handler,node_user_interface,node_lot_interface,node_token_interface,node_sql toneAmber
class node_user,node_lot,node_bid toneMint
class node_user_repo,node_lot_repo,node_token_service,node_dbcontext toneRose
class node_jwt_config toneTeal
```

## Components

### Web API

- [API controllers](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.WebApi/Controllers): `AuctionPlatform.WebApi/Controllers`
- **MediatR**

### Application workflows

- [Auth handlers](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Auth): `AuctionPlatform.Application/Auth`
- [Lot handlers](https://github.com/vardan000/auctionplatform/tree/main/AuctionPlatform.Application/Lots): `AuctionPlatform.Application/Lots`
- [Bid handler](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Bids/PlaceBidCommandHandler.cs): `AuctionPlatform.Application/Bids/PlaceBidCommandHandler.cs`
- [User repository contract](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/IUserRepository.cs): `AuctionPlatform.Application/Interfaces/IUserRepository.cs`
- [Lot repository contract](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/ILotRepository.cs): `AuctionPlatform.Application/Interfaces/ILotRepository.cs`
- [Token service contract](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Application/Interfaces/ITokenService.cs): `AuctionPlatform.Application/Interfaces/ITokenService.cs`

### Auction domain

- [User entity](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/User.cs): `AuctionPlatform.Domain/User.cs`
- [Lot entity](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/Lot.cs): `AuctionPlatform.Domain/Lot.cs`
- [Bid entity](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Domain/Bid.cs): `AuctionPlatform.Domain/Bid.cs`

### Infrastructure

- [User repository](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/UserRepository.cs): `AuctionPlatform.Infrastructure/UserRepository.cs`
- [Lot repository](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/LotRepository.cs): `AuctionPlatform.Infrastructure/LotRepository.cs`
- [JWT token service](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/Services/JwtTokenService.cs): `AuctionPlatform.Infrastructure/Services/JwtTokenService.cs`
- [EF Core context](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.Infrastructure/AppDbContext.cs): `AuctionPlatform.Infrastructure/AppDbContext.cs`

### Other components

- **API client**
- **SQL Server**
- [JWT configuration](https://github.com/vardan000/auctionplatform/blob/main/AuctionPlatform.WebApi/appsettings.json): `AuctionPlatform.WebApi/appsettings.json`

## Connections

- API client → API controllers: sends HTTP
- API controllers → MediatR: sends requests
- MediatR → Auth handlers: dispatches auth
- MediatR → Lot handlers: dispatches lots
- MediatR → Bid handler: dispatches bids
- Auth handlers → User repository contract: uses
- Auth handlers → Token service contract: uses
- Lot handlers → Lot repository contract: uses
- Bid handler → Lot repository contract: uses
- Auth handlers → User entity: creates
- Auth handlers → User entity: verifies
- Bid handler → Lot entity: places bid
- Lot entity → Bid entity: records
- User repository contract → User repository: implemented by
- Lot repository contract → Lot repository: implemented by
- Token service contract → JWT token service: implemented by
- User repository → EF Core context: queries and adds
- Lot repository → EF Core context: queries and saves
- EF Core context → SQL Server: reads and writes
- JWT token service → JWT configuration: reads settings
- Auth handlers → JWT token service: generates token
- API controllers → API client: returns HTTP
- Lot handlers → Lot entity: maps lot data
