How waseemnasir2k26/load-broker-portal works
FreightCommand is a React demo portal for freight brokers, shippers, carriers, dispatchers, and drivers. Users sign in under a role, then work through load posting and bidding, assignment and shipment updates, tracking, messaging, carrier scoring, and contract generation. AppContext holds shared demo operational state; AuthContext provides role and permission state. The README documents the main capabilities, while the source excerpts and index establish only selected routes and component relationships, so unsampled connections are omitted.
Main entry points: App.jsx Route and access control · AppContext.jsx Operational state · LoadDetail.jsx Load detail and bids · TrackingSearch.jsx Tracking search
Components 26
Access and shell
- App bootstrap
src/main.jsx - Route and access control
src/App.jsx - Role sign-in
src/pages/LoginPage.jsx - Role and permissions
src/context/AuthContext.jsx - Demo roles
src/data/demoAccounts.js - Portal navigation
src/components/layout/Layout.jsx - Role switcher
src/components/layout/TopBar.jsx
Load operations
- Operational state
src/context/AppContext.jsx - Load board
src/components/loads - Load detail and bids
src/components/loads/LoadDetail.jsx - Driver load updates
src/components/dashboard/DriverDashboard.jsx - Shipment history
src/pages/ShipmentHistoryPage.jsx
Shipment tracking
- Tracking search
src/components/tracking/TrackingSearch.jsx - Live tracking map
src/components/tracking/TrackingMap.jsx - Tracking timeline
src/components/tracking/TrackingTimeline.jsx
Collaboration and contracts
- Shipment messaging
src/components/messages/MessageThread.jsx - Contract generation
src/components/contracts
Dashboards and insights
- Role dashboards
src/pages/DashboardPage.jsx - Carrier scores
src/pages/CarrierScoresPage.jsx - Carrier performance profile
src/components/carriers/CarrierProfile.jsx - Product guide
src/pages/GuidePage.jsx - User settings
src/pages/SettingsPage.jsx - Formatting utilities
src/utils/formatters.js - Structured logging
src/utils/logger.js - Debug panel
src/components/debug/DebugPanel.jsx
Other components
- Portal user
Connections 34
- Portal user → App bootstrap: opens portal
src/main.jsx - App bootstrap → Route and access control: renders
src/main.jsx - App bootstrap → Role and permissions: provides auth
src/main.jsx - App bootstrap → Operational state: provides state
src/main.jsx - Route and access control → Role and permissions: checks access
src/App.jsx - Route and access control → Role sign-in: routes to
src/App.jsx - Route and access control → Role dashboards: routes to
src/App.jsx - Route and access control → Load board: routes to
src/App.jsx - Route and access control → Load detail and bids: routes to
src/App.jsx - Route and access control → Shipment history: routes to
src/App.jsx - Route and access control → Tracking search: routes to
src/App.jsx - Route and access control → Portal navigation: wraps routes
src/App.jsx - Route and access control → Debug panel: renders
src/App.jsx - Role and permissions → Demo roles: reads role data
src/context/AuthContext.jsx - Role switcher → Role and permissions: uses role state
src/components/layout/TopBar.jsx - Load board → Operational state: uses operational state
src/components/loads/LoadDetail.jsx - Load detail and bids → Operational state: reads and updates
src/components/loads/LoadDetail.jsx - Load detail and bids → Shipment messaging: renders thread
src/components/loads/LoadDetail.jsx - Load detail and bids → Live tracking map: renders map
src/components/loads/LoadDetail.jsx - Load detail and bids → Tracking timeline: renders timeline
src/components/loads/LoadDetail.jsx - Driver load updates → Operational state: updates shipment
src/components/dashboard/DriverDashboard.jsx - Shipment history → Operational state: reads shipments
src/pages/ShipmentHistoryPage.jsx - Tracking search → Operational state: searches shipments
src/components/tracking/TrackingSearch.jsx - Tracking search → Live tracking map: renders map
src/components/tracking/TrackingSearch.jsx - Tracking search → Tracking timeline: renders timeline
src/components/tracking/TrackingSearch.jsx - Shipment messaging → Operational state: uses message state
src/components/messages/MessageThread.jsx - Role dashboards → Operational state: reads operational state
src/pages/DashboardPage.jsx - Carrier scores → Carrier performance profile: shows profile
src/pages/CarrierScoresPage.jsx - Carrier performance profile → Formatting utilities: formats values
src/components/carriers/CarrierProfile.jsx - Load detail and bids → Formatting utilities: formats values
src/components/loads/LoadDetail.jsx - Tracking search → Formatting utilities: formats values
src/components/tracking/TrackingSearch.jsx - Role and permissions → Structured logging: logs auth events
src/context/AuthContext.jsx - Operational state → Structured logging: logs state events
src/context/AppContext.jsx - Debug panel → Structured logging: reads logs
src/components/debug/DebugPanel.jsx