# prabhashwarasm/waypoint_portal architecture

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

- Interactive diagram: https://gitdiagram.com/prabhashwarasm/waypoint_portal
- Repository: https://github.com/prabhashwarasm/waypoint_portal

## Overview

Waypoint is a role-based logistics operations portal for dispatchers, warehouse loaders, drivers, and store managers. Users sign in, are routed to role-specific workspaces, and perform order, inventory, loading, fleet/trip, delivery, and store-management tasks. The core workflow spans dispatch planning and allocation through warehouse loading, driver execution, and store receipt, with fleet capacity/tracking and issue reporting supporting operations. The repository excerpts show route ownership and some shared data calls; unsampled pages and stores are represented by their exact paths, with uncertain relationships omitted.

Main entry points: [`src/features/store-manager/pages/StoreManagerPage.jsx`](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/StoreManagerPage.jsx) (Store workspace), [`src/app/AppRouter.jsx`](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/app/AppRouter.jsx) (Role router), [`src/features/driver/pages/DriverPage.jsx`](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/driver/pages/DriverPage.jsx) (Driver workspace), [`src/features/dispatcher/data/fleetStore.js`](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/fleetStore.js) (Fleet data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and routing"]
  node_login["Sign in<br/>[LoginPage.jsx]"]
  node_session[("Session and roles<br/>[auth.js]")]
  node_router["Role router<br/>[AppRouter.jsx]"]
end

subgraph group_dispatch["Dispatch operations"]
  node_dispatch_ui["Dispatch workspace<br/>[Dispatch.jsx]"]
  node_order_approval["Order approval<br/>[OrderApproval.jsx]"]
  node_inventory["Inventory<br/>[Inventory.jsx]"]
  node_shortages["Shortages and delays"]
  node_capacity["Capacity planner<br/>[capacityPlanner.js]"]
  node_fleet_capacity[("Fleet capacity store")]
end

subgraph group_fleet["Fleet execution"]
  node_fleet_data[("Fleet data<br/>[fleetStore.js]")]
  node_trip_sim["Trip simulation<br/>[tripSim.js]"]
  node_driver_issue[("Driver issue reporting")]
  node_notifications[("Notifications")]
  node_driver_app["Driver workspace<br/>[DriverPage.jsx]"]
  node_vehicle_info["Vehicle information"]
  node_vehicle_tracking["Vehicle tracking"]
end

subgraph group_warehouse["Warehouse loading"]
  node_loader_app["Loader workspace<br/>[LoaderPage.jsx]"]
  node_loading_sequence["Loading sequence"]
  node_loader_data[("Loader trip data<br/>[loaderData.js]")]
end

subgraph group_stores["Store operations"]
  node_store_app["Store workspace"]
  node_store_data[("Store profiles and data")]
  node_store_dashboard["Store dashboard<br/>[DashboardPage.jsx]"]
  node_place_order["Place order<br/>[PlaceOrderPage.jsx]"]
  node_receive_delivery["Receive delivery"]
  node_wastage["Fresh wastage"]
  node_tech_adjustments["Tech adjustments"]
  node_style_adjustments["Style adjustments"]
  node_offline["Offline mode<br/>[OfflineMode.jsx]"]
end

node_operator(("Portal user"))

node_operator -->|"signs in"| node_login
node_login -->|"authenticates"| node_session
node_router -->|"checks role"| node_session
node_router -->|"routes to"| node_login
node_router -->|"routes dispatcher"| node_dispatch_ui
node_router -->|"routes loader"| node_loader_app
node_router -->|"routes driver"| node_driver_app
node_router -->|"routes manager"| node_store_app
node_shortages -->|"uses planner"| node_capacity
node_shortages -->|"reads fleet"| node_fleet_data
node_trip_sim -->|"reads depot data"| node_fleet_data
node_driver_app -->|"simulates trip"| node_trip_sim
node_driver_app -->|"reads fleet"| node_fleet_data
node_driver_app -->|"records issues"| node_driver_issue
node_driver_issue -->|"creates alerts"| node_notifications
node_vehicle_info -->|"loads fleet"| node_fleet_data
node_loader_app -->|"reads trip data"| node_loader_data
node_loading_sequence -->|"formats loading data"| node_loader_data
node_store_app -->|"loads profile"| node_store_data
node_store_app -->|"renders section"| node_store_dashboard
node_store_app -.->|"renders section"| node_place_order
node_store_app -.->|"renders section"| node_receive_delivery
node_store_app -.->|"renders section"| node_wastage
node_store_app -->|"renders section"| node_tech_adjustments
node_store_app -.->|"renders section"| node_style_adjustments
node_store_dashboard -->|"reads store data"| node_store_data
node_wastage -->|"reads store data"| node_store_data
node_store_app -.->|"enables offline mode"| node_offline

click node_login "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/auth/pages/LoginPage.jsx"
click node_session "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/shared/auth/auth.js"
click node_router "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/app/AppRouter.jsx"
click node_dispatch_ui "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/Dispatch.jsx"
click node_order_approval "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/OrderApproval.jsx"
click node_inventory "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/Inventory.jsx"
click node_shortages "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/dispatch/ShortagesDelays.jsx"
click node_capacity "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/capacityPlanner.js"
click node_fleet_data "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/fleetStore.js"
click node_trip_sim "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/tripSim.js"
click node_driver_issue "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/driverIssueStore.js"
click node_notifications "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/notificationStore.js"
click node_driver_app "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/driver/pages/DriverPage.jsx"
click node_vehicle_info "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/fleet/VehicleInformation.jsx"
click node_vehicle_tracking "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/fleet/VehicleTracking.jsx"
click node_loader_app "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/pages/LoaderPage.jsx"
click node_loading_sequence "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/pages/LoadingSequencePage.jsx"
click node_loader_data "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/data/loaderData.js"
click node_store_app "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/StoreManagerPage.jsx"
click node_store_data "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/data/storeManagerData.js"
click node_store_dashboard "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/DashboardPage.jsx"
click node_place_order "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/PlaceOrderPage.jsx"
click node_receive_delivery "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/ReceiveDeliveryPage.jsx"
click node_wastage "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/FreshWastagePage.jsx"
click node_tech_adjustments "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/TechAdjustmentsPage.jsx"
click node_style_adjustments "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/StyleAdjustmentsPage.jsx"
click node_offline "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/components/OfflineMode.jsx"
click node_fleet_capacity "https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/fleetCapacityStore.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_login,node_session,node_router,node_operator toneBlue
class node_dispatch_ui,node_order_approval,node_inventory,node_shortages,node_capacity,node_fleet_capacity toneAmber
class node_fleet_data,node_trip_sim,node_driver_issue,node_notifications,node_driver_app,node_vehicle_info,node_vehicle_tracking toneMint
class node_loader_app,node_loading_sequence,node_loader_data toneRose
class node_store_app,node_store_data,node_store_dashboard,node_place_order,node_receive_delivery,node_wastage,node_tech_adjustments,node_style_adjustments,node_offline toneIndigo
```

## Components

### Access and routing

- [Sign in](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/auth/pages/LoginPage.jsx): `src/features/auth/pages/LoginPage.jsx`
- [Session and roles](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/shared/auth/auth.js): `src/shared/auth/auth.js`
- [Role router](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/app/AppRouter.jsx): `src/app/AppRouter.jsx`

### Dispatch operations

- [Dispatch workspace](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/Dispatch.jsx): `src/features/dispatcher/pages/Dispatch.jsx`
- [Order approval](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/OrderApproval.jsx): `src/features/dispatcher/pages/OrderApproval.jsx`
- [Inventory](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/Inventory.jsx): `src/features/dispatcher/pages/Inventory.jsx`
- [Shortages and delays](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/dispatch/ShortagesDelays.jsx): `src/features/dispatcher/pages/dispatch/ShortagesDelays.jsx`
- [Capacity planner](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/capacityPlanner.js): `src/features/dispatcher/data/capacityPlanner.js`
- [Fleet capacity store](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/fleetCapacityStore.js): `src/features/dispatcher/data/fleetCapacityStore.js`

### Fleet execution

- [Fleet data](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/fleetStore.js): `src/features/dispatcher/data/fleetStore.js`
- [Trip simulation](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/tripSim.js): `src/features/dispatcher/data/tripSim.js`
- [Driver issue reporting](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/driverIssueStore.js): `src/features/dispatcher/data/driverIssueStore.js`
- [Notifications](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/data/notificationStore.js): `src/features/dispatcher/data/notificationStore.js`
- [Driver workspace](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/driver/pages/DriverPage.jsx): `src/features/driver/pages/DriverPage.jsx`
- [Vehicle information](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/fleet/VehicleInformation.jsx): `src/features/dispatcher/pages/fleet/VehicleInformation.jsx`
- [Vehicle tracking](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/dispatcher/pages/fleet/VehicleTracking.jsx): `src/features/dispatcher/pages/fleet/VehicleTracking.jsx`

### Warehouse loading

- [Loader workspace](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/pages/LoaderPage.jsx): `src/features/loader/pages/LoaderPage.jsx`
- [Loading sequence](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/pages/LoadingSequencePage.jsx): `src/features/loader/pages/LoadingSequencePage.jsx`
- [Loader trip data](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/loader/data/loaderData.js): `src/features/loader/data/loaderData.js`

### Store operations

- [Store workspace](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/StoreManagerPage.jsx): `src/features/store-manager/pages/StoreManagerPage.jsx`
- [Store profiles and data](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/data/storeManagerData.js): `src/features/store-manager/data/storeManagerData.js`
- [Store dashboard](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/DashboardPage.jsx): `src/features/store-manager/pages/DashboardPage.jsx`
- [Place order](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/PlaceOrderPage.jsx): `src/features/store-manager/pages/PlaceOrderPage.jsx`
- [Receive delivery](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/ReceiveDeliveryPage.jsx): `src/features/store-manager/pages/ReceiveDeliveryPage.jsx`
- [Fresh wastage](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/FreshWastagePage.jsx): `src/features/store-manager/pages/FreshWastagePage.jsx`
- [Tech adjustments](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/TechAdjustmentsPage.jsx): `src/features/store-manager/pages/TechAdjustmentsPage.jsx`
- [Style adjustments](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/pages/StyleAdjustmentsPage.jsx): `src/features/store-manager/pages/StyleAdjustmentsPage.jsx`
- [Offline mode](https://github.com/prabhashwarasm/waypoint_portal/blob/main/src/features/store-manager/components/OfflineMode.jsx): `src/features/store-manager/components/OfflineMode.jsx`

### Other components

- **Portal user**

## Connections

- Portal user → Sign in: signs in
- Sign in → Session and roles: authenticates (evidence: `src/features/auth/pages/LoginPage.jsx`)
- Role router → Session and roles: checks role (evidence: `src/app/AppRouter.jsx`)
- Role router → Sign in: routes to (evidence: `src/app/AppRouter.jsx`)
- Role router → Dispatch workspace: routes dispatcher (evidence: `src/app/AppRouter.jsx`)
- Role router → Loader workspace: routes loader (evidence: `src/app/AppRouter.jsx`)
- Role router → Driver workspace: routes driver (evidence: `src/app/AppRouter.jsx`)
- Role router → Store workspace: routes manager (evidence: `src/app/AppRouter.jsx`)
- Shortages and delays → Capacity planner: uses planner (evidence: `src/features/dispatcher/pages/dispatch/ShortagesDelays.jsx`)
- Shortages and delays → Fleet data: reads fleet (evidence: `src/features/dispatcher/pages/dispatch/ShortagesDelays.jsx`)
- Trip simulation → Fleet data: reads depot data (evidence: `src/features/dispatcher/data/tripSim.js`)
- Driver workspace → Trip simulation: simulates trip (evidence: `src/features/driver/pages/DriverPage.jsx`)
- Driver workspace → Fleet data: reads fleet (evidence: `src/features/driver/pages/DriverPage.jsx`)
- Driver workspace → Driver issue reporting: records issues (evidence: `src/features/driver/pages/DriverPage.jsx`)
- Driver issue reporting → Notifications: creates alerts (evidence: `src/features/dispatcher/data/driverIssueStore.js`)
- Vehicle information → Fleet data: loads fleet (evidence: `src/features/dispatcher/pages/fleet/VehicleInformation.jsx`)
- Loader workspace → Loader trip data: reads trip data (evidence: `src/features/loader/pages/LoaderPage.jsx`)
- Loading sequence → Loader trip data: formats loading data
- Store workspace → Store profiles and data: loads profile (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Store dashboard: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Place order: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Receive delivery: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Fresh wastage: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Tech adjustments: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store workspace → Style adjustments: renders section (evidence: `src/features/store-manager/pages/StoreManagerPage.jsx`)
- Store dashboard → Store profiles and data: reads store data (evidence: `src/features/store-manager/pages/DashboardPage.jsx`)
- Fresh wastage → Store profiles and data: reads store data (evidence: `src/features/store-manager/pages/FreshWastagePage.jsx`)
- Store workspace → Offline mode: enables offline mode
