# nikhil-razdan/alsorg-packing architecture

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

- Interactive diagram: https://gitdiagram.com/nikhil-razdan/alsorg-packing
- Repository: https://github.com/nikhil-razdan/alsorg-packing

## Overview

1. **Repository shape**
   This repo contains three separate application surfaces around one shared operational backend:
   - **`packing/`**: the Spring Boot server and system-of-record
   - **`packing-ui/`**: the main web portal for packing, warehouse, logistics, dashboards, and reports
   - **`ShipTrack/`**: a mobile/field app for dispatch and logistics execution

2. **Backend is the core hub**
   The **`packing/`** project is the central architecture node. It is a Java/Spring Boot application with layered structure:
   - **controllers** expose HTTP APIs
   - **services** implement business rules and orchestration
   - **repositories** persist entities via Spring Data JPA
   - **domain** holds entities and enums for packing, dispatch, logistics, stickers, users, audit, and VenFlow
   - **security/config** handle JWT auth, CORS, timezone, and reverse-proxy/header behavior

3. **Backend domain boundaries**
   The backend is organized by business capability rather than by UI:
   - **Packing / item / packet / sticker**: item lifecycle, QR/sticker generation, sticker history
   - **Warehouse / dispatch**: dispatched items, challans, gate passes, POD files
   - **Logistics**: drivers, vehicles, shifts, trips, trip items, trip locations, expenses
   - **Audit and activity**: audit logs and operational event logs
   - **VenFlow**: a separate workflow domain with stages, status tracking, permissions, and audit logs
   - **Reporting**: dashboard analytics, packing/dispatch reports, inventory aging, exports, schedules

4. **External integration layer**
   The backend also acts as an integration hub:
   - **Zoho Inventory** integration under `integration/zoho`
   - **PDF generation** services for challans, gate passes, stickers, and inventory documents
   - **QR/barcode generation** in a dedicated service package
   - **Email/report scheduling** for automated report delivery
   These are important architectural boundaries because they turn internal operational data into external documents, exports, and third-party inventory data.

5. **Primary web frontend: `packing-ui/`**
   The Vite/React web app is the main operational UI for office/plant users. It is structured as a shell plus business modules:
   - top-level **pages** for login, dashboard, warehouse, dispatched items, users, logistics portal, Zoho items
   - **shell** and shared components for layout, sidebar, header, and protected routing
   - **auth** guards for authentication, role, module, and warehouse-access checks
   - **services/api.js** and feature-specific API clients for all backend calls

6. **Web app module boundaries**
   The web UI is split into distinct operational areas, which map closely to backend domains:
   - **Dashboard**: stats, charts, feeds, alerts, and report viewer components
   - **Packing/Flow**: `bomflow`, `packflow`, and `venflow` modules for production and workflow operations
   - **Logistics**: fleet, drivers, trips, shifts, dispatch challans, reports
   - **Inventory reporting**: inventory command center, master items, aging/report views
   This separation is useful for diagramming because each module is a front-end boundary with its own route tree and access rules, even though all call the same backend.

7. **Mobile app: `ShipTrack/`**
   `ShipTrack` is a React Native app, likely built with Expo/EAS, used for dispatch and logistics execution in the field. Its structure shows:
   - a navigation layer with an app navigator
   - authentication context
   - screens for login, admin dashboard, trips, trip items, dispatch home, dispatch items, scan dispatch, and bulk scan
   - API clients for auth, dispatch, challan download, logistics, live location tracking, and dispatched-item operations
   This app is not the system-of-record; it is a task-focused client for scanning, trip handling, and location/status updates.

8. **End-to-end operational flow**
   The central data flow is:
   **packing item creation → sticker/QR generation → warehouse movement → ready-to-dispatch → challan generation → dispatch/logistics tracking → delivery/completion**
   Both web and mobile clients read and write against this flow, but at different stages:
   - web UI drives creation, review, admin operations, reporting, and approvals
   - mobile app drives field dispatch, scanning, trip progression, and live tracking
   - backend stores the authoritative status transitions and history

9. **Authentication and authorization**
   Both frontends rely on token-based access against the backend’s JWT security layer. The web app has several route/feature guards (`RequireAuth`, `RequireRole`, `RequireModule`, warehouse-access checks), and the mobile app has its own auth context. This means the architecture is permission-centric: access is enforced in both UI and backend, with the backend as the final authority.

10. **Persistence and history tracking**
   The backend uses JPA repositories over a relational database, with entities capturing:
   - users, master items, packets, stickers
   - dispatch/warehouse records
   - trips, drivers, vehicles, expenses
   - audit/activity/history tables
   The presence of audit logs, sticker history, and VenFlow audit records suggests the system is designed to preserve state transitions and operational traceability, not just current status.

11. **Reporting is a first-class subsystem**
   Reporting is not an afterthought; it has dedicated controllers, repositories, services, DTOs, and export utilities. It supports:
   - dashboard metrics and activity feeds
   - packing and dispatch reports
   - combined operational reports
   - inventory aging
   - scheduled report delivery and Excel export
   In an architecture diagram, this should be shown as a read-heavy subsystem fed from the same core operational data store.

12. **Practical diagram view**
   A clear architecture diagram would show:
   - two client layers: **web portal** and **mobile field app**
   - one **Spring Boot backend** in the center
   - one **database** underneath the backend
   - side integrations for **Zoho Inventory**, **PDF/QR generation**, and **email/report scheduling**
   - cross-cutting **JWT security**, **RBAC**, and **audit/history** wrapping all business flows

Main entry points: [`packing/src/main/java/com/alsorg/packing/service`](https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/service) (Services), [`packing-ui/src/components/Layout.jsx`](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/components/Layout.jsx) (Shell), [`packing-ui/src/services/api.js`](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/services/api.js) (API Client), [`packing/src/main/java/com/alsorg/packing/domain/packet/Packet.java`](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/domain/packet/Packet.java) (Operational DB)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Spring Boot Backend"]
  node_backend_api["Controllers<br/>http api"]
  node_backend_service["Services<br/>business logic"]
  node_backend_domain[("Domain Model<br/>entities enums")]
  node_backend_repo[("Repositories<br/>jpa persistence")]
  node_backend_security["Security<br/>jwt config"]
  node_backend_packing["Packing<br/>[PacketService.java]"]
  node_backend_logistics["Logistics<br/>dispatch workflow"]
  node_backend_reporting["Reporting<br/>analytics subsystem"]
  node_backend_venflow["VenFlow<br/>workflow subsystem"]
  node_backend_audit["Audit Trail<br/>history logging"]
end

subgraph group_web["Web Portal"]
  node_web_shell["Shell<br/>react layout<br/>[Layout.jsx]"]
  node_web_auth["Access Guards<br/>auth gates<br/>[RequireAuth.jsx]"]
  node_web_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_web_warehouse["Warehouse<br/>ops module<br/>[WarehousePage.jsx]"]
  node_web_logistics["Logistics Portal<br/>ops module"]
  node_web_venflow["VenFlow UI<br/>workflow module<br/>[VenFlowRoutes.jsx]"]
  node_web_api["API Client<br/>backend client<br/>[api.js]"]
end

subgraph group_mobile["Mobile Field App"]
  node_mobile_nav["Navigator<br/>react native nav<br/>[AppNavigator.jsx]"]
  node_mobile_auth["Auth Context<br/>session state<br/>[AuthContext.jsx]"]
  node_mobile_dispatch["Dispatch Flow<br/>field workflow"]
  node_mobile_trips["Trips<br/>field workflow<br/>[TripsScreen.jsx]"]
  node_mobile_api["Mobile APIs<br/>api clients<br/>[dispatchApi.js]"]
end

subgraph group_integrations["Integrations & Output"]
  node_backend_integration["Zoho Sync<br/>external integration"]
  node_backend_docs["PDF & QR<br/>document generation"]
  node_backend_email["Schedules<br/>email automation<br/>[EmailService.java]"]
  node_backend_db[("Operational DB<br/>relational store<br/>[Packet.java]")]
end

node_web_shell -->|"protects"| node_web_auth
node_web_shell -->|"hosts"| node_web_dashboard
node_web_shell -->|"hosts"| node_web_warehouse
node_web_shell -->|"hosts"| node_web_logistics
node_web_shell -->|"hosts"| node_web_venflow
node_web_dashboard -->|"reads"| node_web_api
node_web_warehouse -->|"writes"| node_web_api
node_web_logistics -->|"writes"| node_web_api
node_web_venflow -->|"reads/writes"| node_web_api
node_web_api -->|"calls"| node_backend_api
node_mobile_nav -->|"uses"| node_mobile_auth
node_mobile_nav -->|"routes"| node_mobile_dispatch
node_mobile_nav -->|"routes"| node_mobile_trips
node_mobile_dispatch -->|"syncs"| node_mobile_api
node_mobile_trips -->|"syncs"| node_mobile_api
node_mobile_api -->|"calls"| node_backend_api
node_backend_api -->|"delegates"| node_backend_service
node_backend_service -->|"orchestrates"| node_backend_domain
node_backend_service -->|"persists"| node_backend_repo
node_backend_service -->|"logs"| node_backend_audit
node_backend_service -->|"implements"| node_backend_packing
node_backend_service -->|"implements"| node_backend_logistics
node_backend_service -->|"implements"| node_backend_reporting
node_backend_service -->|"implements"| node_backend_venflow
node_backend_service -->|"syncs"| node_backend_integration
node_backend_service -->|"generates"| node_backend_docs
node_backend_reporting -->|"schedules"| node_backend_email
node_backend_api -->|"secured by"| node_backend_security
node_backend_repo -->|"stores"| node_backend_db
node_backend_integration -.->|"reflects"| node_backend_db
node_backend_docs -.->|"reads"| node_backend_db
node_backend_reporting -->|"reads"| node_backend_db
node_backend_venflow -->|"stores"| node_backend_db

click node_web_shell "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/components/Layout.jsx"
click node_web_auth "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/auth/RequireAuth.jsx"
click node_web_dashboard "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/Dashboard.jsx"
click node_web_warehouse "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/WarehousePage.jsx"
click node_web_logistics "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/LogisticsPortalPage.jsx"
click node_web_venflow "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/modules/venflow/VenFlowRoutes.jsx"
click node_web_api "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/services/api.js"
click node_mobile_nav "https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/navigation/AppNavigator.jsx"
click node_mobile_auth "https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/auth/AuthContext.jsx"
click node_mobile_dispatch "https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/screens/DispatchHomeScreen.jsx"
click node_mobile_trips "https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/screens/TripsScreen.jsx"
click node_mobile_api "https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/api/dispatchApi.js"
click node_backend_api "https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/controller"
click node_backend_service "https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/service"
click node_backend_domain "https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/domain"
click node_backend_repo "https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/repository"
click node_backend_security "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/config/SecurityConfig.java"
click node_backend_packing "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/PacketService.java"
click node_backend_logistics "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/LogisticsDispatchTripService.java"
click node_backend_reporting "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/reporting/service/ReportSchedulerService.java"
click node_backend_venflow "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/VenFlowService.java"
click node_backend_audit "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/AuditLogService.java"
click node_backend_integration "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/integration/zoho/ZohoInventoryClient.java"
click node_backend_docs "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/pdf/ChalaanPdfService.java"
click node_backend_email "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/reporting/service/EmailService.java"
click node_backend_db "https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/domain/packet/Packet.java"

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_backend_api,node_backend_service,node_backend_domain,node_backend_repo,node_backend_security,node_backend_packing,node_backend_logistics,node_backend_reporting,node_backend_venflow,node_backend_audit toneBlue
class node_web_shell,node_web_auth,node_web_dashboard,node_web_warehouse,node_web_logistics,node_web_venflow,node_web_api toneAmber
class node_mobile_nav,node_mobile_auth,node_mobile_dispatch,node_mobile_trips,node_mobile_api toneMint
class node_backend_integration,node_backend_docs,node_backend_email,node_backend_db toneRose
```

## Components

### Spring Boot Backend

Central system-of-record for packing, dispatch, logistics, VenFlow, reporting, and integrations.

- [Controllers](https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/controller): http api · HTTP boundary for auth, packing, warehouse, logistics, reporting, and integrations. · `packing/src/main/java/com/alsorg/packing/controller`
- [Services](https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/service): business logic · Business rules, orchestration, and workflow coordination. · `packing/src/main/java/com/alsorg/packing/service`
- [Domain Model](https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/domain): entities enums · Core entities and enums for items, packets, dispatch, logistics, stickers, users, and VenFlow. · `packing/src/main/java/com/alsorg/packing/domain`
- [Repositories](https://github.com/nikhil-razdan/alsorg-packing/tree/main/packing/src/main/java/com/alsorg/packing/repository): jpa persistence · Spring Data repositories over the operational database. · `packing/src/main/java/com/alsorg/packing/repository`
- [Security](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/config/SecurityConfig.java): jwt config · JWT authentication, CORS, forwarded headers, and timezone configuration. · `packing/src/main/java/com/alsorg/packing/config/SecurityConfig.java`
- [Packing](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/PacketService.java): packing workflow · Packet lifecycle, item handling, sticker history, and scanning. · `packing/src/main/java/com/alsorg/packing/service/PacketService.java`
- [Logistics](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/LogisticsDispatchTripService.java): dispatch workflow · Drivers, vehicles, shifts, trips, trip items, locations, and expenses. · `packing/src/main/java/com/alsorg/packing/service/LogisticsDispatchTripService.java`
- [Reporting](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/reporting/service/ReportSchedulerService.java): analytics subsystem · Dashboard metrics, packing and dispatch reports, inventory aging, exports, and schedules. · `packing/src/main/java/com/alsorg/packing/reporting/service/ReportSchedulerService.java`
- [VenFlow](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/VenFlowService.java): workflow subsystem · Independent workflow domain with stages, permissions, and audit tracking. · `packing/src/main/java/com/alsorg/packing/service/VenFlowService.java`
- [Audit Trail](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/AuditLogService.java): history logging · Audit and activity logging for operational traceability. · `packing/src/main/java/com/alsorg/packing/service/AuditLogService.java`

### Web Portal

Primary React portal for office and warehouse operations.

- [Shell](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/components/Layout.jsx): react layout · App shell, navigation, and protected routing for the portal. · `packing-ui/src/components/Layout.jsx`
- [Access Guards](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/auth/RequireAuth.jsx): auth gates · Route and feature guards for auth, role, module, and warehouse access. · `packing-ui/src/auth/RequireAuth.jsx`
- [Dashboard](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/Dashboard.jsx): ops dashboard · Stats, charts, feeds, reports, and operational visibility. · `packing-ui/src/pages/Dashboard.jsx`
- [Warehouse](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/WarehousePage.jsx): ops module · Warehouse operations and packing/dispatch workflow entry points. · `packing-ui/src/pages/WarehousePage.jsx`
- [Logistics Portal](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/pages/LogisticsPortalPage.jsx): ops module · Fleet, drivers, trips, challans, and logistics management UI. · `packing-ui/src/pages/LogisticsPortalPage.jsx`
- [VenFlow UI](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/modules/venflow/VenFlowRoutes.jsx): workflow module · Dedicated workflow surface with role and permission controls. · `packing-ui/src/modules/venflow/VenFlowRoutes.jsx`
- [API Client](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing-ui/src/services/api.js): backend client · Shared HTTP client and feature-specific API wrappers. · `packing-ui/src/services/api.js`

### Mobile Field App

React Native app for dispatch execution and live field updates.

- [Navigator](https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/navigation/AppNavigator.jsx): react native nav · Application navigation and screen routing for field users. · `ShipTrack/navigation/AppNavigator.jsx`
- [Auth Context](https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/auth/AuthContext.jsx): session state · Authentication state and login/session handling. · `ShipTrack/auth/AuthContext.jsx`
- [Dispatch Flow](https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/screens/DispatchHomeScreen.jsx): field workflow · Dispatch home, scanned items, bulk scan, and trip progression screens. · `ShipTrack/screens/DispatchHomeScreen.jsx`
- [Trips](https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/screens/TripsScreen.jsx): field workflow · Trip list, trip items, and admin dashboard for logistics execution. · `ShipTrack/screens/TripsScreen.jsx`
- [Mobile APIs](https://github.com/nikhil-razdan/alsorg-packing/blob/main/ShipTrack/api/dispatchApi.js): api clients · Dispatch, logistics, challan, location, and item update clients. · `ShipTrack/api/dispatchApi.js`

### Integrations & Output

External system connections and generated operational documents.

- [Zoho Sync](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/integration/zoho/ZohoInventoryClient.java): external integration · Zoho Inventory authentication, item mapping, cache, and sync client. · `packing/src/main/java/com/alsorg/packing/integration/zoho/ZohoInventoryClient.java`
- [PDF & QR](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/service/pdf/ChalaanPdfService.java): document generation · Challan, gate pass, sticker PDFs, and barcode/QR generation. · `packing/src/main/java/com/alsorg/packing/service/pdf/ChalaanPdfService.java`
- [Schedules](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/reporting/service/EmailService.java): email automation · Scheduled reports and email delivery for recurring operational outputs. · `packing/src/main/java/com/alsorg/packing/reporting/service/EmailService.java`
- [Operational DB](https://github.com/nikhil-razdan/alsorg-packing/blob/main/packing/src/main/java/com/alsorg/packing/domain/packet/Packet.java): relational store · System-of-record storage for operational entities and history. · `packing/src/main/java/com/alsorg/packing/domain/packet/Packet.java`

## Connections

- Shell → Access Guards: protects · Shell routes are gated by authentication and permissions.
- Shell → Dashboard: hosts · Portal shell renders dashboard and operational pages.
- Shell → Warehouse: hosts · Portal shell routes to warehouse operations.
- Shell → Logistics Portal: hosts · Portal shell routes to logistics management.
- Shell → VenFlow UI: hosts · Portal shell includes the VenFlow workspace.
- Dashboard → API Client: reads · Dashboard uses shared API clients for metrics and reports.
- Warehouse → API Client: writes · Warehouse actions call backend APIs for packing and dispatch.
- Logistics Portal → API Client: writes · Logistics management uses backend APIs for trips and fleet.
- VenFlow UI → API Client: reads/writes · VenFlow UI exchanges workflow data with the backend.
- API Client → Controllers: calls · Web portal communicates with backend HTTP controllers.
- Navigator → Auth Context: uses · Navigation depends on auth state.
- Navigator → Dispatch Flow: routes · Navigator presents dispatch screens.
- Navigator → Trips: routes · Navigator presents trip screens.
- Dispatch Flow → Mobile APIs: syncs · Dispatch screens push scan and dispatch updates.
- Trips → Mobile APIs: syncs · Trip screens sync trip status and location data.
- Mobile APIs → Controllers: calls · Mobile app talks to backend controllers.
- Controllers → Services: delegates · Controllers delegate to services.
- Services → Domain Model: orchestrates · Business services manipulate core domain objects.
- Services → Repositories: persists · Services read and write through repositories.
- Services → Audit Trail: logs · Operational actions generate audit/activity entries.
- Services → Packing: implements · Packing-related services manage packet and sticker flow.
- Services → Logistics: implements · Logistics services manage dispatch execution and fleet state.
- Services → Reporting: implements · Reporting services aggregate operational data.
- Services → VenFlow: implements · VenFlow services manage workflow stages and permissions.
- Services → Zoho Sync: syncs · Services integrate with Zoho Inventory.
- Services → PDF & QR: generates · Services produce PDFs, QR codes, and barcodes.
- Reporting → Schedules: schedules · Reports can be scheduled and emailed.
- Controllers → Security: secured by · API boundary is protected by JWT and edge-aware config.
- Repositories → Operational DB: stores · Repositories persist into the relational system-of-record.
- Zoho Sync → Operational DB: reflects · Zoho sync maps external inventory state to local records.
- PDF & QR → Operational DB: reads · Document generation uses operational data.
- Reporting → Operational DB: reads · Reporting is read-heavy over operational history.
- VenFlow → Operational DB: stores · VenFlow workflow state and audit history are persisted.
