# maiwat/hpsjr-sand-gravel-systems architecture

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

- Interactive diagram: https://gitdiagram.com/maiwat/hpsjr-sand-gravel-systems
- Repository: https://github.com/maiwat/hpsjr-sand-gravel-systems

## Overview

This repository documents HPSJR Sand Gravel’s order-to-cash operations through systems analysis and process models; it is not a sampled software runtime. The visible BPMN shows customer actions and an office order flow through stock checking, quoting, reservation, and payment recording, with a shortage/replenishment branch. The README also names six DFD data stores, but the available excerpt does not show their connections or the rest of the process models, so those relationships are omitted.

Main entry points: [`README.md`](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md) (Stock available?)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer actions"]
  node_request["Request material<br/>[README.md]"]
  node_accept_quote["Accept quote<br/>[README.md]"]
  node_pay["Pay cash or cheque<br/>[README.md]"]
end

subgraph group_office["Office order flow"]
  node_order_record["Record order<br/>[README.md]"]
  node_stock_check["Check stock<br/>[README.md]"]
  node_stock_gateway{{"Stock available?<br/>[README.md]"}}
  node_quote_confirm["Quote and confirm<br/>[README.md]"]
  node_reserve_stock["Reserve stock<br/>[README.md]"]
  node_shortage["Shortage replenishment<br/>[README.md]"]
  node_issue_receipt["Issue receipt<br/>[README.md]"]
  node_order_closed(("Order closed<br/>[README.md]"))
end

subgraph group_records["Operational records"]
  node_orders[("Orders<br/>[README.md]")]
  node_stock_ledger[("Stock ledger<br/>[README.md]")]
  node_loading_batch[("Loading and batch<br/>[README.md]")]
  node_delivery_status[("Delivery status<br/>[README.md]")]
  node_payments[("Payments<br/>[README.md]")]
  node_production_batch_log[("Production and batch log<br/>[README.md]")]
end

subgraph group_fulfillment["Fulfillment roles"]
  node_loading_crew["Loading crew<br/>[README.md]"]
  node_driver["Driver<br/>[README.md]"]
end

node_customer(("Customer"))

node_request -->|"sequence flows"| node_accept_quote
node_order_record -->|"sequence flows"| node_stock_check
node_stock_check -->|"checks stock"| node_stock_gateway
node_stock_gateway -->|"yes: continues"| node_quote_confirm
node_quote_confirm -->|"sequence flows"| node_reserve_stock
node_stock_gateway -->|"no: shortage"| node_shortage
node_shortage -->|"stock restored"| node_quote_confirm
node_pay -->|"sequence flows"| node_issue_receipt
node_issue_receipt -->|"sequence flows"| node_order_closed

click node_request "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_accept_quote "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_pay "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_order_record "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_stock_check "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_stock_gateway "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_quote_confirm "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_reserve_stock "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_shortage "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_issue_receipt "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_order_closed "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_orders "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_stock_ledger "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_loading_batch "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_delivery_status "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_payments "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_production_batch_log "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_loading_crew "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"
click node_driver "https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md"

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_request,node_accept_quote,node_pay toneBlue
class node_order_record,node_stock_check,node_stock_gateway,node_quote_confirm,node_reserve_stock,node_shortage,node_issue_receipt,node_order_closed toneAmber
class node_orders,node_stock_ledger,node_loading_batch,node_delivery_status,node_payments,node_production_batch_log toneMint
class node_loading_crew,node_driver toneRose
class node_customer toneIndigo
```

## Components

### Customer actions

- [Request material](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Accept quote](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Pay cash or cheque](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`

### Office order flow

- [Record order](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Check stock](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Stock available?](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Quote and confirm](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Reserve stock](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Shortage replenishment](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Issue receipt](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Order closed](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`

### Operational records

- [Orders](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Stock ledger](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Loading and batch](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Delivery status](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Payments](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Production and batch log](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`

### Fulfillment roles

- [Loading crew](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`
- [Driver](https://github.com/maiwat/hpsjr-sand-gravel-systems/blob/main/README.md): `README.md`

### Other components

- **Customer**

## Connections

- Request material → Accept quote: sequence flows (evidence: `README.md`)
- Record order → Check stock: sequence flows (evidence: `README.md`)
- Check stock → Stock available?: checks stock (evidence: `README.md`)
- Stock available? → Quote and confirm: yes: continues (evidence: `README.md`)
- Quote and confirm → Reserve stock: sequence flows (evidence: `README.md`)
- Stock available? → Shortage replenishment: no: shortage (evidence: `README.md`)
- Shortage replenishment → Quote and confirm: stock restored (evidence: `README.md`)
- Pay cash or cheque → Issue receipt: sequence flows (evidence: `README.md`)
- Issue receipt → Order closed: sequence flows (evidence: `README.md`)
