# mitchell1719/rbabc-supply-chain architecture

> Architecture diagram of the GitHub repository mitchell1719/rbabc-supply-chain, 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/mitchell1719/rbabc-supply-chain
- Repository: https://github.com/mitchell1719/rbabc-supply-chain

## Overview

RbabcSupplyChain is an Angular supply-chain operations application. Staff use routed screens to create and progress purchase requests through approvals, HQ consolidation, procurement, delivery, and receiving; they also manage branches, inventory, suppliers, discrepancies, and accounts. Pages use a shared service to access Firestore, while search aggregates several operational records. The route table and sampled pages establish several connections; other stages are included from the route index, but their service interactions are not inferred. Backend function behavior was not sampled.

Main entry points: [`src/app/app.routes.ts`](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/app.routes.ts) (Route table), [`src/app/services/supply-chain.service.ts`](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/supply-chain.service.ts) (Supply-chain service), [`src/app/pages/dm-approvals/dm-approvals.ts`](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/dm-approvals/dm-approvals.ts) (DM approvals), [`src/app/components/search-overlay/search-overlay.ts`](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/components/search-overlay/search-overlay.ts) (Search overlay)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["Angular app<br/>[app.ts]"]
  node_routes["Route table<br/>[app.routes.ts]"]
  node_searchui["Search overlay<br/>[search-overlay.ts]"]
  node_confirmdialog["Confirmation dialog<br/>[confirm-dialog.ts]"]
end

subgraph group_workflow["Request workflow"]
  node_dashboard["Dashboard<br/>[dashboard.ts]"]
  node_requests["Purchase requests"]
  node_newrequest["New request"]
  node_details["Request details<br/>[request-details.ts]"]
  node_dm["DM approvals<br/>[dm-approvals.ts]"]
  node_hq["HQ consolidation"]
  node_prs["PRS<br/>[prs.ts]"]
  node_procurement["Procurement<br/>[procurement.ts]"]
  node_purchaseorders["Purchase orders<br/>[purchase-orders.ts]"]
  node_deliveries["Deliveries<br/>[deliveries.ts]"]
  node_receiving["Receiving<br/>[receiving.ts]"]
  node_discrepancies["Discrepancies<br/>[discrepancies.ts]"]
end

subgraph group_operations["Supply operations"]
  node_inventory["Inventory<br/>[inventory.ts]"]
  node_branches["Branches<br/>[branches.ts]"]
  node_suppliers["Suppliers<br/>[suppliers.ts]"]
  node_soa["Statements of account<br/>[soa.ts]"]
  node_reports["Reports<br/>[reports.ts]"]
  node_help["Help<br/>[rb-help.ts]"]
  node_settings["Settings<br/>[settings.ts]"]
end

subgraph group_shared["Shared data and utilities"]
  node_service["Supply-chain service"]
  node_firestore[("Firestore")]
  node_model["Domain models"]
  node_search["Search service<br/>[search.service.ts]"]
  node_confirm["Confirmation service<br/>[confirm.service.ts]"]
  node_sharedcomponents["Shared UI components"]
end

node_staff(("Staff"))

node_staff -->|"uses"| node_app
node_app -.->|"hosts"| node_routes
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_requests
node_routes -->|"routes to"| node_newrequest
node_routes -->|"routes to"| node_details
node_routes -->|"routes to"| node_dm
node_routes -->|"routes to"| node_hq
node_routes -->|"routes to"| node_prs
node_routes -->|"routes to"| node_procurement
node_routes -->|"routes to"| node_purchaseorders
node_routes -->|"routes to"| node_deliveries
node_routes -->|"routes to"| node_receiving
node_routes -->|"routes to"| node_discrepancies
node_routes -->|"routes to"| node_inventory
node_routes -->|"routes to"| node_branches
node_routes -->|"routes to"| node_suppliers
node_routes -->|"routes to"| node_soa
node_routes -->|"routes to"| node_reports
node_routes -->|"routes to"| node_settings
node_routes -->|"routes to"| node_help
node_dm -->|"loads and updates"| node_service
node_dm -->|"requests confirmation"| node_confirm
node_branches -->|"loads and saves"| node_service
node_searchui -->|"searches"| node_search
node_searchui -.->|"navigates via"| node_routes
node_search -->|"queries records"| node_service
node_service -->|"reads and writes"| node_firestore
node_service -->|"uses types"| node_model
node_confirmdialog -->|"displays state"| node_confirm

click node_app "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/app.ts"
click node_routes "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/app.routes.ts"
click node_dashboard "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/dashboard/dashboard.ts"
click node_requests "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/purchase-requests/purchase-requests.ts"
click node_newrequest "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/new-purchase-request/new-purchase-request.ts"
click node_details "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/request-details/request-details.ts"
click node_dm "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/dm-approvals/dm-approvals.ts"
click node_hq "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/hq-consolidation/hq-consolidation.ts"
click node_prs "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/prs/prs.ts"
click node_procurement "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/procurement/procurement.ts"
click node_purchaseorders "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/purchase-orders/purchase-orders.ts"
click node_deliveries "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/deliveries/deliveries.ts"
click node_receiving "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/receiving/receiving.ts"
click node_discrepancies "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/discrepancies/discrepancies.ts"
click node_inventory "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/inventory/inventory.ts"
click node_branches "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/branches/branches.ts"
click node_suppliers "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/suppliers/suppliers.ts"
click node_soa "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/soa/soa.ts"
click node_reports "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/reports/reports.ts"
click node_service "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/supply-chain.service.ts"
click node_model "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/models/supply-chain.model.ts"
click node_searchui "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/components/search-overlay/search-overlay.ts"
click node_search "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/search.service.ts"
click node_confirm "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/confirm.service.ts"
click node_confirmdialog "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/confirm-dialog/confirm-dialog.ts"
click node_sharedcomponents "https://github.com/mitchell1719/rbabc-supply-chain/tree/main/src/app/components"
click node_help "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/rb-help/rb-help.ts"
click node_settings "https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/settings/settings.ts"

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_app,node_routes,node_searchui,node_confirmdialog toneBlue
class node_dashboard,node_requests,node_newrequest,node_details,node_dm,node_hq,node_prs,node_procurement,node_purchaseorders,node_deliveries,node_receiving,node_discrepancies toneAmber
class node_inventory,node_branches,node_suppliers,node_soa,node_reports,node_help,node_settings toneMint
class node_service,node_firestore,node_model,node_search,node_confirm,node_sharedcomponents toneRose
class node_staff toneIndigo
```

## Components

### Application shell

- [Angular app](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/app.ts): `src/app/app.ts`
- [Route table](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Search overlay](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/components/search-overlay/search-overlay.ts): `src/app/components/search-overlay/search-overlay.ts`
- [Confirmation dialog](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/confirm-dialog/confirm-dialog.ts): `src/app/confirm-dialog/confirm-dialog.ts`

### Request workflow

- [Dashboard](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/dashboard/dashboard.ts): `src/app/pages/dashboard/dashboard.ts`
- [Purchase requests](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/purchase-requests/purchase-requests.ts): `src/app/pages/purchase-requests/purchase-requests.ts`
- [New request](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/new-purchase-request/new-purchase-request.ts): `src/app/pages/new-purchase-request/new-purchase-request.ts`
- [Request details](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/request-details/request-details.ts): `src/app/pages/request-details/request-details.ts`
- [DM approvals](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/dm-approvals/dm-approvals.ts): `src/app/pages/dm-approvals/dm-approvals.ts`
- [HQ consolidation](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/hq-consolidation/hq-consolidation.ts): `src/app/pages/hq-consolidation/hq-consolidation.ts`
- [PRS](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/prs/prs.ts): `src/app/pages/prs/prs.ts`
- [Procurement](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/procurement/procurement.ts): `src/app/pages/procurement/procurement.ts`
- [Purchase orders](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/purchase-orders/purchase-orders.ts): `src/app/pages/purchase-orders/purchase-orders.ts`
- [Deliveries](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/deliveries/deliveries.ts): `src/app/pages/deliveries/deliveries.ts`
- [Receiving](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/receiving/receiving.ts): `src/app/pages/receiving/receiving.ts`
- [Discrepancies](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/discrepancies/discrepancies.ts): `src/app/pages/discrepancies/discrepancies.ts`

### Supply operations

- [Inventory](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/inventory/inventory.ts): `src/app/pages/inventory/inventory.ts`
- [Branches](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/branches/branches.ts): `src/app/pages/branches/branches.ts`
- [Suppliers](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/suppliers/suppliers.ts): `src/app/pages/suppliers/suppliers.ts`
- [Statements of account](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/soa/soa.ts): `src/app/pages/soa/soa.ts`
- [Reports](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/reports/reports.ts): `src/app/pages/reports/reports.ts`
- [Help](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/rb-help/rb-help.ts): `src/app/rb-help/rb-help.ts`
- [Settings](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/pages/settings/settings.ts): `src/app/pages/settings/settings.ts`

### Shared data and utilities

- [Supply-chain service](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/supply-chain.service.ts): `src/app/services/supply-chain.service.ts`
- **Firestore**
- [Domain models](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/models/supply-chain.model.ts): `src/app/models/supply-chain.model.ts`
- [Search service](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/search.service.ts): `src/app/services/search.service.ts`
- [Confirmation service](https://github.com/mitchell1719/rbabc-supply-chain/blob/main/src/app/services/confirm.service.ts): `src/app/services/confirm.service.ts`
- [Shared UI components](https://github.com/mitchell1719/rbabc-supply-chain/tree/main/src/app/components): `src/app/components`

### Other components

- **Staff**

## Connections

- Staff → Angular app: uses
- Angular app → Route table: hosts (evidence: `src/app/app.ts`)
- Route table → Dashboard: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Purchase requests: routes to (evidence: `src/app/app.routes.ts`)
- Route table → New request: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Request details: routes to (evidence: `src/app/app.routes.ts`)
- Route table → DM approvals: routes to (evidence: `src/app/app.routes.ts`)
- Route table → HQ consolidation: routes to (evidence: `src/app/app.routes.ts`)
- Route table → PRS: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Procurement: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Purchase orders: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Deliveries: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Receiving: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Discrepancies: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Inventory: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Branches: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Suppliers: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Statements of account: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Reports: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Settings: routes to (evidence: `src/app/app.routes.ts`)
- Route table → Help: routes to (evidence: `src/app/app.routes.ts`)
- DM approvals → Supply-chain service: loads and updates (evidence: `src/app/pages/dm-approvals/dm-approvals.ts`)
- DM approvals → Confirmation service: requests confirmation (evidence: `src/app/pages/dm-approvals/dm-approvals.ts`)
- Branches → Supply-chain service: loads and saves (evidence: `src/app/pages/branches/branches.ts`)
- Search overlay → Search service: searches (evidence: `src/app/components/search-overlay/search-overlay.ts`)
- Search overlay → Route table: navigates via
- Search service → Supply-chain service: queries records (evidence: `src/app/services/search.service.ts`)
- Supply-chain service → Firestore: reads and writes (evidence: `src/app/services/supply-chain.service.ts`)
- Supply-chain service → Domain models: uses types (evidence: `src/app/services/supply-chain.service.ts`)
- Confirmation dialog → Confirmation service: displays state (evidence: `src/app/confirm-dialog/confirm-dialog.ts`)
