# it24102414/build-final architecture

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

- Interactive diagram: https://gitdiagram.com/it24102414/build-final
- Repository: https://github.com/it24102414/build-final

## Overview

BuildWise is a construction-materials lifecycle system spanning procurement, delivery, and quality management. Its principal workflow runs from a material request through approval, RFQ and quotation, supplier recommendation and manager approval, purchase order, receiving, inspection, and non-conformance resolution. React and Flutter clients use the ASP.NET Core API, which persists workflow state in PostgreSQL and integrates with Python agents. The README documents the lifecycle and agent roles; unsampled subsystem paths and implementation-level links are therefore shown only where documented, not inferred from naming.

Main entry points: [`backend/BuildWise.Api`](https://github.com/it24102414/build-final/tree/main/backend/BuildWise.Api) (BuildWise API), [`backend/BuildWise.Api/Controllers/RfqsController.cs`](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/RfqsController.cs) (RFQ And Quotations), [`backend/BuildWise.Api/Services/DeliveryService.cs`](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/DeliveryService.cs) (Delivery And Receiving), [`backend/BuildWise.Api/Services/QualityInspectionService.cs`](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/QualityInspectionService.cs) (Quality Inspection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Clients"]
  node_web["React Web"]
  node_mobile["Flutter Mobile"]
end

subgraph group_procurement["Procurement Lifecycle"]
  node_requests["Material Requests"]
  node_approval["Request Approval"]
  node_rfq["RFQ And Quotations<br/>[RfqsController.cs]"]
  node_supplier_portal["Supplier Portal"]
  node_purchase["Purchase Orders"]
end

subgraph group_operations["Delivery And Quality"]
  node_delivery["Delivery And Receiving<br/>[DeliveryService.cs]"]
  node_inspection["Quality Inspection"]
  node_ncr["Non-Conformance Resolution"]
end

subgraph group_platform["API And Agents"]
  node_api["BuildWise API<br/>[BuildWise.Api]"]
  node_auth["Authentication And RBAC<br/>[AuthService.cs]"]
  node_planning["Procurement Planning"]
  node_analysis["Supplier Analysis Agent<br/>[quotation_agent.py]"]
  node_validation["Procurement Validation"]
  node_delivery_agent["Delivery Discrepancy Agent"]
  node_quality_agent["Quality Risk Agent"]
  node_database[("PostgreSQL")]
end

node_staff(("Project Staff"))
node_supplier(("Suppliers"))
node_manager(("Procurement Manager"))

node_staff -->|"uses"| node_web
node_staff -->|"uses"| node_mobile
node_supplier -->|"uses portal"| node_web
node_web -->|"calls API"| node_api
node_mobile -->|"calls API"| node_api
node_api -->|"persists data"| node_database
node_api -.->|"authenticates"| node_auth
node_staff -->|"submits"| node_requests
node_requests -->|"seeks approval"| node_approval
node_approval -->|"advances to RFQ"| node_rfq
node_rfq -.->|"solicits quotations"| node_supplier_portal
node_supplier -->|"submits quotation"| node_supplier_portal
node_rfq -->|"starts planning"| node_planning
node_planning -->|"delegates analysis"| node_analysis
node_analysis -->|"returns recommendation"| node_validation
node_validation -->|"requests approval"| node_manager
node_manager -->|"approves order"| node_purchase
node_purchase -->|"fulfills order"| node_delivery
node_delivery -->|"checks discrepancies"| node_delivery_agent
node_delivery -->|"receives materials"| node_inspection
node_inspection -->|"assesses risk"| node_quality_agent
node_inspection -->|"records non-conformance"| node_ncr
node_api -.->|"integrates agent"| node_delivery_agent
node_api -.->|"integrates agent"| node_quality_agent

click node_web "https://github.com/it24102414/build-final/tree/main/web/buildwise-web/src"
click node_mobile "https://github.com/it24102414/build-final/tree/main/mobile/buildwise_mobile"
click node_api "https://github.com/it24102414/build-final/tree/main/backend/BuildWise.Api"
click node_auth "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/AuthService.cs"
click node_requests "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/MaterialRequestService.cs"
click node_approval "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/MaterialRequestsController.cs"
click node_rfq "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/RfqsController.cs"
click node_supplier_portal "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/SupplierPortalController.cs"
click node_planning "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/ProcurementPlanningAgentService.cs"
click node_analysis "https://github.com/it24102414/build-final/blob/main/backend/agent_service/quotation_agent.py"
click node_validation "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/ProcurementValidationService.cs"
click node_purchase "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/IntegratedProcurementService.cs"
click node_delivery "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/DeliveryService.cs"
click node_delivery_agent "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/DeliveryAgentService.cs"
click node_inspection "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/QualityInspectionService.cs"
click node_quality_agent "https://github.com/it24102414/build-final/tree/main/backend/agent_service"
click node_ncr "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/QualityInspectionsController.cs"
click node_database "https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Data/ApplicationDbContext.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_web,node_mobile toneBlue
class node_requests,node_approval,node_rfq,node_supplier_portal,node_purchase toneAmber
class node_delivery,node_inspection,node_ncr toneMint
class node_api,node_auth,node_planning,node_analysis,node_validation,node_delivery_agent,node_quality_agent,node_database toneRose
class node_staff,node_supplier,node_manager toneIndigo
```

## Components

### User Clients

- [React Web](https://github.com/it24102414/build-final/tree/main/web/buildwise-web/src): `web/buildwise-web/src`
- [Flutter Mobile](https://github.com/it24102414/build-final/tree/main/mobile/buildwise_mobile): `mobile/buildwise_mobile`

### Procurement Lifecycle

- [Material Requests](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/MaterialRequestService.cs): `backend/BuildWise.Api/Services/MaterialRequestService.cs`
- [Request Approval](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/MaterialRequestsController.cs): `backend/BuildWise.Api/Controllers/MaterialRequestsController.cs`
- [RFQ And Quotations](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/RfqsController.cs): `backend/BuildWise.Api/Controllers/RfqsController.cs`
- [Supplier Portal](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/SupplierPortalController.cs): `backend/BuildWise.Api/Controllers/SupplierPortalController.cs`
- [Purchase Orders](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/IntegratedProcurementService.cs): `backend/BuildWise.Api/Services/IntegratedProcurementService.cs`

### Delivery And Quality

- [Delivery And Receiving](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/DeliveryService.cs): `backend/BuildWise.Api/Services/DeliveryService.cs`
- [Quality Inspection](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/QualityInspectionService.cs): `backend/BuildWise.Api/Services/QualityInspectionService.cs`
- [Non-Conformance Resolution](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Controllers/QualityInspectionsController.cs): `backend/BuildWise.Api/Controllers/QualityInspectionsController.cs`

### API And Agents

- [BuildWise API](https://github.com/it24102414/build-final/tree/main/backend/BuildWise.Api): `backend/BuildWise.Api`
- [Authentication And RBAC](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/AuthService.cs): `backend/BuildWise.Api/Services/AuthService.cs`
- [Procurement Planning](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/ProcurementPlanningAgentService.cs): `backend/BuildWise.Api/Services/ProcurementPlanningAgentService.cs`
- [Supplier Analysis Agent](https://github.com/it24102414/build-final/blob/main/backend/agent_service/quotation_agent.py): `backend/agent_service/quotation_agent.py`
- [Procurement Validation](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/ProcurementValidationService.cs): `backend/BuildWise.Api/Services/ProcurementValidationService.cs`
- [Delivery Discrepancy Agent](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Services/DeliveryAgentService.cs): `backend/BuildWise.Api/Services/DeliveryAgentService.cs`
- [Quality Risk Agent](https://github.com/it24102414/build-final/tree/main/backend/agent_service): `backend/agent_service`
- [PostgreSQL](https://github.com/it24102414/build-final/blob/main/backend/BuildWise.Api/Data/ApplicationDbContext.cs): `backend/BuildWise.Api/Data/ApplicationDbContext.cs`

### Other components

- **Project Staff**
- **Suppliers**
- **Procurement Manager**

## Connections

- Project Staff → React Web: uses (evidence: `README.md`)
- Project Staff → Flutter Mobile: uses (evidence: `README.md`)
- Suppliers → React Web: uses portal (evidence: `README.md`)
- React Web → BuildWise API: calls API (evidence: `README.md`)
- Flutter Mobile → BuildWise API: calls API (evidence: `README.md`)
- BuildWise API → PostgreSQL: persists data (evidence: `README.md`)
- BuildWise API → Authentication And RBAC: authenticates (evidence: `backend/BuildWise.Api/Program.cs`)
- Project Staff → Material Requests: submits (evidence: `README.md`)
- Material Requests → Request Approval: seeks approval (evidence: `README.md`)
- Request Approval → RFQ And Quotations: advances to RFQ (evidence: `README.md`)
- RFQ And Quotations → Supplier Portal: solicits quotations
- Suppliers → Supplier Portal: submits quotation (evidence: `README.md`)
- RFQ And Quotations → Procurement Planning: starts planning (evidence: `README.md`)
- Procurement Planning → Supplier Analysis Agent: delegates analysis (evidence: `README.md`)
- Supplier Analysis Agent → Procurement Validation: returns recommendation (evidence: `README.md`)
- Procurement Validation → Procurement Manager: requests approval (evidence: `README.md`)
- Procurement Manager → Purchase Orders: approves order (evidence: `README.md`)
- Purchase Orders → Delivery And Receiving: fulfills order (evidence: `README.md`)
- Delivery And Receiving → Delivery Discrepancy Agent: checks discrepancies (evidence: `README.md`)
- Delivery And Receiving → Quality Inspection: receives materials (evidence: `README.md`)
- Quality Inspection → Quality Risk Agent: assesses risk (evidence: `README.md`)
- Quality Inspection → Non-Conformance Resolution: records non-conformance (evidence: `README.md`)
- BuildWise API → Delivery Discrepancy Agent: integrates agent (evidence: `backend/BuildWise.Api/Program.cs`)
- BuildWise API → Quality Risk Agent: integrates agent
