# garxpuji/stock-gudang architecture

> Architecture diagram of the GitHub repository garxpuji/stock-gudang, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/garxpuji/stock-gudang
- Repository: https://github.com/garxpuji/stock-gudang

## Overview

This is a Laravel warehouse and ISP logistics inventory system. Staff use routed web screens to manage products and stock, receive and dispatch goods, process returns and damaged items, audit tools, and review reports. Transaction actions implement key stock workflows; Eloquent models persist inventory and operational records. The README documents the broader capabilities, while source excerpts are partial, so links to unsampled subsystems are limited to route registrations, index references, or documented behavior.

Main entry points: [`routes/web.php`](https://github.com/garxpuji/stock-gudang/blob/main/routes/web.php) (Web routes), [`app/Actions/ProcessReturnAction.php`](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/ProcessReturnAction.php) (Returns and QC), [`app/Http/Controllers/ExportController.php`](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ExportController.php) (Reports and exports), [`app/Models/Product.php`](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/Product.php) (Products and serials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Web access"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication and users<br/>[AuthController.php]"]
end

subgraph group_inventory["Inventory operations"]
  node_products["Product catalog"]
  node_inbound["Inbound stock"]
  node_outbound["Outbound dispatch"]
  node_returns["Returns and QC"]
  node_damaged["Damaged goods"]
  node_opname["Stock opname"]
  node_ledger[("Stock mutation ledger<br/>[StockMutation.php]")]
end

subgraph group_assets["Tools and teams"]
  node_tools["Tool assignments<br/>[ToolController.php]"]
  node_tool_actions["Assignment and return actions"]
  node_tool_audits["Tool audits"]
  node_audit_actions["Audit actions"]
  node_teams[("Technician teams<br/>[TechnicianTeam.php]")]
end

subgraph group_insight["Monitoring and reports"]
  node_dashboard["Inventory dashboard"]
  node_exports["Reports and exports"]
end

subgraph group_records["Persistence"]
  node_product_records[("Products and serials<br/>[Product.php]")]
  node_transaction_records[("Stock transactions")]
  node_return_records[("Return records")]
  node_damage_records[("Damage records<br/>[DamagedGood.php]")]
  node_tool_records[("Tools and audits<br/>[Tool.php]")]
end

node_staff(("Warehouse staff"))

node_staff -->|"uses screens"| node_web_routes
node_web_routes -->|"dispatches"| node_auth
node_web_routes -->|"dispatches"| node_products
node_web_routes -->|"dispatches"| node_inbound
node_web_routes -->|"dispatches"| node_outbound
node_web_routes -->|"dispatches"| node_returns
node_web_routes -->|"dispatches"| node_damaged
node_web_routes -->|"dispatches"| node_opname
node_web_routes -->|"dispatches"| node_tools
node_web_routes -->|"dispatches"| node_tool_audits
node_web_routes -->|"dispatches"| node_dashboard
node_web_routes -->|"dispatches"| node_exports
node_tools -->|"invokes"| node_tool_actions
node_tool_audits -->|"invokes"| node_audit_actions
node_tool_audits -->|"loads team data"| node_teams
node_tool_actions -.->|"updates"| node_tool_records
node_audit_actions -.->|"records audit"| node_tool_records
node_outbound -.->|"allocates serials"| node_product_records
node_inbound -.->|"registers stock"| node_product_records
node_returns -->|"records return"| node_return_records
node_returns -->|"updates stock"| node_product_records
node_returns -->|"records damage"| node_damage_records
node_returns -->|"records mutation"| node_ledger
node_damaged -.->|"resolves items"| node_damage_records
node_opname -.->|"records adjustment"| node_ledger
node_dashboard -.->|"summarizes stock"| node_product_records
node_exports -->|"queries products"| node_product_records
node_exports -->|"queries returns"| node_return_records
node_exports -->|"queries damage"| node_damage_records
node_exports -->|"queries tools"| node_tool_records

click node_web_routes "https://github.com/garxpuji/stock-gudang/blob/main/routes/web.php"
click node_auth "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/AuthController.php"
click node_products "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ProductController.php"
click node_inbound "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/StockInController.php"
click node_outbound "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/OutboundStockAction.php"
click node_returns "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/ProcessReturnAction.php"
click node_damaged "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/ResolveDamagedGoodsAction.php"
click node_opname "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/StockOpnameAction.php"
click node_ledger "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/StockMutation.php"
click node_tools "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ToolController.php"
click node_tool_actions "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/AssignToolAction.php"
click node_tool_audits "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ToolAuditController.php"
click node_audit_actions "https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/RecordToolAuditAction.php"
click node_teams "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/TechnicianTeam.php"
click node_dashboard "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/DashboardController.php"
click node_exports "https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ExportController.php"
click node_product_records "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/Product.php"
click node_transaction_records "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/StockInTransaction.php"
click node_return_records "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/ReturnTransaction.php"
click node_damage_records "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/DamagedGood.php"
click node_tool_records "https://github.com/garxpuji/stock-gudang/blob/main/app/Models/Tool.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_web_routes,node_auth toneBlue
class node_products,node_inbound,node_outbound,node_returns,node_damaged,node_opname,node_ledger toneAmber
class node_tools,node_tool_actions,node_tool_audits,node_audit_actions,node_teams toneMint
class node_dashboard,node_exports toneRose
class node_product_records,node_transaction_records,node_return_records,node_damage_records,node_tool_records,node_staff toneIndigo
```

## Components

### Web access

- [Web routes](https://github.com/garxpuji/stock-gudang/blob/main/routes/web.php): `routes/web.php`
- [Authentication and users](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`

### Inventory operations

- [Product catalog](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Inbound stock](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/StockInController.php): `app/Http/Controllers/StockInController.php`
- [Outbound dispatch](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/OutboundStockAction.php): `app/Actions/OutboundStockAction.php`
- [Returns and QC](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/ProcessReturnAction.php): `app/Actions/ProcessReturnAction.php`
- [Damaged goods](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/ResolveDamagedGoodsAction.php): `app/Actions/ResolveDamagedGoodsAction.php`
- [Stock opname](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/StockOpnameAction.php): `app/Actions/StockOpnameAction.php`
- [Stock mutation ledger](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/StockMutation.php): `app/Models/StockMutation.php`

### Tools and teams

- [Tool assignments](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ToolController.php): `app/Http/Controllers/ToolController.php`
- [Assignment and return actions](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/AssignToolAction.php): `app/Actions/AssignToolAction.php`
- [Tool audits](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ToolAuditController.php): `app/Http/Controllers/ToolAuditController.php`
- [Audit actions](https://github.com/garxpuji/stock-gudang/blob/main/app/Actions/RecordToolAuditAction.php): `app/Actions/RecordToolAuditAction.php`
- [Technician teams](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/TechnicianTeam.php): `app/Models/TechnicianTeam.php`

### Monitoring and reports

- [Inventory dashboard](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Reports and exports](https://github.com/garxpuji/stock-gudang/blob/main/app/Http/Controllers/ExportController.php): `app/Http/Controllers/ExportController.php`

### Persistence

- [Products and serials](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Stock transactions](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/StockInTransaction.php): `app/Models/StockInTransaction.php`
- [Return records](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/ReturnTransaction.php): `app/Models/ReturnTransaction.php`
- [Damage records](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/DamagedGood.php): `app/Models/DamagedGood.php`
- [Tools and audits](https://github.com/garxpuji/stock-gudang/blob/main/app/Models/Tool.php): `app/Models/Tool.php`

### Other components

- **Warehouse staff**

## Connections

- Warehouse staff → Web routes: uses screens (evidence: `README.md`)
- Web routes → Authentication and users: dispatches (evidence: `routes/web.php`)
- Web routes → Product catalog: dispatches (evidence: `routes/web.php`)
- Web routes → Inbound stock: dispatches (evidence: `routes/web.php`)
- Web routes → Outbound dispatch: dispatches (evidence: `routes/web.php`)
- Web routes → Returns and QC: dispatches (evidence: `routes/web.php`)
- Web routes → Damaged goods: dispatches (evidence: `routes/web.php`)
- Web routes → Stock opname: dispatches (evidence: `routes/web.php`)
- Web routes → Tool assignments: dispatches (evidence: `routes/web.php`)
- Web routes → Tool audits: dispatches (evidence: `routes/web.php`)
- Web routes → Inventory dashboard: dispatches (evidence: `routes/web.php`)
- Web routes → Reports and exports: dispatches (evidence: `routes/web.php`)
- Tool assignments → Assignment and return actions: invokes (evidence: `app/Http/Controllers/ToolController.php`)
- Tool audits → Audit actions: invokes (evidence: `app/Http/Controllers/ToolAuditController.php`)
- Tool audits → Technician teams: loads team data (evidence: `app/Http/Controllers/ToolAuditController.php`)
- Assignment and return actions → Tools and audits: updates
- Audit actions → Tools and audits: records audit
- Outbound dispatch → Products and serials: allocates serials
- Inbound stock → Products and serials: registers stock
- Returns and QC → Return records: records return (evidence: `app/Actions/ProcessReturnAction.php`)
- Returns and QC → Products and serials: updates stock (evidence: `app/Actions/ProcessReturnAction.php`)
- Returns and QC → Damage records: records damage (evidence: `app/Actions/ProcessReturnAction.php`)
- Returns and QC → Stock mutation ledger: records mutation (evidence: `app/Actions/ProcessReturnAction.php`)
- Damaged goods → Damage records: resolves items
- Stock opname → Stock mutation ledger: records adjustment
- Inventory dashboard → Products and serials: summarizes stock
- Reports and exports → Products and serials: queries products (evidence: `app/Http/Controllers/ExportController.php`)
- Reports and exports → Return records: queries returns (evidence: `app/Http/Controllers/ExportController.php`)
- Reports and exports → Damage records: queries damage (evidence: `app/Http/Controllers/ExportController.php`)
- Reports and exports → Tools and audits: queries tools (evidence: `app/Http/Controllers/ExportController.php`)
