How patrickuwimanikunda-dev/guardex-project works
Guardex is a vehicle-safety interface spanning a public landing page, a role-based operations dashboard, a mobile-driver experience, and a USSD-style portal. The dashboard workflow is role login, then navigation to operational overview, vehicle management, alerts, analytics, AI risk prediction, or administration. The mobile app uses a screen-state dispatcher for role selection, login, monitoring, breath testing, history, owner views, and risk alerts. The sampled mobile dashboard uses mock vehicle data; the excerpts do not establish a live telemetry or persistence backend.
Main entry points: MobileApp.jsx Mobile Dispatcher · Dashboard.jsx Dashboard Dispatcher · pages.config.js Page Registry · App.jsx App Router
Components 28
App Shell
- App Router
src/App.jsx - Auth Context
src/lib/AuthContext.jsx - Page Registry
src/pages.config.js
Public Entry
- Landing Page
src/pages/Home.jsx
Operations Dashboard
- Dashboard Dispatcher
src/pages/Dashboard.jsx - Role Login
src/components/dashboard/RoleLoginScreen.jsx - Police Overview
src/components/dashboard/PoliceOverview.jsx - Vehicle Management
src/components/dashboard/VehiclesTable.jsx - Vehicle Details
src/components/dashboard/VehicleDetailModal.jsx - Alert Feed
src/components/dashboard/AlertFeed.jsx - Analytics Dashboard
src/components/dashboard/AnalyticsDashboard.jsx - AI Risk Panel
src/components/dashboard/AIPredictionPanel.jsx - Admin Panel
src/components/dashboard/AdminPanel.jsx - Dashboard Navigation
src/components/dashboard/DashboardSidebar.jsx - Dashboard Header
src/components/dashboard/DashboardTopBar.jsx
Mobile Experience
- Mobile Dispatcher
src/pages/MobileApp.jsx - Splash Screen
src/components/mobile/SplashScreen.jsx - Role Selection
src/components/mobile/RoleSelection.jsx - Mobile Login
src/components/mobile/LoginScreen.jsx - Driver Dashboard
src/components/mobile/DriverDashboard.jsx - Breath Test
src/components/mobile/BreathTest.jsx - Live Monitoring
src/components/mobile/LiveMonitoring.jsx - Driver History
src/components/mobile/DriverHistory.jsx - Owner Dashboard
src/components/mobile/OwnerDashboard.jsx - High Risk Alert
src/components/mobile/HighRiskAlert.jsx - Crash Prediction
src/components/mobile/AICrashPrediction.jsx
USSD Portal
- USSD Simulator
src/pages/USSDPortal.jsx
Other components
- User
Connections 30
- User → App Router: opens
- App Router → Auth Context: provides auth
src/App.jsx - App Router → Page Registry: loads pages
src/App.jsx - Page Registry → Landing Page: routes to
src/pages.config.js - Page Registry → Dashboard Dispatcher: routes to
src/pages.config.js - Page Registry → Mobile Dispatcher: routes to
src/pages.config.js - Page Registry → USSD Simulator: routes to
src/pages.config.js - Landing Page → Dashboard Dispatcher: links to
src/pages/Home.jsx - Dashboard Dispatcher → Role Login: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Police Overview: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Vehicle Management: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Alert Feed: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Analytics Dashboard: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → AI Risk Panel: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Admin Panel: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Dashboard Navigation: renders
src/pages/Dashboard.jsx - Dashboard Dispatcher → Dashboard Header: renders
src/pages/Dashboard.jsx - Police Overview → Alert Feed: renders
src/components/dashboard/PoliceOverview.jsx - Police Overview → Vehicle Details: renders
src/components/dashboard/PoliceOverview.jsx - Vehicle Management → Vehicle Details: opens
src/components/dashboard/VehiclesTable.jsx - Mobile Dispatcher → Splash Screen: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Role Selection: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Mobile Login: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Driver Dashboard: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Breath Test: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Live Monitoring: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Driver History: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Owner Dashboard: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → High Risk Alert: dispatches
src/pages/MobileApp.jsx - Mobile Dispatcher → Crash Prediction: dispatches
src/pages/MobileApp.jsx