# ankitsharma101/british_auction architecture

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

- Interactive diagram: https://gitdiagram.com/ankitsharma101/british_auction
- Repository: https://github.com/ankitsharma101/british_auction

## Overview

This is a British-auction RFQ platform: buyers configure freight requests and auction rules, suppliers submit priced bids, and the system ranks bids while extending closing time under configured triggers and a forced-close cap. The main workflow runs from RFQ creation through bidding, ranking, and activity auditing; listing and detail views expose status and results. Backend route handlers combine orchestration and domain logic in one source file, so the graph separates their responsibilities without implying separate implementation modules. The README documents the SQLite/Prisma data layer; source excerpts show backend database operations, but the schema itself was not sampled.

Main entry points: [`backend/prisma/schema.prisma`](https://github.com/ankitsharma101/british_auction/blob/main/backend/prisma/schema.prisma) (RFQ, bid and activity data), [`frontend/src/app/rfq/[id]/page.tsx`](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/%5Bid%5D/page.tsx) (RFQ detail and bid form), [`frontend/src/app/page.tsx`](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/page.tsx) (RFQ listing), [`frontend/src/app/rfq/new/page.tsx`](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/new/page.tsx) (RFQ creation form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_rfq_list["RFQ listing<br/>[page.tsx]"]
  node_rfq_create_ui["RFQ creation form<br/>[page.tsx]"]
  node_rfq_detail_ui["RFQ detail and bid form<br/>[page.tsx]"]
end

subgraph group_auction["RFQ and auction API"]
  node_rfq_create["Create RFQ<br/>[index.ts]"]
  node_rfq_list_api["List RFQs<br/>[index.ts]"]
  node_rfq_details_api["RFQ details and ranking<br/>[index.ts]"]
  node_bid_handler["Bid and extension engine<br/>[index.ts]"]
end

subgraph group_data["Auction data"]
  node_rfq_store[("RFQ, bid and activity data<br/>[schema.prisma]")]
end

node_buyer_supplier(("Buyer / supplier"))

node_buyer_supplier -->|"browses"| node_rfq_list
node_buyer_supplier -->|"configures RFQ"| node_rfq_create_ui
node_buyer_supplier -->|"views and bids"| node_rfq_detail_ui
node_rfq_create_ui -->|"posts RFQ"| node_rfq_create
node_rfq_list -->|"fetches list"| node_rfq_list_api
node_rfq_detail_ui -->|"polls details"| node_rfq_details_api
node_rfq_detail_ui -->|"submits bid"| node_bid_handler
node_rfq_create -->|"creates RFQ"| node_rfq_store
node_rfq_list_api -->|"reads RFQs and bids"| node_rfq_store
node_rfq_details_api -->|"reads RFQ, bids, logs"| node_rfq_store
node_bid_handler -->|"reads and writes bids, RFQ, logs"| node_rfq_store

click node_rfq_list "https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/page.tsx"
click node_rfq_create_ui "https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/new/page.tsx"
click node_rfq_detail_ui "https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/%5Bid%5D/page.tsx"
click node_rfq_create "https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts"
click node_rfq_list_api "https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts"
click node_rfq_details_api "https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts"
click node_bid_handler "https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts"
click node_rfq_store "https://github.com/ankitsharma101/british_auction/blob/main/backend/prisma/schema.prisma"

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_rfq_list,node_rfq_create_ui,node_rfq_detail_ui toneBlue
class node_rfq_create,node_rfq_list_api,node_rfq_details_api,node_bid_handler toneAmber
class node_rfq_store toneMint
class node_buyer_supplier toneIndigo
```

## Components

### Web application

- [RFQ listing](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [RFQ creation form](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/new/page.tsx): `frontend/src/app/rfq/new/page.tsx`
- [RFQ detail and bid form](https://github.com/ankitsharma101/british_auction/blob/main/frontend/src/app/rfq/%5Bid%5D/page.tsx): `frontend/src/app/rfq/[id]/page.tsx`

### RFQ and auction API

- [Create RFQ](https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [List RFQs](https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [RFQ details and ranking](https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [Bid and extension engine](https://github.com/ankitsharma101/british_auction/blob/main/backend/src/index.ts): `backend/src/index.ts`

### Auction data

- [RFQ, bid and activity data](https://github.com/ankitsharma101/british_auction/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`

### Other components

- **Buyer / supplier**

## Connections

- Buyer / supplier → RFQ listing: browses (evidence: `frontend/src/app/page.tsx`)
- Buyer / supplier → RFQ creation form: configures RFQ (evidence: `frontend/src/app/rfq/new/page.tsx`)
- Buyer / supplier → RFQ detail and bid form: views and bids (evidence: `frontend/src/app/rfq/[id]/page.tsx`)
- RFQ creation form → Create RFQ: posts RFQ (evidence: `frontend/src/app/rfq/new/page.tsx`)
- RFQ listing → List RFQs: fetches list (evidence: `frontend/src/app/page.tsx`)
- RFQ detail and bid form → RFQ details and ranking: polls details (evidence: `README.md`)
- RFQ detail and bid form → Bid and extension engine: submits bid (evidence: `frontend/src/app/rfq/[id]/page.tsx`)
- Create RFQ → RFQ, bid and activity data: creates RFQ (evidence: `backend/src/index.ts`)
- List RFQs → RFQ, bid and activity data: reads RFQs and bids (evidence: `backend/src/index.ts`)
- RFQ details and ranking → RFQ, bid and activity data: reads RFQ, bids, logs (evidence: `backend/src/index.ts`)
- Bid and extension engine → RFQ, bid and activity data: reads and writes bids, RFQ, logs (evidence: `backend/src/index.ts`)
