# sridharan-777/logitrack-premium-logistics-shipment-platform architecture

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

- Interactive diagram: https://gitdiagram.com/sridharan-777/logitrack-premium-logistics-shipment-platform
- Repository: https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform

## Overview

LogiTrack is a role-authorized logistics platform. Customers book and track shipments; staff and administrators manage shipment operations, users, fleet, and business workflows; workers update assigned deliveries. The React app presents these role-specific workspaces and calls the Express API, which applies authorization and persists operational records in MongoDB. A separate protected phone-GPS service supports live location sharing. The README documents multimodal route estimates and operational capabilities; unsampled UI and backend details are represented only at the subsystem level where their paths are known.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/App.jsx) (Role-based app), [`backend/server.js`](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/server.js) (Express API), [`frontend/src/api/client.js`](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/api/client.js) (API client), [`backend/src/routes/notificationRoutes.js`](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/notificationRoutes.js) (Notifications and tickets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_webapp["Role-based app<br/>[App.jsx]"]
  node_booking["Shipment booking<br/>[BookingFlow.jsx]"]
  node_shipmentviews["Shipment views"]
  node_workspaces["Staff and worker workspaces"]
  node_fleetviews["Fleet and route views"]
  node_financialviews["Fleet finance views"]
  node_supportviews["Support and notifications<br/>[SupportView.jsx]"]
  node_authviews["Sign-in and registration<br/>[AuthViews.jsx]"]
  node_api["API client<br/>[client.js]"]
end

subgraph group_identity["Identity and access"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_authcontroller["Authentication logic<br/>[authController.js]"]
  node_authguard["JWT and role guard<br/>[authMiddleware.js]"]
  node_users["User administration<br/>[userController.js]"]
  node_userstore[("User records<br/>[User.js]")]
end

subgraph group_operations["Logistics operations"]
  node_server["Express API<br/>[server.js]"]
  node_shiproutes["Shipment routes<br/>[shipmentRoutes.js]"]
  node_shipments["Shipment operations"]
  node_shipmentstore[("Shipment records<br/>[Shipment.js]")]
  node_fleet["Vehicle operations"]
  node_vehiclestore[("Vehicle records<br/>[Vehicle.js]")]
  node_fuelstore[("Fuel logs<br/>[FuelLog.js]")]
  node_notifications["Notifications and tickets"]
  node_notificationstore[("Notification records<br/>[Notification.js]")]
  node_ticketstore[("Support ticket records<br/>[Ticket.js]")]
end

subgraph group_tracking["Live tracking"]
  node_trackingui["Phone GPS viewer"]
  node_trackingservice["Protected GPS service<br/>[trackingService.js]"]
  node_mongotracking["Mongo GPS service"]
  node_trackingstore[("Tracked vehicles<br/>[TrackedVehicle.js]")]
end

node_customer(("Customer"))
node_staff(("Staff and admin"))
node_worker(("Delivery worker"))
node_mongodb[("MongoDB")]

node_customer -->|"uses"| node_webapp
node_staff -->|"uses"| node_webapp
node_worker -->|"uses"| node_webapp
node_webapp -->|"shows"| node_authviews
node_webapp -->|"opens"| node_booking
node_webapp -->|"shows"| node_shipmentviews
node_webapp -->|"shows"| node_workspaces
node_webapp -->|"shows"| node_fleetviews
node_webapp -->|"shows"| node_supportviews
node_webapp -.->|"shows"| node_financialviews
node_authviews -->|"authenticates via"| node_api
node_webapp -->|"requests data"| node_api
node_api -->|"calls API"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_shiproutes
node_server -->|"mounts"| node_notifications
node_server -->|"mounts"| node_trackingservice
node_server -->|"mounts optionally"| node_mongotracking
node_authroutes -->|"routes to"| node_authcontroller
node_authroutes -->|"protects"| node_authguard
node_authcontroller -->|"reads and writes"| node_userstore
node_authcontroller -->|"issues identity for"| node_userstore
node_shiproutes -->|"protects"| node_authguard
node_shiproutes -->|"routes to"| node_shipments
node_shipments -->|"reads and writes"| node_shipmentstore
node_shipments -->|"populates users"| node_userstore
node_users -->|"reads and writes"| node_userstore
node_notifications -->|"protects"| node_authguard
node_notifications -->|"reads and writes"| node_notificationstore
node_notifications -->|"reads and writes"| node_ticketstore
node_fleet -->|"reads and writes"| node_vehiclestore
node_fleet -->|"reads and writes"| node_fuelstore
node_fleetviews -.->|"requests fleet data"| node_api
node_financialviews -.->|"requests operations data"| node_api
node_trackingui -.->|"shares and views GPS"| node_trackingservice
node_trackingservice -.->|"persists tracking"| node_trackingstore
node_mongotracking -->|"reads and writes"| node_trackingstore
node_server -->|"connects"| node_mongodb
node_trackingstore -.->|"stores in"| node_mongodb

click node_webapp "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/App.jsx"
click node_booking "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/BookingFlow.jsx"
click node_shipmentviews "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/ShipmentsListView.jsx"
click node_workspaces "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/StaffWorkspaceView.jsx"
click node_fleetviews "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/LiveFleetTracking.jsx"
click node_financialviews "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/AdminFuelTrackerView.jsx"
click node_supportviews "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/SupportView.jsx"
click node_authviews "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/AuthViews.jsx"
click node_api "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/api/client.js"
click node_server "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/server.js"
click node_authroutes "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/authRoutes.js"
click node_authcontroller "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/authController.js"
click node_authguard "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/middleware/authMiddleware.js"
click node_users "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/userController.js"
click node_userstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/User.js"
click node_shiproutes "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/shipmentRoutes.js"
click node_shipments "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/shipmentController.js"
click node_shipmentstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Shipment.js"
click node_fleet "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/vehicleController.js"
click node_vehiclestore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Vehicle.js"
click node_fuelstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/FuelLog.js"
click node_notifications "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/notificationRoutes.js"
click node_notificationstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Notification.js"
click node_ticketstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Ticket.js"
click node_trackingui "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/LiveFleetTracking.jsx"
click node_trackingservice "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/services/trackingService.js"
click node_mongotracking "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/services/mongoTrackingService.js"
click node_trackingstore "https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/TrackedVehicle.js"

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_webapp,node_booking,node_shipmentviews,node_workspaces,node_fleetviews,node_financialviews,node_supportviews,node_authviews,node_api toneBlue
class node_authroutes,node_authcontroller,node_authguard,node_users,node_userstore,node_mongodb toneAmber
class node_server,node_shiproutes,node_shipments,node_shipmentstore,node_fleet,node_vehiclestore,node_fuelstore,node_notifications,node_notificationstore,node_ticketstore toneMint
class node_trackingui,node_trackingservice,node_mongotracking,node_trackingstore,node_worker toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Web application

- [Role-based app](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Shipment booking](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/BookingFlow.jsx): `frontend/src/components/BookingFlow.jsx`
- [Shipment views](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/ShipmentsListView.jsx): `frontend/src/components/ShipmentsListView.jsx`
- [Staff and worker workspaces](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/StaffWorkspaceView.jsx): `frontend/src/components/StaffWorkspaceView.jsx`
- [Fleet and route views](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/LiveFleetTracking.jsx): `frontend/src/components/LiveFleetTracking.jsx`
- [Fleet finance views](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/AdminFuelTrackerView.jsx): `frontend/src/components/AdminFuelTrackerView.jsx`
- [Support and notifications](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/SupportView.jsx): `frontend/src/components/SupportView.jsx`
- [Sign-in and registration](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/AuthViews.jsx): `frontend/src/components/AuthViews.jsx`
- [API client](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Identity and access

- [Authentication routes](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/authRoutes.js): `backend/src/routes/authRoutes.js`
- [Authentication logic](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [JWT and role guard](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/middleware/authMiddleware.js): `backend/src/middleware/authMiddleware.js`
- [User administration](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/userController.js): `backend/src/controllers/userController.js`
- [User records](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/User.js): `backend/src/models/User.js`

### Logistics operations

- [Express API](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/server.js): `backend/server.js`
- [Shipment routes](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/shipmentRoutes.js): `backend/src/routes/shipmentRoutes.js`
- [Shipment operations](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/shipmentController.js): `backend/src/controllers/shipmentController.js`
- [Shipment records](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Shipment.js): `backend/src/models/Shipment.js`
- [Vehicle operations](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/controllers/vehicleController.js): `backend/src/controllers/vehicleController.js`
- [Vehicle records](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Vehicle.js): `backend/src/models/Vehicle.js`
- [Fuel logs](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/FuelLog.js): `backend/src/models/FuelLog.js`
- [Notifications and tickets](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/routes/notificationRoutes.js): `backend/src/routes/notificationRoutes.js`
- [Notification records](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Notification.js): `backend/src/models/Notification.js`
- [Support ticket records](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/Ticket.js): `backend/src/models/Ticket.js`

### Live tracking

- [Phone GPS viewer](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/frontend/src/components/LiveFleetTracking.jsx): `frontend/src/components/LiveFleetTracking.jsx`
- [Protected GPS service](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/services/trackingService.js): `backend/src/services/trackingService.js`
- [Mongo GPS service](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/services/mongoTrackingService.js): `backend/src/services/mongoTrackingService.js`
- [Tracked vehicles](https://github.com/sridharan-777/logitrack-premium-logistics-shipment-platform/blob/main/backend/src/models/TrackedVehicle.js): `backend/src/models/TrackedVehicle.js`

### Other components

- **Customer**
- **Staff and admin**
- **Delivery worker**
- **MongoDB**

## Connections

- Customer → Role-based app: uses (evidence: `README.md`)
- Staff and admin → Role-based app: uses (evidence: `README.md`)
- Delivery worker → Role-based app: uses (evidence: `README.md`)
- Role-based app → Sign-in and registration: shows (evidence: `frontend/src/App.jsx`)
- Role-based app → Shipment booking: opens (evidence: `frontend/src/App.jsx`)
- Role-based app → Shipment views: shows (evidence: `frontend/src/App.jsx`)
- Role-based app → Staff and worker workspaces: shows (evidence: `frontend/src/App.jsx`)
- Role-based app → Fleet and route views: shows (evidence: `frontend/src/App.jsx`)
- Role-based app → Support and notifications: shows (evidence: `frontend/src/App.jsx`)
- Role-based app → Fleet finance views: shows (evidence: `frontend/src/App.jsx`)
- Sign-in and registration → API client: authenticates via (evidence: `frontend/src/components/AuthViews.jsx`)
- Role-based app → API client: requests data (evidence: `frontend/src/App.jsx`)
- API client → Express API: calls API (evidence: `frontend/src/api/client.js`)
- Express API → Authentication routes: mounts (evidence: `backend/server.js`)
- Express API → Shipment routes: mounts (evidence: `backend/server.js`)
- Express API → Notifications and tickets: mounts (evidence: `backend/server.js`)
- Express API → Protected GPS service: mounts (evidence: `backend/server.js`)
- Express API → Mongo GPS service: mounts optionally (evidence: `backend/server.js`)
- Authentication routes → Authentication logic: routes to (evidence: `backend/src/routes/authRoutes.js`)
- Authentication routes → JWT and role guard: protects (evidence: `backend/src/routes/authRoutes.js`)
- Authentication logic → User records: reads and writes (evidence: `backend/src/controllers/authController.js`)
- Authentication logic → User records: issues identity for (evidence: `backend/src/controllers/authController.js`)
- Shipment routes → JWT and role guard: protects (evidence: `backend/src/routes/shipmentRoutes.js`)
- Shipment routes → Shipment operations: routes to (evidence: `backend/src/routes/shipmentRoutes.js`)
- Shipment operations → Shipment records: reads and writes (evidence: `backend/src/controllers/shipmentController.js`)
- Shipment operations → User records: populates users (evidence: `backend/src/controllers/shipmentController.js`)
- User administration → User records: reads and writes (evidence: `backend/src/controllers/userController.js`)
- Notifications and tickets → JWT and role guard: protects (evidence: `backend/src/routes/notificationRoutes.js`)
- Notifications and tickets → Notification records: reads and writes (evidence: `backend/src/routes/notificationRoutes.js`)
- Notifications and tickets → Support ticket records: reads and writes (evidence: `backend/src/routes/notificationRoutes.js`)
- Vehicle operations → Vehicle records: reads and writes (evidence: `backend/src/controllers/vehicleController.js`)
- Vehicle operations → Fuel logs: reads and writes (evidence: `backend/src/controllers/vehicleController.js`)
- Fleet and route views → API client: requests fleet data
- Fleet finance views → API client: requests operations data
- Phone GPS viewer → Protected GPS service: shares and views GPS (evidence: `README.md`)
- Protected GPS service → Tracked vehicles: persists tracking
- Mongo GPS service → Tracked vehicles: reads and writes (evidence: `backend/src/services/mongoTrackingService.js`)
- Express API → MongoDB: connects (evidence: `backend/server.js`)
- Tracked vehicles → MongoDB: stores in
