How ali00209/laravel_dms works
DMS is a multi-tenant retail and distribution operations API. Users work within an organization and selected business context; API requests manage catalog, pricing, stock, and business documents through approval and posting, with accounting and logistics capabilities around that lifecycle. The graph highlights documented domain stages and sampled service calls. Several subsystems are represented at directory level because their implementation was not excerpted; those links are included only where the README or source index supports them.
Main entry points: StockMovementService.php Stock movement · BaseApiController.php API base · AccountingService.php Double-entry accounting · InventoryBalance.php Stock balances
Components 20
Access and organization
- API base
app/Http/Controllers/v1/api/BaseApiController.php - Identity and context
app/Services/Auth - Organization hierarchy
app/Models/Core/Organization.php
Inventory and pricing
- Product catalog
app/Models/Inventory/ProductVariant.php - Stock balances
app/Models/Inventory/InventoryBalance.php - Stock queries
app/Services/Inventory/StockQueryService.php - Reservations
app/Services/Inventory/Reservation/ReservationEngine.php - Stock movement
app/Services/Inventory/Core/StockMovementService.php - Stock valuation
app/Services/Inventory/Valuation - Pricing and promotions
app/Services/Inventory/Pricing
Documents and logistics
- Sales API
app/Http/Controllers/v1/api/Voucher/SaleOrderController.php - Sales workflow
app/Services/Voucher - Purchasing documents
app/Models/Vouchers/PurchaseOrder.php - Delivery and returns
app/Http/Controllers/v1/api/Logistics - Document workflow
app/Traits/HasDocumentWorkflow.php
Governance and finance
- Policy governance
app/Services/Policy - Accounts API
app/Http/Controllers/v1/api/Account/AccountController.php - Double-entry accounting
app/Services/Accounts/AccountingService.php - Operational reports
app/Services/Accounts/AgingService.php
Other components
- Business user
Connections 16
- Business user → API base: calls API
- API base → Identity and context: checks authorization
app/Http/Controllers/v1/api/BaseApiController.php - Organization hierarchy → Product catalog: owns catalog
app/Models/Core/Organization.php - Stock queries → Stock balances: queries balances
app/Services/Inventory/StockQueryService.php - Reservations → Stock balances: updates reservations
app/Services/Inventory/Reservation/ReservationEngine.php - Stock movement → Stock balances: updates balances
app/Services/Inventory/Core/StockMovementService.php - Stock valuation → Stock movement: records movements
app/Services/Inventory/Valuation/FefoInventoryEngine.php - Sales API → Sales workflow: calls service
app/Http/Controllers/v1/api/Voucher/SaleOrderController.php - Sales API → Document workflow: advances documents
- Purchasing documents → Stock movement: receives stock
- Delivery and returns → Stock movement: moves goods
- Pricing and promotions → Product catalog: prices products
- Policy governance → API base: governs actions
- Accounts API → Double-entry accounting: calls service
app/Http/Controllers/v1/api/Account/AccountController.php - Double-entry accounting → Operational reports: supplies aging
- Sales workflow → Double-entry accounting: posts journals