# nisalasxlik/laravel-react-erp architecture

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

- Interactive diagram: https://gitdiagram.com/nisalasxlik/laravel-react-erp
- Repository: https://github.com/nisalasxlik/laravel-react-erp

## Overview

Common ERP System is a multi-domain ERP for sales, purchasing, inventory, production, and access control. The main user workflow runs from the dashboard’s routed business screens through API endpoints to domain controllers, which validate and persist business records and return resources. Separate branches cover catalog and pricing, order lifecycle, raw-material receiving and stock, and reporting. The README documents broader purchasing and production capabilities than the sampled implementation excerpts establish; those branches are retained, with uncertain wiring omitted or marked unverified.

Main entry points: [`backend/routes/api.php`](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/routes/api.php) (API routing), [`frontend/src/app.jsx`](https://github.com/nisalasxlik/laravel-react-erp/blob/main/frontend/src/app.jsx) (Route application), [`backend/app/Http/Controllers/Api/ShopifyOrderController.php`](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ShopifyOrderController.php) (Shopify imports), [`backend/app/Http/Controllers/Api/ProductController.php`](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ProductController.php) (Product management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["ERP interface"]
  node_app["Route application<br/>[app.jsx]"]
  node_sales_ui["Sales screens"]
  node_orders_ui["Order screens"]
  node_catalog_ui["Catalog screens"]
  node_inventory_ui["Inventory screens"]
  node_reports_ui["Report screens"]
end

subgraph group_sales["Sales operations"]
  node_sales_api["Sales orders"]
  node_bulk_api["Bulk orders"]
  node_shopify_api["Shopify imports"]
  node_sales_records[("Order records<br/>[SalesOrder.php]")]
  node_customers[("Customer records<br/>[Customer.php]")]
end

subgraph group_catalog["Catalog and pricing"]
  node_product_api["Product management"]
  node_products[("Product catalog<br/>[Product.php]")]
  node_categories[("Product categories")]
  node_pricing[("Pricing models<br/>[PricingType.php]")]
end

subgraph group_supply["Purchasing and inventory"]
  node_raw_api["Raw-material operations"]
  node_grn_api["Goods receiving"]
  node_raw_inventory_api["Raw-material stock"]
  node_bom_api["Bill of materials<br/>[BomController.php]"]
  node_suppliers["Supplier management"]
end

subgraph group_platform["Access and reporting"]
  node_api_routes["API routing<br/>[api.php]"]
  node_users_api["User access<br/>[UserController.php]"]
  node_auth_api["Authentication<br/>[AuthController.php]"]
  node_report_api["Reporting"]
end

node_user(("ERP user"))
node_db[("Application database")]

node_user -.->|"uses"| node_app
node_app -->|"routes to"| node_sales_ui
node_app -->|"routes to"| node_orders_ui
node_app -->|"routes to"| node_catalog_ui
node_app -->|"routes to"| node_inventory_ui
node_app -->|"routes to"| node_reports_ui
node_sales_ui -.->|"requests"| node_api_routes
node_orders_ui -.->|"requests"| node_api_routes
node_catalog_ui -.->|"requests"| node_api_routes
node_inventory_ui -.->|"requests"| node_api_routes
node_reports_ui -.->|"requests"| node_api_routes
node_api_routes -->|"dispatches"| node_sales_api
node_api_routes -->|"dispatches"| node_bulk_api
node_api_routes -->|"dispatches"| node_shopify_api
node_api_routes -->|"dispatches"| node_product_api
node_api_routes -->|"dispatches"| node_raw_api
node_api_routes -->|"dispatches"| node_grn_api
node_api_routes -->|"dispatches"| node_raw_inventory_api
node_api_routes -->|"dispatches"| node_bom_api
node_api_routes -->|"dispatches"| node_suppliers
node_api_routes -->|"dispatches"| node_users_api
node_api_routes -->|"dispatches"| node_auth_api
node_sales_api -->|"writes and loads"| node_sales_records
node_bulk_api -->|"persists orders"| node_db
node_product_api -->|"manages"| node_products
node_shopify_api -->|"upserts"| node_customers
node_shopify_api -->|"upserts"| node_products
node_shopify_api -->|"creates orders"| node_sales_records
node_product_api -->|"uses"| node_categories
node_product_api -->|"manages prices"| node_pricing
node_sales_api -.->|"persists records"| node_db
node_raw_api -.->|"persists materials"| node_db
node_grn_api -.->|"records receipts"| node_db
node_raw_inventory_api -.->|"tracks stock"| node_db
node_bom_api -.->|"records BOMs"| node_db
node_suppliers -.->|"manages suppliers"| node_db
node_users_api -.->|"manages users"| node_db
node_auth_api -.->|"authenticates"| node_db
node_report_api -.->|"reads order data"| node_db

click node_app "https://github.com/nisalasxlik/laravel-react-erp/blob/main/frontend/src/app.jsx"
click node_sales_ui "https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/sales_orders"
click node_orders_ui "https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/orders"
click node_catalog_ui "https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/product"
click node_inventory_ui "https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/raw-materials"
click node_reports_ui "https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/reports"
click node_api_routes "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/routes/api.php"
click node_sales_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SalesOrderController.php"
click node_bulk_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/BulkOrderController.php"
click node_shopify_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ShopifyOrderController.php"
click node_sales_records "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/SalesOrder.php"
click node_customers "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/Customer.php"
click node_product_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ProductController.php"
click node_products "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/Product.php"
click node_categories "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/ProductCategory.php"
click node_pricing "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/PricingType.php"
click node_raw_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialController.php"
click node_grn_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialGrnController.php"
click node_raw_inventory_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialInventoryController.php"
click node_bom_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/BomController.php"
click node_suppliers "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SupplierController.php"
click node_users_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/UserController.php"
click node_auth_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/AuthController.php"
click node_report_api "https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SalesOrderController.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_app,node_sales_ui,node_orders_ui,node_catalog_ui,node_inventory_ui,node_reports_ui,node_user toneBlue
class node_sales_api,node_bulk_api,node_shopify_api,node_sales_records,node_customers,node_db toneAmber
class node_product_api,node_products,node_categories,node_pricing toneMint
class node_raw_api,node_grn_api,node_raw_inventory_api,node_bom_api,node_suppliers toneRose
class node_api_routes,node_users_api,node_auth_api,node_report_api toneIndigo
```

## Components

### ERP interface

- [Route application](https://github.com/nisalasxlik/laravel-react-erp/blob/main/frontend/src/app.jsx): `frontend/src/app.jsx`
- [Sales screens](https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/sales_orders): `frontend/src/pages/sales_orders`
- [Order screens](https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/orders): `frontend/src/pages/orders`
- [Catalog screens](https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/product): `frontend/src/pages/product`
- [Inventory screens](https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/raw-materials): `frontend/src/pages/raw-materials`
- [Report screens](https://github.com/nisalasxlik/laravel-react-erp/tree/main/frontend/src/pages/reports): `frontend/src/pages/reports`

### Sales operations

- [Sales orders](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SalesOrderController.php): `backend/app/Http/Controllers/Api/SalesOrderController.php`
- [Bulk orders](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/BulkOrderController.php): `backend/app/Http/Controllers/Api/BulkOrderController.php`
- [Shopify imports](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ShopifyOrderController.php): `backend/app/Http/Controllers/Api/ShopifyOrderController.php`
- [Order records](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/SalesOrder.php): `backend/app/Models/SalesOrder.php`
- [Customer records](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/Customer.php): `backend/app/Models/Customer.php`

### Catalog and pricing

- [Product management](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/ProductController.php): `backend/app/Http/Controllers/Api/ProductController.php`
- [Product catalog](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/Product.php): `backend/app/Models/Product.php`
- [Product categories](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/ProductCategory.php): `backend/app/Models/ProductCategory.php`
- [Pricing models](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Models/PricingType.php): `backend/app/Models/PricingType.php`

### Purchasing and inventory

- [Raw-material operations](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialController.php): `backend/app/Http/Controllers/Api/RawMaterialController.php`
- [Goods receiving](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialGrnController.php): `backend/app/Http/Controllers/Api/RawMaterialGrnController.php`
- [Raw-material stock](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/RawMaterialInventoryController.php): `backend/app/Http/Controllers/Api/RawMaterialInventoryController.php`
- [Bill of materials](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/BomController.php): `backend/app/Http/Controllers/Api/BomController.php`
- [Supplier management](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SupplierController.php): `backend/app/Http/Controllers/Api/SupplierController.php`

### Access and reporting

- [API routing](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [User access](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/UserController.php): `backend/app/Http/Controllers/Api/UserController.php`
- [Authentication](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/AuthController.php): `backend/app/Http/Controllers/Api/AuthController.php`
- [Reporting](https://github.com/nisalasxlik/laravel-react-erp/blob/main/backend/app/Http/Controllers/Api/SalesOrderController.php): `backend/app/Http/Controllers/Api/SalesOrderController.php`

### Other components

- **ERP user**
- **Application database**

## Connections

- ERP user → Route application: uses
- Route application → Sales screens: routes to (evidence: `frontend/src/app.jsx`)
- Route application → Order screens: routes to (evidence: `frontend/src/app.jsx`)
- Route application → Catalog screens: routes to (evidence: `frontend/src/app.jsx`)
- Route application → Inventory screens: routes to (evidence: `frontend/src/app.jsx`)
- Route application → Report screens: routes to (evidence: `frontend/src/app.jsx`)
- Sales screens → API routing: requests
- Order screens → API routing: requests
- Catalog screens → API routing: requests
- Inventory screens → API routing: requests
- Report screens → API routing: requests
- API routing → Sales orders: dispatches (evidence: `backend/routes/api.php`)
- API routing → Bulk orders: dispatches (evidence: `backend/routes/api.php`)
- API routing → Shopify imports: dispatches (evidence: `backend/routes/api.php`)
- API routing → Product management: dispatches (evidence: `backend/routes/api.php`)
- API routing → Raw-material operations: dispatches (evidence: `backend/routes/api.php`)
- API routing → Goods receiving: dispatches (evidence: `backend/routes/api.php`)
- API routing → Raw-material stock: dispatches (evidence: `backend/routes/api.php`)
- API routing → Bill of materials: dispatches (evidence: `backend/routes/api.php`)
- API routing → Supplier management: dispatches (evidence: `backend/routes/api.php`)
- API routing → User access: dispatches (evidence: `backend/routes/api.php`)
- API routing → Authentication: dispatches (evidence: `backend/routes/api.php`)
- Sales orders → Order records: writes and loads (evidence: `backend/app/Http/Controllers/Api/SalesOrderController.php`)
- Bulk orders → Application database: persists orders (evidence: `backend/app/Http/Controllers/Api/BulkOrderController.php`)
- Product management → Product catalog: manages (evidence: `backend/app/Http/Controllers/Api/ProductController.php`)
- Shopify imports → Customer records: upserts (evidence: `backend/app/Http/Controllers/Api/ShopifyOrderController.php`)
- Shopify imports → Product catalog: upserts (evidence: `backend/app/Http/Controllers/Api/ShopifyOrderController.php`)
- Shopify imports → Order records: creates orders (evidence: `backend/app/Http/Controllers/Api/ShopifyOrderController.php`)
- Product management → Product categories: uses (evidence: `backend/app/Http/Controllers/Api/ProductController.php`)
- Product management → Pricing models: manages prices (evidence: `backend/app/Http/Controllers/Api/ProductController.php`)
- Sales orders → Application database: persists records
- Raw-material operations → Application database: persists materials
- Goods receiving → Application database: records receipts
- Raw-material stock → Application database: tracks stock
- Bill of materials → Application database: records BOMs
- Supplier management → Application database: manages suppliers
- User access → Application database: manages users
- Authentication → Application database: authenticates
- Reporting → Application database: reads order data
