# ibnnuus/woodcraft-erp architecture

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

- Interactive diagram: https://gitdiagram.com/ibnnuus/woodcraft-erp
- Repository: https://github.com/ibnnuus/woodcraft-erp

## Overview

WoodCraft ERP is a web ERP for a wooden-toy manufacturer. The principal workflow links purchasing materials, manufacturing finished goods, and sales fulfillment; HR and dashboard reporting are supporting capabilities. Sampled controllers establish the detailed transitions shown, while the README documents delivery, atomic stock protection and PDF reporting beyond the sampled implementation. Other unsampled feature wiring is not inferred.

Main entry points: [`routes/web.php`](https://github.com/ibnnuus/woodcraft-erp/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Manufacture/ManufacturingOrderController.php`](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Manufacture/ManufacturingOrderController.php) (Manufacturing orders), [`app/Http/Controllers/Sales/QuotationController.php`](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/QuotationController.php) (Quotations), [`app/Http/Controllers/Sales/SalesOrderController.php`](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/SalesOrderController.php) (Sales orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sales["Sales"]
  node_quotation["Quotations"]
  node_salesorders["Sales orders"]
  node_salesdata[("Sales records")]
  node_delivery[("Delivery records<br/>[Pengiriman.php]")]
end

subgraph group_manufacture["Manufacturing"]
  node_products[("Products<br/>[Produk.php]")]
  node_bom[("Bill of materials<br/>[Bom.php]")]
  node_materials[("Raw materials<br/>[BahanBaku.php]")]
  node_mo["Manufacturing orders"]
  node_production[("Production history")]
end

subgraph group_purchasing["Purchasing"]
  node_vendors["Vendor management"]
  node_rfq["RFQ drafts<br/>[RfqController.php]"]
  node_purchaseorders["Purchase orders"]
  node_receipts[("Goods receipts")]
end

subgraph group_operations["Operations"]
  node_dashboard["Dashboard reports"]
  node_hr["HR management"]
  node_employees[("Employee records<br/>[Karyawan.php]")]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_users[("User accounts<br/>[User.php]")]
  node_pdf["PDF rendering"]
end

node_staff(("ERP user"))
node_routes["Web routes<br/>[web.php]"]
node_dompdf["Dompdf"]

node_staff -->|"submits requests"| node_routes
node_routes -->|"dispatches"| node_quotation
node_routes -->|"dispatches"| node_salesorders
node_routes -->|"dispatches"| node_mo
node_routes -->|"dispatches"| node_rfq
node_routes -->|"dispatches"| node_purchaseorders
node_routes -->|"dispatches"| node_hr
node_routes -->|"dispatches"| node_dashboard
node_routes -->|"dispatches"| node_auth
node_quotation -->|"creates orders"| node_salesdata
node_quotation -->|"checks stock"| node_products
node_quotation -->|"redirects shortage"| node_mo
node_quotation -->|"converts quotation"| node_salesorders
node_salesorders -->|"creates and updates"| node_salesdata
node_salesorders -->|"checks and deducts stock"| node_products
node_salesorders -->|"creates shipment"| node_delivery
node_mo -->|"loads recipe"| node_bom
node_mo -->|"checks and locks stock"| node_materials
node_mo -->|"adds finished stock"| node_products
node_rfq -->|"lists vendors"| node_vendors
node_rfq -->|"lists materials"| node_materials
node_rfq -->|"converts draft"| node_purchaseorders
node_purchaseorders -->|"records receipt"| node_receipts
node_purchaseorders -->|"increments stock"| node_materials
node_dashboard -->|"aggregates sales"| node_salesdata
node_dashboard -->|"reports top sellers"| node_products
node_hr -->|"manages records"| node_employees
node_auth -->|"authenticates"| node_users
node_mo -->|"renders MO"| node_pdf
node_purchaseorders -.->|"renders PO PDF"| node_dompdf
node_pdf -.->|"streams PDF"| node_dompdf

click node_routes "https://github.com/ibnnuus/woodcraft-erp/blob/main/routes/web.php"
click node_quotation "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/QuotationController.php"
click node_salesorders "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/SalesOrderController.php"
click node_salesdata "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/PesananPenjualan.php"
click node_delivery "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Pengiriman.php"
click node_products "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Produk.php"
click node_bom "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Bom.php"
click node_materials "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/BahanBaku.php"
click node_mo "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Manufacture/ManufacturingOrderController.php"
click node_production "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/RiwayatProduksi.php"
click node_vendors "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/VendorController.php"
click node_rfq "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/RfqController.php"
click node_purchaseorders "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/PurchaseOrderController.php"
click node_receipts "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/PenerimaanBarang.php"
click node_dashboard "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/DashboardController.php"
click node_hr "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/HumanResource/EmployeeController.php"
click node_employees "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Karyawan.php"
click node_auth "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/AuthController.php"
click node_users "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/User.php"
click node_pdf "https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Manufacture/ManufacturingOrderController.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_quotation,node_salesorders,node_salesdata,node_delivery,node_staff toneBlue
class node_products,node_bom,node_materials,node_mo,node_production toneAmber
class node_vendors,node_rfq,node_purchaseorders,node_receipts,node_routes toneMint
class node_dashboard,node_hr,node_employees,node_auth,node_users,node_pdf toneRose
class node_dompdf toneIndigo
```

## Components

### Sales

- [Quotations](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/QuotationController.php): `app/Http/Controllers/Sales/QuotationController.php`
- [Sales orders](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Sales/SalesOrderController.php): `app/Http/Controllers/Sales/SalesOrderController.php`
- [Sales records](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/PesananPenjualan.php): `app/Models/PesananPenjualan.php`
- [Delivery records](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Pengiriman.php): `app/Models/Pengiriman.php`

### Manufacturing

- [Products](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Produk.php): `app/Models/Produk.php`
- [Bill of materials](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Bom.php): `app/Models/Bom.php`
- [Raw materials](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/BahanBaku.php): `app/Models/BahanBaku.php`
- [Manufacturing orders](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Manufacture/ManufacturingOrderController.php): `app/Http/Controllers/Manufacture/ManufacturingOrderController.php`
- [Production history](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/RiwayatProduksi.php): `app/Models/RiwayatProduksi.php`

### Purchasing

- [Vendor management](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/VendorController.php): `app/Http/Controllers/Purchase/VendorController.php`
- [RFQ drafts](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/RfqController.php): `app/Http/Controllers/Purchase/RfqController.php`
- [Purchase orders](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Purchase/PurchaseOrderController.php): `app/Http/Controllers/Purchase/PurchaseOrderController.php`
- [Goods receipts](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/PenerimaanBarang.php): `app/Models/PenerimaanBarang.php`

### Operations

- [Dashboard reports](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [HR management](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/HumanResource/EmployeeController.php): `app/Http/Controllers/HumanResource/EmployeeController.php`
- [Employee records](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/Karyawan.php): `app/Models/Karyawan.php`
- [Authentication](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [User accounts](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Models/User.php): `app/Models/User.php`
- [PDF rendering](https://github.com/ibnnuus/woodcraft-erp/blob/main/app/Http/Controllers/Manufacture/ManufacturingOrderController.php): `app/Http/Controllers/Manufacture/ManufacturingOrderController.php`

### Other components

- **ERP user**
- [Web routes](https://github.com/ibnnuus/woodcraft-erp/blob/main/routes/web.php): `routes/web.php`
- **Dompdf**

## Connections

- ERP user → Web routes: submits requests
- Web routes → Quotations: dispatches
- Web routes → Sales orders: dispatches
- Web routes → Manufacturing orders: dispatches
- Web routes → RFQ drafts: dispatches
- Web routes → Purchase orders: dispatches
- Web routes → HR management: dispatches
- Web routes → Dashboard reports: dispatches
- Web routes → Authentication: dispatches
- Quotations → Sales records: creates orders
- Quotations → Products: checks stock
- Quotations → Manufacturing orders: redirects shortage
- Quotations → Sales orders: converts quotation
- Sales orders → Sales records: creates and updates
- Sales orders → Products: checks and deducts stock
- Sales orders → Delivery records: creates shipment
- Manufacturing orders → Bill of materials: loads recipe
- Manufacturing orders → Raw materials: checks and locks stock
- Manufacturing orders → Products: adds finished stock
- RFQ drafts → Vendor management: lists vendors
- RFQ drafts → Raw materials: lists materials
- RFQ drafts → Purchase orders: converts draft
- Purchase orders → Goods receipts: records receipt
- Purchase orders → Raw materials: increments stock
- Dashboard reports → Sales records: aggregates sales
- Dashboard reports → Products: reports top sellers
- HR management → Employee records: manages records
- Authentication → User accounts: authenticates
- Manufacturing orders → PDF rendering: renders MO
- Purchase orders → Dompdf: renders PO PDF
- PDF rendering → Dompdf: streams PDF
