# pujaextraaaz/dms architecture

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

- Interactive diagram: https://gitdiagram.com/pujaextraaaz/dms
- Repository: https://github.com/pujaextraaaz/dms

## Overview

This is a Laravel business application with distribution/ERP workflows and a substantial Tally-style accounting area. The clearest user workflow in the available evidence is order entry through order services, followed by invoicing and payment-related operations; a separate accounting workflow creates and posts vouchers. The tree also exposes purchasing, inventory, CRM, reporting, and accounting synchronization capabilities. Source excerpts and the index support selected controller-to-service links, but routing and many domain implementations were not sampled, so other connections are intentionally omitted.

Main entry points: [`app/Domains/Tally/Services/TallyExportService.php`](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Tally/Services/TallyExportService.php) (Tally export), [`app/Http/Controllers/Order/OrderController.php`](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Order/OrderController.php) (Order entry), [`app/Http/Controllers/Sales/InvoiceController.php`](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Sales/InvoiceController.php) (Invoice handling), [`app/Domains/Master/Models/Customer.php`](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Customer.php) (Customer master)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_erp["ERP Operations"]
  node_purchasing[("Purchase records<br/>[Purchase.php]")]
  node_inventory["Stock movement"]
  node_product_catalog[("Product catalog<br/>[Product.php]")]
  node_uom[("Units of measure<br/>[Uom.php]")]
end

subgraph group_sales["Sales and Parties"]
  node_order_entry["Order entry"]
  node_order_service["Order processing<br/>[OrderService.php]"]
  node_orders[("Orders<br/>[Order.php]")]
  node_customer[("Customer master<br/>[Customer.php]")]
  node_party_address[("Party addresses<br/>[PartyAddress.php]")]
  node_invoicing["Invoice handling"]
  node_payments[("Payments<br/>[Payment.php]")]
  node_crm_upload["Lead bulk upload"]
end

subgraph group_accounting["Accounting"]
  node_voucher_ui["Voucher interface"]
  node_voucher_api["Voucher API"]
  node_voucher_engine["Voucher engine<br/>[VoucherEngine.php]"]
  node_voucher[("Accounting vouchers<br/>[Voucher.php]")]
end

subgraph group_integration["Integrations and Insights"]
  node_reporting["Business reporting"]
  node_tally_export["Tally export"]
  node_sync_queue["Tally sync queue<br/>[TallySyncQueue.php]"]
  node_sync_job["Tally sync job"]
end

node_user(("Business user"))

node_user -.->|"enters orders"| node_order_entry
node_order_entry -->|"delegates to"| node_order_service
node_order_entry -->|"uses"| node_orders
node_order_entry -->|"reads"| node_customer
node_order_entry -->|"uses"| node_uom
node_order_entry -->|"prices products"| node_product_catalog
node_invoicing -->|"moves stock"| node_inventory
node_invoicing -->|"reads"| node_customer
node_invoicing -->|"uses payment links"| node_payments
node_invoicing -->|"prices products"| node_product_catalog
node_customer -->|"has addresses"| node_party_address
node_voucher_ui -->|"calls"| node_voucher_engine
node_voucher_api -->|"calls"| node_voucher_engine
node_voucher_engine -->|"creates and posts"| node_voucher
node_tally_export -->|"exports"| node_orders
node_tally_export -->|"exports"| node_purchasing
node_tally_export -->|"exports"| node_payments
node_tally_export -->|"exports"| node_product_catalog
node_tally_export -->|"queues sync"| node_sync_queue
node_tally_export -->|"dispatches"| node_sync_job
node_crm_upload -->|"checks party data"| node_customer

click node_order_entry "https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Order/OrderController.php"
click node_order_service "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Order/Services/OrderService.php"
click node_orders "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Order/Models/Order.php"
click node_customer "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Customer.php"
click node_party_address "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/PartyAddress.php"
click node_invoicing "https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Sales/InvoiceController.php"
click node_payments "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Payment/Models/Payment.php"
click node_purchasing "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Inventory/Models/Purchase.php"
click node_inventory "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Inventory/Services/StockMovementService.php"
click node_product_catalog "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Product.php"
click node_uom "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Uom.php"
click node_crm_upload "https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Crm/LeadBulkUploadController.php"
click node_reporting "https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Reporting/ReportController.php"
click node_voucher_ui "https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Http/Controllers/VoucherController.php"
click node_voucher_api "https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Http/Controllers/Api/V1/VoucherController.php"
click node_voucher_engine "https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Accounting/VoucherEngine.php"
click node_voucher "https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Models/Voucher.php"
click node_tally_export "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Tally/Services/TallyExportService.php"
click node_sync_queue "https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Tally/Models/TallySyncQueue.php"
click node_sync_job "https://github.com/pujaextraaaz/dms/blob/master/app/Jobs/ProcessTallySyncJob.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_purchasing,node_inventory,node_product_catalog,node_uom,node_user toneBlue
class node_order_entry,node_order_service,node_orders,node_customer,node_party_address,node_invoicing,node_payments,node_crm_upload toneAmber
class node_voucher_ui,node_voucher_api,node_voucher_engine,node_voucher toneMint
class node_reporting,node_tally_export,node_sync_queue,node_sync_job toneRose
```

## Components

### ERP Operations

- [Purchase records](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Inventory/Models/Purchase.php): `app/Domains/Inventory/Models/Purchase.php`
- [Stock movement](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Inventory/Services/StockMovementService.php): `app/Domains/Inventory/Services/StockMovementService.php`
- [Product catalog](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Product.php): `app/Domains/Master/Models/Product.php`
- [Units of measure](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Uom.php): `app/Domains/Master/Models/Uom.php`

### Sales and Parties

- [Order entry](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Order/OrderController.php): `app/Http/Controllers/Order/OrderController.php`
- [Order processing](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Order/Services/OrderService.php): `app/Domains/Order/Services/OrderService.php`
- [Orders](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Order/Models/Order.php): `app/Domains/Order/Models/Order.php`
- [Customer master](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/Customer.php): `app/Domains/Master/Models/Customer.php`
- [Party addresses](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Master/Models/PartyAddress.php): `app/Domains/Master/Models/PartyAddress.php`
- [Invoice handling](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Sales/InvoiceController.php): `app/Http/Controllers/Sales/InvoiceController.php`
- [Payments](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Payment/Models/Payment.php): `app/Domains/Payment/Models/Payment.php`
- [Lead bulk upload](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Crm/LeadBulkUploadController.php): `app/Http/Controllers/Crm/LeadBulkUploadController.php`

### Accounting

- [Voucher interface](https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Http/Controllers/VoucherController.php): `app/Tally/Http/Controllers/VoucherController.php`
- [Voucher API](https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Http/Controllers/Api/V1/VoucherController.php): `app/Tally/Http/Controllers/Api/V1/VoucherController.php`
- [Voucher engine](https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Accounting/VoucherEngine.php): `app/Tally/Accounting/VoucherEngine.php`
- [Accounting vouchers](https://github.com/pujaextraaaz/dms/blob/master/app/Tally/Models/Voucher.php): `app/Tally/Models/Voucher.php`

### Integrations and Insights

- [Business reporting](https://github.com/pujaextraaaz/dms/blob/master/app/Http/Controllers/Reporting/ReportController.php): `app/Http/Controllers/Reporting/ReportController.php`
- [Tally export](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Tally/Services/TallyExportService.php): `app/Domains/Tally/Services/TallyExportService.php`
- [Tally sync queue](https://github.com/pujaextraaaz/dms/blob/master/app/Domains/Tally/Models/TallySyncQueue.php): `app/Domains/Tally/Models/TallySyncQueue.php`
- [Tally sync job](https://github.com/pujaextraaaz/dms/blob/master/app/Jobs/ProcessTallySyncJob.php): `app/Jobs/ProcessTallySyncJob.php`

### Other components

- **Business user**

## Connections

- Business user → Order entry: enters orders
- Order entry → Order processing: delegates to (evidence: `app/Http/Controllers/Order/OrderController.php`)
- Order entry → Orders: uses (evidence: `app/Http/Controllers/Order/OrderController.php`)
- Order entry → Customer master: reads (evidence: `app/Http/Controllers/Order/OrderController.php`)
- Order entry → Units of measure: uses (evidence: `app/Http/Controllers/Order/OrderController.php`)
- Order entry → Product catalog: prices products (evidence: `app/Http/Controllers/Order/OrderController.php`)
- Invoice handling → Stock movement: moves stock (evidence: `app/Http/Controllers/Sales/InvoiceController.php`)
- Invoice handling → Customer master: reads (evidence: `app/Http/Controllers/Sales/InvoiceController.php`)
- Invoice handling → Payments: uses payment links (evidence: `app/Http/Controllers/Sales/InvoiceController.php`)
- Invoice handling → Product catalog: prices products (evidence: `app/Http/Controllers/Sales/InvoiceController.php`)
- Customer master → Party addresses: has addresses (evidence: `app/Domains/Master/Models/Customer.php`)
- Voucher interface → Voucher engine: calls (evidence: `app/Tally/Http/Controllers/VoucherController.php`)
- Voucher API → Voucher engine: calls (evidence: `app/Tally/Http/Controllers/Api/V1/VoucherController.php`)
- Voucher engine → Accounting vouchers: creates and posts (evidence: `app/Tally/Accounting/VoucherEngine.php`)
- Tally export → Orders: exports (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Tally export → Purchase records: exports (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Tally export → Payments: exports (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Tally export → Product catalog: exports (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Tally export → Tally sync queue: queues sync (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Tally export → Tally sync job: dispatches (evidence: `app/Domains/Tally/Services/TallyExportService.php`)
- Lead bulk upload → Customer master: checks party data (evidence: `app/Http/Controllers/Crm/LeadBulkUploadController.php`)
