# abigduck495/ocampo-construction-supply architecture

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

- Interactive diagram: https://gitdiagram.com/abigduck495/ocampo-construction-supply
- Repository: https://github.com/abigduck495/ocampo-construction-supply

## Overview

Ocampo Construction Supply is a web-based inventory, point-of-sale, order-tracking, delivery, and dispatch system. Staff use its web interface to manage stock and orders; checkout records payment and order details, while delivery orders can be dispatched to drivers and tracked through delivery. Reporting and receipt printing are supporting capabilities. The tree and sampled excerpts support these subsystem boundaries, but most route mappings and controller interactions were not sampled, so uncertain wiring is omitted.

Main entry points: [`routes/web.php`](https://github.com/abigduck495/ocampo-construction-supply/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/TransactionController.php`](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/TransactionController.php) (Checkout and payments), [`app/Http/Controllers/InventoryController.php`](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/InventoryController.php) (Inventory management), [`app/Http/Controllers/ReportController.php`](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/ReportController.php) (Reporting and exports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sales["Sales and Orders"]
  node_transaction_controller["Checkout and payments"]
  node_order_controller["Order management"]
  node_order_models["Orders and items<br/>[Order.php]"]
  node_transaction_model["Transaction records<br/>[Transaction.php]"]
end

subgraph group_stock["Products and Inventory"]
  node_inventory_controller["Inventory management"]
  node_product_controller["Product management"]
  node_inventory_model["Inventory and products<br/>[Inventory.php]"]
  node_product_model["Product records<br/>[Product.php]"]
end

subgraph group_delivery["Dispatch and Delivery"]
  node_dispatch_controller["Dispatch management"]
  node_driver_delivery_controller["Driver delivery API"]
  node_delivery_controller["Delivery records"]
  node_dispatch_models["Dispatch and crew<br/>[Dispatch.php]"]
end

subgraph group_operations["Reports and Settings"]
  node_report_controller["Reporting and exports"]
  node_report_job["Daily report job"]
  node_report_model["Report records<br/>[Report.php]"]
  node_settings_controller["System settings"]
  node_settings_service["Settings service<br/>[SystemSettings.php]"]
  node_printer_controller["Receipt printing"]
  node_printer_model["Printer configuration<br/>[Printer.php]"]
end

subgraph group_interface["Web Interface"]
  node_web["Web pages"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_api_routes["API routes<br/>[api.php]"]
  node_inventory_ui["Inventory interface<br/>[inventory.js]"]
  node_pos_ui["POS interface<br/>[pos.js]"]
  node_delivery_ui["Delivery interface<br/>[deliveries.js]"]
  node_dispatch_ui["Dispatch interface<br/>[dispatch.js]"]
  node_reports_ui["Reports interface<br/>[reports.js]"]
end

node_staff(("Staff user"))
node_database[("Application database")]
node_printer_device["Receipt printer"]

node_staff -->|"uses"| node_web
node_web -->|"submits requests"| node_web_routes
node_web_routes -->|"routes requests"| node_inventory_controller
node_web_routes -->|"routes requests"| node_transaction_controller
node_web_routes -->|"routes requests"| node_dispatch_controller
node_web_routes -->|"routes requests"| node_report_controller
node_web_routes -->|"routes requests"| node_settings_controller
node_inventory_ui -->|"requests stock"| node_inventory_controller
node_pos_ui -->|"submits checkout"| node_transaction_controller
node_delivery_ui -->|"requests delivery data"| node_delivery_controller
node_dispatch_ui -->|"manages dispatch"| node_dispatch_controller
node_reports_ui -->|"requests reports"| node_report_controller
node_inventory_controller -->|"reads and updates"| node_inventory_model
node_inventory_controller -->|"reads product"| node_product_model
node_product_controller -->|"manages products"| node_product_model
node_transaction_controller -->|"checks stock"| node_product_model
node_transaction_controller -->|"creates orders"| node_order_models
node_transaction_controller -->|"records payment"| node_transaction_model
node_order_controller -->|"manages orders"| node_order_models
node_dispatch_controller -->|"manages dispatch"| node_dispatch_models
node_driver_delivery_controller -->|"reads and updates"| node_dispatch_models
node_delivery_controller -->|"manages delivery records"| node_dispatch_models
node_report_controller -->|"queries reports"| node_report_model
node_report_controller -->|"runs generation"| node_report_job
node_report_job -->|"generates reports"| node_report_model
node_settings_controller -->|"uses settings"| node_settings_service
node_printer_controller -->|"manages printers"| node_printer_model
node_printer_controller -.->|"prints receipt data"| node_printer_device
node_inventory_model -->|"stores stock"| node_database
node_product_model -->|"stores products"| node_database
node_order_models -->|"stores orders"| node_database
node_transaction_model -->|"stores transactions"| node_database
node_dispatch_models -->|"stores dispatch data"| node_database
node_report_model -->|"stores reports"| node_database
node_printer_model -->|"stores configuration"| node_database

click node_web "https://github.com/abigduck495/ocampo-construction-supply/tree/main/resources/views"
click node_web_routes "https://github.com/abigduck495/ocampo-construction-supply/blob/main/routes/web.php"
click node_api_routes "https://github.com/abigduck495/ocampo-construction-supply/blob/main/routes/api.php"
click node_inventory_ui "https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/inventory.js"
click node_pos_ui "https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/pos.js"
click node_delivery_ui "https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/deliveries.js"
click node_dispatch_ui "https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/dispatch.js"
click node_reports_ui "https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/reports.js"
click node_inventory_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/InventoryController.php"
click node_product_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/ProductController.php"
click node_inventory_model "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Inventory.php"
click node_product_model "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Product.php"
click node_transaction_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/TransactionController.php"
click node_order_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/OrderController.php"
click node_order_models "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Order.php"
click node_transaction_model "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Transaction.php"
click node_dispatch_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DispatchController.php"
click node_driver_delivery_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DriverDeliveryController.php"
click node_delivery_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DeliveryController.php"
click node_dispatch_models "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Dispatch.php"
click node_report_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/ReportController.php"
click node_report_job "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Jobs/GenerateDailyReportJob.php"
click node_report_model "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Report.php"
click node_settings_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/SettingsController.php"
click node_settings_service "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Services/SystemSettings.php"
click node_printer_controller "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/PrinterController.php"
click node_printer_model "https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Printer.php"

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_transaction_controller,node_order_controller,node_order_models,node_transaction_model,node_staff toneBlue
class node_inventory_controller,node_product_controller,node_inventory_model,node_product_model,node_database toneAmber
class node_dispatch_controller,node_driver_delivery_controller,node_delivery_controller,node_dispatch_models toneMint
class node_report_controller,node_report_job,node_report_model,node_settings_controller,node_settings_service,node_printer_controller,node_printer_model toneRose
class node_web,node_web_routes,node_api_routes,node_inventory_ui,node_pos_ui,node_delivery_ui,node_dispatch_ui,node_reports_ui,node_printer_device toneIndigo
```

## Components

### Sales and Orders

- [Checkout and payments](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/TransactionController.php): `app/Http/Controllers/TransactionController.php`
- [Order management](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Orders and items](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Transaction records](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Transaction.php): `app/Models/Transaction.php`

### Products and Inventory

- [Inventory management](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/InventoryController.php): `app/Http/Controllers/InventoryController.php`
- [Product management](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Inventory and products](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Inventory.php): `app/Models/Inventory.php`
- [Product records](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Product.php): `app/Models/Product.php`

### Dispatch and Delivery

- [Dispatch management](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DispatchController.php): `app/Http/Controllers/DispatchController.php`
- [Driver delivery API](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DriverDeliveryController.php): `app/Http/Controllers/DriverDeliveryController.php`
- [Delivery records](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/DeliveryController.php): `app/Http/Controllers/DeliveryController.php`
- [Dispatch and crew](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Dispatch.php): `app/Models/Dispatch.php`

### Reports and Settings

- [Reporting and exports](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [Daily report job](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Jobs/GenerateDailyReportJob.php): `app/Jobs/GenerateDailyReportJob.php`
- [Report records](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Report.php): `app/Models/Report.php`
- [System settings](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/SettingsController.php): `app/Http/Controllers/SettingsController.php`
- [Settings service](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Services/SystemSettings.php): `app/Services/SystemSettings.php`
- [Receipt printing](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Http/Controllers/PrinterController.php): `app/Http/Controllers/PrinterController.php`
- [Printer configuration](https://github.com/abigduck495/ocampo-construction-supply/blob/main/app/Models/Printer.php): `app/Models/Printer.php`

### Web Interface

- [Web pages](https://github.com/abigduck495/ocampo-construction-supply/tree/main/resources/views): `resources/views`
- [Web routes](https://github.com/abigduck495/ocampo-construction-supply/blob/main/routes/web.php): `routes/web.php`
- [API routes](https://github.com/abigduck495/ocampo-construction-supply/blob/main/routes/api.php): `routes/api.php`
- [Inventory interface](https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/inventory.js): `resources/js/pages/inventory.js`
- [POS interface](https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/pos.js): `resources/js/pages/pos.js`
- [Delivery interface](https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/deliveries.js): `resources/js/pages/deliveries.js`
- [Dispatch interface](https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/dispatch.js): `resources/js/pages/dispatch.js`
- [Reports interface](https://github.com/abigduck495/ocampo-construction-supply/blob/main/resources/js/pages/reports.js): `resources/js/pages/reports.js`

### Other components

- **Staff user**
- **Application database**
- **Receipt printer**

## Connections

- Staff user → Web pages: uses
- Web pages → Web routes: submits requests
- Web routes → Inventory management: routes requests
- Web routes → Checkout and payments: routes requests
- Web routes → Dispatch management: routes requests
- Web routes → Reporting and exports: routes requests
- Web routes → System settings: routes requests
- Inventory interface → Inventory management: requests stock
- POS interface → Checkout and payments: submits checkout
- Delivery interface → Delivery records: requests delivery data
- Dispatch interface → Dispatch management: manages dispatch
- Reports interface → Reporting and exports: requests reports
- Inventory management → Inventory and products: reads and updates
- Inventory management → Product records: reads product
- Product management → Product records: manages products
- Checkout and payments → Product records: checks stock
- Checkout and payments → Orders and items: creates orders
- Checkout and payments → Transaction records: records payment
- Order management → Orders and items: manages orders
- Dispatch management → Dispatch and crew: manages dispatch
- Driver delivery API → Dispatch and crew: reads and updates
- Delivery records → Dispatch and crew: manages delivery records
- Reporting and exports → Report records: queries reports
- Reporting and exports → Daily report job: runs generation
- Daily report job → Report records: generates reports
- System settings → Settings service: uses settings
- Receipt printing → Printer configuration: manages printers
- Receipt printing → Receipt printer: prints receipt data
- Inventory and products → Application database: stores stock
- Product records → Application database: stores products
- Orders and items → Application database: stores orders
- Transaction records → Application database: stores transactions
- Dispatch and crew → Application database: stores dispatch data
- Report records → Application database: stores reports
- Printer configuration → Application database: stores configuration
