# siesta-hazel/traceflow architecture

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

- Interactive diagram: https://gitdiagram.com/siesta-hazel/traceflow
- Repository: https://github.com/siesta-hazel/traceflow

## Overview

TraceFlow is an inventory and shipment management dashboard. A user works in the React dashboard to view and maintain stock, fulfill an order, and update shipment status; the ASP.NET API handles those requests and persists changes through EF Core. The graph includes the documented inventory and shipment capabilities. Source excerpts show controller-to-context operations and the frontend’s shipment mutations; some frontend loading details and database-provider behavior are only represented where documented or configured.

Main entry points: [`TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs`](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs) (EF data context), [`TraceFlow.API/TraceFlow.API/Program.cs`](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Program.cs) (API host), [`frontend/src/App.jsx`](https://github.com/siesta-hazel/traceflow/blob/main/frontend/src/App.jsx) (Dashboard UI), [`TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs`](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs) (Inventory endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard"]
  node_dashboard["Dashboard UI<br/>[App.jsx]"]
end

subgraph group_api["API workflows"]
  node_inventory_api["Inventory endpoints"]
  node_shipments_api["Shipment endpoints"]
end

subgraph group_domain["Domain and persistence"]
  node_db_context["EF data context"]
  node_products["Product model<br/>[Product.cs]"]
  node_shipments["Shipment model<br/>[Shipment.cs]"]
  node_request_dtos["Request DTOs<br/>[DTOs.cs]"]
  node_database[("SQLite database")]
end

subgraph group_runtime["API runtime"]
  node_api_host["API host<br/>[Program.cs]"]
end

node_user(("Warehouse user"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"calls inventory API"| node_inventory_api
node_dashboard -->|"posts shipment updates"| node_shipments_api
node_api_host -->|"maps controllers"| node_inventory_api
node_api_host -->|"maps controllers"| node_shipments_api
node_api_host -->|"configures context"| node_db_context
node_inventory_api -->|"reads and writes"| node_db_context
node_shipments_api -->|"reads and writes"| node_db_context
node_db_context -->|"maps entity"| node_products
node_db_context -->|"maps entity"| node_shipments
node_api_host -->|"configures SQLite"| node_database
node_shipments -->|"references product"| node_products

click node_dashboard "https://github.com/siesta-hazel/traceflow/blob/main/frontend/src/App.jsx"
click node_api_host "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Program.cs"
click node_inventory_api "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs"
click node_shipments_api "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Controllers/ShipmentsController.cs"
click node_db_context "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs"
click node_products "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/Product.cs"
click node_shipments "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/Shipment.cs"
click node_request_dtos "https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/DTOs.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_dashboard,node_user toneBlue
class node_inventory_api,node_shipments_api toneAmber
class node_db_context,node_products,node_shipments,node_request_dtos,node_database toneMint
class node_api_host toneRose
```

## Components

### Dashboard

- [Dashboard UI](https://github.com/siesta-hazel/traceflow/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### API workflows

- [Inventory endpoints](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs): `TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs`
- [Shipment endpoints](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Controllers/ShipmentsController.cs): `TraceFlow.API/TraceFlow.API/Controllers/ShipmentsController.cs`

### Domain and persistence

- [EF data context](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs): `TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs`
- [Product model](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/Product.cs): `TraceFlow.API/TraceFlow.API/Models/Product.cs`
- [Shipment model](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/Shipment.cs): `TraceFlow.API/TraceFlow.API/Models/Shipment.cs`
- [Request DTOs](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Models/DTOs.cs): `TraceFlow.API/TraceFlow.API/Models/DTOs.cs`
- **SQLite database**

### API runtime

- [API host](https://github.com/siesta-hazel/traceflow/blob/main/TraceFlow.API/TraceFlow.API/Program.cs): `TraceFlow.API/TraceFlow.API/Program.cs`

### Other components

- **Warehouse user**

## Connections

- Warehouse user → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Inventory endpoints: calls inventory API (evidence: `README.md`)
- Dashboard UI → Shipment endpoints: posts shipment updates (evidence: `frontend/src/App.jsx`)
- API host → Inventory endpoints: maps controllers (evidence: `TraceFlow.API/TraceFlow.API/Program.cs`)
- API host → Shipment endpoints: maps controllers (evidence: `TraceFlow.API/TraceFlow.API/Program.cs`)
- API host → EF data context: configures context (evidence: `TraceFlow.API/TraceFlow.API/Program.cs`)
- Inventory endpoints → EF data context: reads and writes (evidence: `TraceFlow.API/TraceFlow.API/Controllers/InventoryController.cs`)
- Shipment endpoints → EF data context: reads and writes (evidence: `TraceFlow.API/TraceFlow.API/Controllers/ShipmentsController.cs`)
- EF data context → Product model: maps entity (evidence: `TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs`)
- EF data context → Shipment model: maps entity (evidence: `TraceFlow.API/TraceFlow.API/Data/TraceFlowDbContext.cs`)
- API host → SQLite database: configures SQLite (evidence: `TraceFlow.API/TraceFlow.API/Program.cs`)
- Shipment model → Product model: references product (evidence: `TraceFlow.API/TraceFlow.API/Models/Shipment.cs`)
