# prajwalas1/quote-desk architecture

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

- Interactive diagram: https://gitdiagram.com/prajwalas1/quote-desk
- Repository: https://github.com/prajwalas1/quote-desk

## Overview

Quote Desk is a single-user procurement app for creating RFQs, recording supplier quotes, and identifying the lowest-priced eligible offer. Users enter RFQs and quotes in the React interface; FastAPI validates and routes these requests, persists them in PostgreSQL, and evaluates status and best quote when RFQs are read. The graph includes the documented Neon-backed persistence and health capability. The Vite `/api` proxy is documented, but its wiring is not shown in the sampled frontend configuration; unsampled implementation details are not inferred.

Main entry points: [`backend/app/routes/rfqs.py`](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/routes/rfqs.py) (RFQ routes), [`frontend/src/main.jsx`](https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/main.jsx) (RFQ and quote views), [`frontend/src/api.js`](https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/api.js) (API request client), [`backend/app/core/database.py`](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/core/database.py) (Database connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Procurement UI"]
  node_rfq_ui["RFQ and quote views<br/>[main.jsx]"]
  node_entry_forms["Entry forms<br/>[forms.jsx]"]
  node_http_client["API request client<br/>[api.js]"]
end

subgraph group_api["API and evaluation"]
  node_fastapi_app["API application<br/>[main.py]"]
  node_rfq_routes["RFQ routes<br/>[rfqs.py]"]
  node_health_routes["Health routes<br/>[health.py]"]
  node_request_schemas["Request validation<br/>[rfqs.py]"]
  node_quote_evaluation["Status and winner<br/>[quote_selection.py]"]
end

subgraph group_storage["Persistence"]
  node_rfq_repository["RFQ and quote repository<br/>[rfqs.py]"]
  node_connection["Database connection<br/>[database.py]"]
  node_postgres[("Neon PostgreSQL")]
end

node_buyer(("Procurement user"))

node_buyer -->|"uses"| node_rfq_ui
node_rfq_ui -->|"loads RFQs"| node_http_client
node_rfq_ui -->|"renders forms"| node_entry_forms
node_entry_forms -->|"submits entries"| node_http_client
node_http_client -->|"sends API requests"| node_rfq_routes
node_fastapi_app -->|"registers router"| node_rfq_routes
node_fastapi_app -->|"registers router"| node_health_routes
node_rfq_routes -->|"validates payloads"| node_request_schemas
node_rfq_routes -->|"reads and writes"| node_rfq_repository
node_rfq_routes -->|"evaluates RFQs"| node_quote_evaluation
node_rfq_repository -->|"opens connections"| node_connection
node_health_routes -->|"checks database"| node_connection
node_connection -->|"connects"| node_postgres

click node_rfq_ui "https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/main.jsx"
click node_entry_forms "https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/forms.jsx"
click node_http_client "https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/api.js"
click node_fastapi_app "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/main.py"
click node_rfq_routes "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/routes/rfqs.py"
click node_health_routes "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/routes/health.py"
click node_request_schemas "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/schemas/rfqs.py"
click node_quote_evaluation "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/services/quote_selection.py"
click node_rfq_repository "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/repositories/rfqs.py"
click node_connection "https://github.com/prajwalas1/quote-desk/blob/main/backend/app/core/database.py"

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_ui,node_entry_forms,node_http_client,node_buyer toneBlue
class node_fastapi_app,node_rfq_routes,node_health_routes,node_request_schemas,node_quote_evaluation toneAmber
class node_rfq_repository,node_connection,node_postgres toneMint
```

## Components

### Procurement UI

- [RFQ and quote views](https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Entry forms](https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/forms.jsx): `frontend/src/forms.jsx`
- [API request client](https://github.com/prajwalas1/quote-desk/blob/main/frontend/src/api.js): `frontend/src/api.js`

### API and evaluation

- [API application](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/main.py): `backend/app/main.py`
- [RFQ routes](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/routes/rfqs.py): `backend/app/routes/rfqs.py`
- [Health routes](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/routes/health.py): `backend/app/routes/health.py`
- [Request validation](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/schemas/rfqs.py): `backend/app/schemas/rfqs.py`
- [Status and winner](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/services/quote_selection.py): `backend/app/services/quote_selection.py`

### Persistence

- [RFQ and quote repository](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/repositories/rfqs.py): `backend/app/repositories/rfqs.py`
- [Database connection](https://github.com/prajwalas1/quote-desk/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- **Neon PostgreSQL**

### Other components

- **Procurement user**

## Connections

- Procurement user → RFQ and quote views: uses (evidence: `frontend/src/main.jsx`)
- RFQ and quote views → API request client: loads RFQs (evidence: `frontend/src/main.jsx`)
- RFQ and quote views → Entry forms: renders forms (evidence: `frontend/src/main.jsx`)
- Entry forms → API request client: submits entries (evidence: `frontend/src/forms.jsx`)
- API request client → RFQ routes: sends API requests (evidence: `README.md`)
- API application → RFQ routes: registers router (evidence: `backend/app/main.py`)
- API application → Health routes: registers router (evidence: `backend/app/main.py`)
- RFQ routes → Request validation: validates payloads (evidence: `backend/app/routes/rfqs.py`)
- RFQ routes → RFQ and quote repository: reads and writes (evidence: `backend/app/routes/rfqs.py`)
- RFQ routes → Status and winner: evaluates RFQs (evidence: `backend/app/routes/rfqs.py`)
- RFQ and quote repository → Database connection: opens connections (evidence: `backend/app/repositories/rfqs.py`)
- Health routes → Database connection: checks database (evidence: `backend/app/routes/health.py`)
- Database connection → Neon PostgreSQL: connects (evidence: `backend/app/core/database.py`)
