# paulon-zervoulakus/bidding-api architecture

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

- Interactive diagram: https://gitdiagram.com/paulon-zervoulakus/bidding-api
- Repository: https://github.com/paulon-zervoulakus/bidding-api

## Overview

bidding-api is an ASP.NET service for accounts, seller product catalogs, auction rooms, and real-time bidding and chat. Users reach account, product, and auction functionality through API controllers; live interactions are exposed through SignalR hubs. Product controllers delegate catalog, category, and image operations to services, while those services use the application database context. The excerpts also show SignalR token filtering and validation. Account and auction controller-to-service wiring, and some hub routing, could not be verified from the available excerpts, so those connections are omitted or marked unverified.

Main entry points: [`Program.cs`](https://github.com/paulon-zervoulakus/bidding-api/blob/main/Program.cs) (ASP.NET Host), [`controllers/api/Products.cs`](https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/Products.cs) (Product API), [`dto/Hubs.cs`](https://github.com/paulon-zervoulakus/bidding-api/blob/main/dto/Hubs.cs) (Hub Messages), [`dbcontext/ApplicationDBContext.cs`](https://github.com/paulon-zervoulakus/bidding-api/blob/main/dbcontext/ApplicationDBContext.cs) (Application Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_account_api["Account API<br/>[Account.cs]"]
  node_auction_api["Auction API<br/>[AuctionRooms.cs]"]
  node_product_api["Product API<br/>[Products.cs]"]
  node_account_service["Account Service<br/>[AccountService.cs]"]
end

subgraph group_catalog["Product Catalog"]
  node_product_service["Product Service<br/>[ProductService.cs]"]
  node_category_service["Category Service"]
  node_image_service["Product Images"]
  node_product_model["Product Model<br/>[Product.cs]"]
end

subgraph group_auction["Live Auctions"]
  node_auction_service["Auction Service<br/>[AuctionRooms.cs]"]
  node_room_model["Auction Room Model<br/>[AuctionRoom.cs]"]
  node_bidding_hub["Bidding Hub<br/>[BiddingHub.cs]"]
  node_lobby_hub["Lobby Hub<br/>[LobbyHub.cs]"]
  node_room_hub["Room Hub<br/>[RoomHub.cs]"]
  node_chat_hub["Chat Hub<br/>[ChatHub.cs]"]
  node_hub_dtos["Hub Messages<br/>[Hubs.cs]"]
end

subgraph group_platform["Identity and Storage"]
  node_db[("Application Database")]
  node_account_model["Account Model<br/>[Account.cs]"]
  node_token_filter["SignalR Token Filter"]
  node_token_attribute["Token Requirement"]
  node_token_validator["SignalR Validator<br/>[SignalRService.cs]"]
  node_helper_service["Request Helpers<br/>[HelperService.cs]"]
  node_token_service["Token Service<br/>[TokenService.cs]"]
  node_app["ASP.NET Host<br/>[Program.cs]"]
end

node_user(("User"))

node_user -.->|"calls"| node_account_api
node_user -.->|"calls"| node_auction_api
node_user -.->|"calls"| node_product_api
node_user -.->|"connects"| node_bidding_hub
node_user -.->|"connects"| node_lobby_hub
node_user -.->|"connects"| node_room_hub
node_user -.->|"connects"| node_chat_hub
node_product_api -->|"delegates"| node_product_service
node_product_api -->|"delegates"| node_category_service
node_product_api -->|"delegates"| node_image_service
node_product_service -->|"reads and writes"| node_db
node_category_service -->|"reads"| node_db
node_image_service -->|"reads and writes"| node_db
node_account_service -->|"reads and writes"| node_db
node_bidding_hub -->|"uses"| node_hub_dtos
node_lobby_hub -->|"uses"| node_hub_dtos
node_room_hub -->|"uses"| node_hub_dtos
node_chat_hub -->|"uses"| node_hub_dtos
node_lobby_hub -->|"references"| node_bidding_hub
node_token_filter -->|"checks"| node_token_attribute
node_token_filter -->|"validates with"| node_token_validator
node_app -->|"registers"| node_token_filter
node_app -->|"registers"| node_product_service
node_app -->|"registers"| node_category_service
node_app -->|"registers"| node_image_service

click node_account_api "https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/Account.cs"
click node_auction_api "https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/AuctionRooms.cs"
click node_product_api "https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/Products.cs"
click node_account_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Account/AccountService.cs"
click node_auction_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Auction/AuctionRooms.cs"
click node_product_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductService.cs"
click node_category_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductCategoryService.cs"
click node_image_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductImagesService.cs"
click node_db "https://github.com/paulon-zervoulakus/bidding-api/blob/main/dbcontext/ApplicationDBContext.cs"
click node_account_model "https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/Account.cs"
click node_product_model "https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/Product.cs"
click node_room_model "https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/AuctionRoom.cs"
click node_bidding_hub "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/BiddingHub.cs"
click node_lobby_hub "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/LobbyHub.cs"
click node_room_hub "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/RoomHub.cs"
click node_chat_hub "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/ChatHub.cs"
click node_hub_dtos "https://github.com/paulon-zervoulakus/bidding-api/blob/main/dto/Hubs.cs"
click node_token_filter "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/Filters/SignalRTokenFilter.cs"
click node_token_attribute "https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/Filters/ValidateSignalRTokenAttribute.cs"
click node_token_validator "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/SignalRService.cs"
click node_helper_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/HelperService.cs"
click node_token_service "https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/TokenService.cs"
click node_app "https://github.com/paulon-zervoulakus/bidding-api/blob/main/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_account_api,node_auction_api,node_product_api,node_account_service,node_user toneBlue
class node_product_service,node_category_service,node_image_service,node_product_model toneAmber
class node_auction_service,node_room_model,node_bidding_hub,node_lobby_hub,node_room_hub,node_chat_hub,node_hub_dtos toneMint
class node_db,node_account_model,node_token_filter,node_token_attribute,node_token_validator,node_helper_service,node_token_service,node_app toneRose
```

## Components

### HTTP API

- [Account API](https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/Account.cs): `controllers/api/Account.cs`
- [Auction API](https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/AuctionRooms.cs): `controllers/api/AuctionRooms.cs`
- [Product API](https://github.com/paulon-zervoulakus/bidding-api/blob/main/controllers/api/Products.cs): `controllers/api/Products.cs`
- [Account Service](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Account/AccountService.cs): `services/Account/AccountService.cs`

### Product Catalog

- [Product Service](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductService.cs): `services/Product/ProductService.cs`
- [Category Service](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductCategoryService.cs): `services/Product/ProductCategoryService.cs`
- [Product Images](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Product/ProductImagesService.cs): `services/Product/ProductImagesService.cs`
- [Product Model](https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/Product.cs): `models/Product.cs`

### Live Auctions

- [Auction Service](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/Auction/AuctionRooms.cs): `services/Auction/AuctionRooms.cs`
- [Auction Room Model](https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/AuctionRoom.cs): `models/AuctionRoom.cs`
- [Bidding Hub](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/BiddingHub.cs): `hubs/BiddingHub.cs`
- [Lobby Hub](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/LobbyHub.cs): `hubs/LobbyHub.cs`
- [Room Hub](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/RoomHub.cs): `hubs/RoomHub.cs`
- [Chat Hub](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/ChatHub.cs): `hubs/ChatHub.cs`
- [Hub Messages](https://github.com/paulon-zervoulakus/bidding-api/blob/main/dto/Hubs.cs): `dto/Hubs.cs`

### Identity and Storage

- [Application Database](https://github.com/paulon-zervoulakus/bidding-api/blob/main/dbcontext/ApplicationDBContext.cs): `dbcontext/ApplicationDBContext.cs`
- [Account Model](https://github.com/paulon-zervoulakus/bidding-api/blob/main/models/Account.cs): `models/Account.cs`
- [SignalR Token Filter](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/Filters/SignalRTokenFilter.cs): `hubs/Filters/SignalRTokenFilter.cs`
- [Token Requirement](https://github.com/paulon-zervoulakus/bidding-api/blob/main/hubs/Filters/ValidateSignalRTokenAttribute.cs): `hubs/Filters/ValidateSignalRTokenAttribute.cs`
- [SignalR Validator](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/SignalRService.cs): `services/SignalRService.cs`
- [Request Helpers](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/HelperService.cs): `services/HelperService.cs`
- [Token Service](https://github.com/paulon-zervoulakus/bidding-api/blob/main/services/TokenService.cs): `services/TokenService.cs`
- [ASP.NET Host](https://github.com/paulon-zervoulakus/bidding-api/blob/main/Program.cs): `Program.cs`

### Other components

- **User**

## Connections

- User → Account API: calls
- User → Auction API: calls
- User → Product API: calls
- User → Bidding Hub: connects
- User → Lobby Hub: connects
- User → Room Hub: connects
- User → Chat Hub: connects
- Product API → Product Service: delegates (evidence: `controllers/api/Products.cs`)
- Product API → Category Service: delegates (evidence: `controllers/api/Products.cs`)
- Product API → Product Images: delegates (evidence: `controllers/api/Products.cs`)
- Product Service → Application Database: reads and writes (evidence: `services/Product/ProductService.cs`)
- Category Service → Application Database: reads (evidence: `services/Product/ProductCategoryService.cs`)
- Product Images → Application Database: reads and writes (evidence: `services/Product/ProductImagesService.cs`)
- Account Service → Application Database: reads and writes (evidence: `services/Account/AccountService.cs`)
- Bidding Hub → Hub Messages: uses (evidence: `hubs/BiddingHub.cs`)
- Lobby Hub → Hub Messages: uses (evidence: `hubs/LobbyHub.cs`)
- Room Hub → Hub Messages: uses (evidence: `hubs/RoomHub.cs`)
- Chat Hub → Hub Messages: uses (evidence: `hubs/ChatHub.cs`)
- Lobby Hub → Bidding Hub: references (evidence: `hubs/LobbyHub.cs`)
- SignalR Token Filter → Token Requirement: checks (evidence: `hubs/Filters/SignalRTokenFilter.cs`)
- SignalR Token Filter → SignalR Validator: validates with (evidence: `hubs/Filters/SignalRTokenFilter.cs`)
- ASP.NET Host → SignalR Token Filter: registers (evidence: `Program.cs`)
- ASP.NET Host → Product Service: registers (evidence: `Program.cs`)
- ASP.NET Host → Category Service: registers (evidence: `Program.cs`)
- ASP.NET Host → Product Images: registers (evidence: `Program.cs`)
