# abisheksap/erp architecture

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

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

## Overview

This is a multi-tenant ERP application covering customer and order management, dispatch, invoicing and finance, inventory and production, workforce operations, marketing, reporting, and Tally integration. The principal user workflow is to access a tenant-scoped web interface, manage customer/order records, and carry operational work through fulfillment and financial tracking. The tree and excerpts establish these product areas, but the README gives no workflow detail and most domain controllers were not sampled; accordingly, uncertain cross-domain transitions are omitted. Dashed links mark the limited, unverified operational progression.

Main entry points: [`jagadamba_101_laravel_modules/routes/web.php`](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/routes/web.php) (Web routing), [`jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php) (Customer management), [`jagadamba_101_laravel_modules/app/Models/Order.php`](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Order.php) (Order records), [`jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php`](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php) (Marketing operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and tenancy"]
  node_web["Web routing<br/>[web.php]"]
  node_tenant["Tenant manager<br/>[TenantManager.php]"]
end

subgraph group_sales["Sales operations"]
  node_customerctl["Customer management"]
  node_customer[("Customer records<br/>[Customer.php]")]
  node_marketing["Marketing operations"]
  node_order[("Order records<br/>[Order.php]")]
  node_orderitem[("Order items<br/>[OrderItem.php]")]
end

subgraph group_fulfillment["Fulfillment and inventory"]
  node_dispatch["Dispatch management"]
  node_dispatchtrip[("Dispatch trips<br/>[DispatchTrip.php]")]
  node_product[("Product catalog<br/>[Product.php]")]
  node_warehouse[("Warehouse records<br/>[Warehouse.php]")]
end

subgraph group_finance["Finance and reporting"]
  node_invoice[("Invoice records<br/>[Invoice.php]")]
  node_ledger[("Ledger entries<br/>[LedgerEntry.php]")]
  node_financectl["Finance operations"]
  node_reporting["ERP reporting"]
end

subgraph group_platform["Workforce and integration"]
  node_employee["Employee management"]
  node_user[("User and roles<br/>[User.php]")]
  node_activity[("Activity log<br/>[ActivityLog.php]")]
  node_tallyapi["Tally API"]
  node_tallyservice["Tally sync service"]
end

node_staff(("ERP users"))
node_agent["Tally agent<br/>[Worker.cs]"]

node_staff -->|"uses"| node_web
node_web -->|"routes to"| node_customerctl
node_web -->|"routes to"| node_marketing
node_web -->|"routes to"| node_dispatch
node_web -->|"routes to"| node_financectl
node_web -->|"routes to"| node_reporting
node_web -->|"routes to"| node_employee
node_customerctl -->|"reads and writes"| node_customer
node_customerctl -->|"reads"| node_order
node_customerctl -->|"reads"| node_invoice
node_customerctl -->|"reads"| node_ledger
node_customerctl -->|"reads"| node_dispatchtrip
node_employee -->|"manages"| node_user
node_employee -->|"records actions"| node_activity
node_customerctl -->|"records actions"| node_activity
node_tallyapi -->|"invokes"| node_tallyservice
node_agent -.->|"syncs with"| node_tallyapi
node_order -.->|"may proceed to"| node_dispatch
node_dispatch -.->|"may produce"| node_invoice
node_order -->|"has items"| node_orderitem
node_product -->|"tracks stock at"| node_warehouse
node_marketing -->|"queries"| node_customer
node_marketing -->|"queries"| node_order

click node_web "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/routes/web.php"
click node_tenant "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Services/TenantManager.php"
click node_customerctl "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php"
click node_customer "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Customer.php"
click node_marketing "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php"
click node_order "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Order.php"
click node_orderitem "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/OrderItem.php"
click node_dispatch "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/DispatchController.php"
click node_dispatchtrip "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/DispatchTrip.php"
click node_product "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Product.php"
click node_warehouse "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Warehouse.php"
click node_invoice "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Invoice.php"
click node_ledger "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/LedgerEntry.php"
click node_financectl "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/FinanceController.php"
click node_reporting "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/ReportController.php"
click node_employee "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/EmployeeController.php"
click node_user "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/User.php"
click node_activity "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/ActivityLog.php"
click node_tallyapi "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/Api/TallySyncApiController.php"
click node_tallyservice "https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Services/TallySyncService.php"
click node_agent "https://github.com/abisheksap/erp/blob/main/jagadamba_108_tally_agent/Worker.cs"

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,node_tenant,node_staff toneBlue
class node_customerctl,node_customer,node_marketing,node_order,node_orderitem toneAmber
class node_dispatch,node_dispatchtrip,node_product,node_warehouse toneMint
class node_invoice,node_ledger,node_financectl,node_reporting toneRose
class node_employee,node_user,node_activity,node_tallyapi,node_tallyservice toneIndigo
class node_agent toneTeal
```

## Components

### Access and tenancy

- [Web routing](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/routes/web.php): `jagadamba_101_laravel_modules/routes/web.php`
- [Tenant manager](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Services/TenantManager.php): `jagadamba_101_laravel_modules/app/Services/TenantManager.php`

### Sales operations

- [Customer management](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`
- [Customer records](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Customer.php): `jagadamba_101_laravel_modules/app/Models/Customer.php`
- [Marketing operations](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php`
- [Order records](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Order.php): `jagadamba_101_laravel_modules/app/Models/Order.php`
- [Order items](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/OrderItem.php): `jagadamba_101_laravel_modules/app/Models/OrderItem.php`

### Fulfillment and inventory

- [Dispatch management](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/DispatchController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/DispatchController.php`
- [Dispatch trips](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/DispatchTrip.php): `jagadamba_101_laravel_modules/app/Models/DispatchTrip.php`
- [Product catalog](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Product.php): `jagadamba_101_laravel_modules/app/Models/Product.php`
- [Warehouse records](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Warehouse.php): `jagadamba_101_laravel_modules/app/Models/Warehouse.php`

### Finance and reporting

- [Invoice records](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/Invoice.php): `jagadamba_101_laravel_modules/app/Models/Invoice.php`
- [Ledger entries](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/LedgerEntry.php): `jagadamba_101_laravel_modules/app/Models/LedgerEntry.php`
- [Finance operations](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/FinanceController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/FinanceController.php`
- [ERP reporting](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/ReportController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/ReportController.php`

### Workforce and integration

- [Employee management](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/EmployeeController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/EmployeeController.php`
- [User and roles](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/User.php): `jagadamba_101_laravel_modules/app/Models/User.php`
- [Activity log](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Models/ActivityLog.php): `jagadamba_101_laravel_modules/app/Models/ActivityLog.php`
- [Tally API](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Http/Controllers/Api/TallySyncApiController.php): `jagadamba_101_laravel_modules/app/Http/Controllers/Api/TallySyncApiController.php`
- [Tally sync service](https://github.com/abisheksap/erp/blob/main/jagadamba_101_laravel_modules/app/Services/TallySyncService.php): `jagadamba_101_laravel_modules/app/Services/TallySyncService.php`

### Other components

- **ERP users**
- [Tally agent](https://github.com/abisheksap/erp/blob/main/jagadamba_108_tally_agent/Worker.cs): `jagadamba_108_tally_agent/Worker.cs`

## Connections

- ERP users → Web routing: uses (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → Customer management: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → Marketing operations: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → Dispatch management: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → Finance operations: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → ERP reporting: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Web routing → Employee management: routes to (evidence: `jagadamba_101_laravel_modules/routes/web.php`)
- Customer management → Customer records: reads and writes (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Customer management → Order records: reads (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Customer management → Invoice records: reads (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Customer management → Ledger entries: reads (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Customer management → Dispatch trips: reads (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Employee management → User and roles: manages (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/EmployeeController.php`)
- Employee management → Activity log: records actions (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/EmployeeController.php`)
- Customer management → Activity log: records actions (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/CustomerController.php`)
- Tally API → Tally sync service: invokes (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/Api/TallySyncApiController.php`)
- Tally agent → Tally API: syncs with
- Order records → Dispatch management: may proceed to
- Dispatch management → Invoice records: may produce
- Order records → Order items: has items (evidence: `jagadamba_101_laravel_modules/app/Models/Order.php`)
- Product catalog → Warehouse records: tracks stock at (evidence: `jagadamba_101_laravel_modules/app/Models/Product.php`)
- Marketing operations → Customer records: queries (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php`)
- Marketing operations → Order records: queries (evidence: `jagadamba_101_laravel_modules/app/Http/Controllers/MarketingController.php`)
