# dimaan49/devopst3 architecture

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

- Interactive diagram: https://gitdiagram.com/dimaan49/devopst3
- Repository: https://github.com/dimaan49/devopst3

## Overview

AuctionHub is a client-server application for open English auctions. Its main workflow runs from seller auction and lot management, through bidder participation and bidding, to completed-sale reviews; users authenticate through the HTTP API. The graph includes documented auction, bid, user, and review capabilities plus the web client and PostgreSQL persistence. Several source files were not excerpted, so uncertain links are omitted; review handler-to-repository calls are shown where excerpts confirm them.

Main entry points: [`src/main.cpp`](https://github.com/dimaan49/devopst3/blob/main/src/main.cpp) (HTTP server), [`src/server/auth.cpp`](https://github.com/dimaan49/devopst3/blob/main/src/server/auth.cpp) (Token authentication), [`src/handlers/AuthHandler.cpp`](https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuthHandler.cpp) (Auth routes), [`src/handlers/AuctionHandler.cpp`](https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuctionHandler.cpp) (Auction management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP and web"]
  node_server["HTTP server<br/>[main.cpp]"]
  node_auction_ui["Auction pages<br/>[auctions.js]"]
  node_seller_ui["Seller pages<br/>[my-auctions.js]"]
  node_shared_ui["Shared client<br/>[common.js]"]
  node_auth_ui["App client<br/>[app.js]"]
  node_api_response["API responses<br/>[ApiResponse.h]"]
end

subgraph group_identity["Identity"]
  node_auth_routes["Auth routes<br/>[AuthHandler.cpp]"]
  node_auth_service["Token authentication<br/>[auth.cpp]"]
  node_jwt["JWT handling<br/>[jwt.cpp]"]
  node_users["User accounts<br/>[UserHandler.cpp]"]
end

subgraph group_market["Auction lifecycle"]
  node_auction_routes["Auction management<br/>[AuctionHandler.cpp]"]
  node_bid_routes["Bidding<br/>[BidHandler.cpp]"]
end

subgraph group_feedback["Reviews"]
  node_review_routes["Review management<br/>[ReviewHandler.cpp]"]
end

subgraph group_persistence["Persistence"]
  node_user_repo["User persistence<br/>[UserRepository.cpp]"]
  node_revoked_repo["Revoked tokens"]
  node_auction_repo["Auction records"]
  node_lot_repo["Auction lots<br/>[LotRepository.cpp]"]
  node_bid_repo["Bid records<br/>[BidRepository.cpp]"]
  node_review_repo["Review records"]
  node_db[("PostgreSQL connection<br/>[Database.cpp]")]
end

node_browser(("Auction participants"))

node_browser -->|"sends requests"| node_server
node_server -->|"registers routes"| node_auth_routes
node_server -->|"registers routes"| node_auction_routes
node_server -->|"registers routes"| node_bid_routes
node_server -->|"registers routes"| node_review_routes
node_server -->|"registers routes"| node_users
node_browser -.->|"uses pages"| node_auction_ui
node_browser -.->|"uses pages"| node_seller_ui
node_auction_ui -.->|"uses helpers"| node_shared_ui
node_seller_ui -.->|"uses helpers"| node_shared_ui
node_auth_ui -.->|"uses helpers"| node_shared_ui
node_auth_ui -.->|"calls API"| node_server
node_auction_ui -.->|"calls API"| node_server
node_seller_ui -.->|"calls API"| node_server
node_auth_routes -->|"verifies users"| node_user_repo
node_auth_routes -->|"encodes tokens"| node_jwt
node_auth_routes -->|"revokes tokens"| node_revoked_repo
node_auth_routes -->|"authenticates"| node_auth_service
node_auth_service -->|"checks tokens"| node_jwt
node_auth_service -->|"loads user"| node_user_repo
node_auth_service -->|"checks revocation"| node_revoked_repo
node_users -->|"manages accounts"| node_user_repo
node_auction_routes -->|"checks identity"| node_auth_service
node_auction_routes -->|"manages auctions"| node_auction_repo
node_auction_routes -->|"manages lots"| node_lot_repo
node_auction_routes -->|"checks users"| node_user_repo
node_bid_routes -->|"checks identity"| node_auth_service
node_bid_routes -->|"records bids"| node_bid_repo
node_bid_routes -->|"checks lots"| node_lot_repo
node_bid_routes -->|"checks users"| node_user_repo
node_review_routes -->|"checks identity"| node_auth_service
node_review_routes -->|"manages reviews"| node_review_repo
node_review_routes -->|"loads auction"| node_auction_repo
node_auction_repo -->|"queries database"| node_db
node_lot_repo -->|"queries database"| node_db
node_bid_repo -->|"queries database"| node_db
node_review_repo -->|"queries database"| node_db
node_user_repo -->|"queries database"| node_db
node_revoked_repo -->|"queries database"| node_db
node_server -->|"checks health"| node_db
node_auction_routes -->|"formats responses"| node_api_response
node_review_routes -->|"formats responses"| node_api_response
node_auth_routes -->|"formats responses"| node_api_response

click node_server "https://github.com/dimaan49/devopst3/blob/main/src/main.cpp"
click node_auction_ui "https://github.com/dimaan49/devopst3/blob/main/web/auctions.js"
click node_seller_ui "https://github.com/dimaan49/devopst3/blob/main/web/my-auctions.js"
click node_shared_ui "https://github.com/dimaan49/devopst3/blob/main/web/common.js"
click node_auth_ui "https://github.com/dimaan49/devopst3/blob/main/web/app.js"
click node_auth_routes "https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuthHandler.cpp"
click node_auth_service "https://github.com/dimaan49/devopst3/blob/main/src/server/auth.cpp"
click node_jwt "https://github.com/dimaan49/devopst3/blob/main/src/server/jwt.cpp"
click node_users "https://github.com/dimaan49/devopst3/blob/main/src/handlers/UserHandler.cpp"
click node_user_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/UserRepository.cpp"
click node_revoked_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/RevokedTokenRepository.cpp"
click node_auction_routes "https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuctionHandler.cpp"
click node_bid_routes "https://github.com/dimaan49/devopst3/blob/main/src/handlers/BidHandler.cpp"
click node_auction_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/AuctionRepository.cpp"
click node_lot_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/LotRepository.cpp"
click node_bid_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/BidRepository.cpp"
click node_review_routes "https://github.com/dimaan49/devopst3/blob/main/src/handlers/ReviewHandler.cpp"
click node_review_repo "https://github.com/dimaan49/devopst3/blob/main/src/models/ReviewRepository.cpp"
click node_db "https://github.com/dimaan49/devopst3/blob/main/src/db/Database.cpp"
click node_api_response "https://github.com/dimaan49/devopst3/blob/main/src/server/ApiResponse.h"

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_server,node_auction_ui,node_seller_ui,node_shared_ui,node_auth_ui,node_api_response toneBlue
class node_auth_routes,node_auth_service,node_jwt,node_users toneAmber
class node_auction_routes,node_bid_routes toneMint
class node_review_routes toneRose
class node_user_repo,node_revoked_repo,node_auction_repo,node_lot_repo,node_bid_repo,node_review_repo,node_db,node_browser toneIndigo
```

## Components

### HTTP and web

- [HTTP server](https://github.com/dimaan49/devopst3/blob/main/src/main.cpp): `src/main.cpp`
- [Auction pages](https://github.com/dimaan49/devopst3/blob/main/web/auctions.js): `web/auctions.js`
- [Seller pages](https://github.com/dimaan49/devopst3/blob/main/web/my-auctions.js): `web/my-auctions.js`
- [Shared client](https://github.com/dimaan49/devopst3/blob/main/web/common.js): `web/common.js`
- [App client](https://github.com/dimaan49/devopst3/blob/main/web/app.js): `web/app.js`
- [API responses](https://github.com/dimaan49/devopst3/blob/main/src/server/ApiResponse.h): `src/server/ApiResponse.h`

### Identity

- [Auth routes](https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuthHandler.cpp): `src/handlers/AuthHandler.cpp`
- [Token authentication](https://github.com/dimaan49/devopst3/blob/main/src/server/auth.cpp): `src/server/auth.cpp`
- [JWT handling](https://github.com/dimaan49/devopst3/blob/main/src/server/jwt.cpp): `src/server/jwt.cpp`
- [User accounts](https://github.com/dimaan49/devopst3/blob/main/src/handlers/UserHandler.cpp): `src/handlers/UserHandler.cpp`

### Auction lifecycle

- [Auction management](https://github.com/dimaan49/devopst3/blob/main/src/handlers/AuctionHandler.cpp): `src/handlers/AuctionHandler.cpp`
- [Bidding](https://github.com/dimaan49/devopst3/blob/main/src/handlers/BidHandler.cpp): `src/handlers/BidHandler.cpp`

### Reviews

- [Review management](https://github.com/dimaan49/devopst3/blob/main/src/handlers/ReviewHandler.cpp): `src/handlers/ReviewHandler.cpp`

### Persistence

- [User persistence](https://github.com/dimaan49/devopst3/blob/main/src/models/UserRepository.cpp): `src/models/UserRepository.cpp`
- [Revoked tokens](https://github.com/dimaan49/devopst3/blob/main/src/models/RevokedTokenRepository.cpp): `src/models/RevokedTokenRepository.cpp`
- [Auction records](https://github.com/dimaan49/devopst3/blob/main/src/models/AuctionRepository.cpp): `src/models/AuctionRepository.cpp`
- [Auction lots](https://github.com/dimaan49/devopst3/blob/main/src/models/LotRepository.cpp): `src/models/LotRepository.cpp`
- [Bid records](https://github.com/dimaan49/devopst3/blob/main/src/models/BidRepository.cpp): `src/models/BidRepository.cpp`
- [Review records](https://github.com/dimaan49/devopst3/blob/main/src/models/ReviewRepository.cpp): `src/models/ReviewRepository.cpp`
- [PostgreSQL connection](https://github.com/dimaan49/devopst3/blob/main/src/db/Database.cpp): `src/db/Database.cpp`

### Other components

- **Auction participants**

## Connections

- Auction participants → HTTP server: sends requests
- HTTP server → Auth routes: registers routes (evidence: `src/main.cpp`)
- HTTP server → Auction management: registers routes (evidence: `src/main.cpp`)
- HTTP server → Bidding: registers routes (evidence: `src/main.cpp`)
- HTTP server → Review management: registers routes (evidence: `src/main.cpp`)
- HTTP server → User accounts: registers routes (evidence: `src/main.cpp`)
- Auction participants → Auction pages: uses pages
- Auction participants → Seller pages: uses pages
- Auction pages → Shared client: uses helpers
- Seller pages → Shared client: uses helpers
- App client → Shared client: uses helpers
- App client → HTTP server: calls API
- Auction pages → HTTP server: calls API
- Seller pages → HTTP server: calls API
- Auth routes → User persistence: verifies users (evidence: `src/handlers/AuthHandler.cpp`)
- Auth routes → JWT handling: encodes tokens (evidence: `src/handlers/AuthHandler.cpp`)
- Auth routes → Revoked tokens: revokes tokens (evidence: `src/handlers/AuthHandler.cpp`)
- Auth routes → Token authentication: authenticates (evidence: `src/handlers/AuthHandler.cpp`)
- Token authentication → JWT handling: checks tokens (evidence: `src/server/auth.cpp`)
- Token authentication → User persistence: loads user (evidence: `src/server/auth.cpp`)
- Token authentication → Revoked tokens: checks revocation (evidence: `src/server/auth.cpp`)
- User accounts → User persistence: manages accounts (evidence: `src/handlers/UserHandler.cpp`)
- Auction management → Token authentication: checks identity (evidence: `src/handlers/AuctionHandler.cpp`)
- Auction management → Auction records: manages auctions (evidence: `src/handlers/AuctionHandler.cpp`)
- Auction management → Auction lots: manages lots (evidence: `src/handlers/AuctionHandler.cpp`)
- Auction management → User persistence: checks users (evidence: `src/handlers/AuctionHandler.cpp`)
- Bidding → Token authentication: checks identity (evidence: `src/handlers/BidHandler.cpp`)
- Bidding → Bid records: records bids (evidence: `src/handlers/BidHandler.cpp`)
- Bidding → Auction lots: checks lots (evidence: `src/handlers/BidHandler.cpp`)
- Bidding → User persistence: checks users (evidence: `src/handlers/BidHandler.cpp`)
- Review management → Token authentication: checks identity (evidence: `src/handlers/ReviewHandler.cpp`)
- Review management → Review records: manages reviews (evidence: `src/handlers/ReviewHandler.cpp`)
- Review management → Auction records: loads auction (evidence: `src/handlers/ReviewHandler.cpp`)
- Auction records → PostgreSQL connection: queries database (evidence: `src/models/AuctionRepository.cpp`)
- Auction lots → PostgreSQL connection: queries database (evidence: `src/models/LotRepository.cpp`)
- Bid records → PostgreSQL connection: queries database (evidence: `src/models/BidRepository.cpp`)
- Review records → PostgreSQL connection: queries database (evidence: `src/models/ReviewRepository.cpp`)
- User persistence → PostgreSQL connection: queries database (evidence: `src/models/UserRepository.cpp`)
- Revoked tokens → PostgreSQL connection: queries database (evidence: `src/models/RevokedTokenRepository.cpp`)
- HTTP server → PostgreSQL connection: checks health (evidence: `src/main.cpp`)
- Auction management → API responses: formats responses (evidence: `src/handlers/AuctionHandler.cpp`)
- Review management → API responses: formats responses (evidence: `src/handlers/ReviewHandler.cpp`)
- Auth routes → API responses: formats responses (evidence: `src/handlers/AuthHandler.cpp`)
