How jtr-0901/student-bus-tracking works
BusTrack Pro is a school-bus tracking application for parents, drivers, conductors, and administrators. Users sign in, then use role-specific dashboards: drivers share bus location and can raise SOS alerts; conductors scan student QR codes to record boarding or drop-off; parents view bus status, notifications, and submit feedback; administrators manage school operations and review alerts and feedback. The README documents live GPS, OpenStreetMap, real-time notifications, SOS, driver details, and feedback. Backend internals are represented by the server entry point because its implementation was not excerpted.
Main entry points: AppContext.jsx App state · App.jsx Role routing · server.js HTTP API · DriverDashboard.jsx Driver dashboard
Components 15
Web application
- Role routing
frontend/src/App.jsx - Sign-in
frontend/src/pages/Login.jsx - App state
frontend/src/context/AppContext.jsx - Navigation
frontend/src/components/Navbar.jsx
Bus tracking
- Parent dashboard
frontend/src/pages/ParentDashboard.jsx - Driver dashboard
frontend/src/pages/DriverDashboard.jsx - Live map
frontend/src/components/MapView.jsx
Student safety
- Conductor dashboard
frontend/src/pages/ConductorDashboard.jsx - QR scanner
frontend/src/components/QRScanner.jsx
School operations
- Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Notification panel
frontend/src/components/NotificationPanel.jsx
Backend services
- HTTP API
backend/server.js - Socket.IO service
backend/server.js
Other components
- School users
- OpenStreetMap
Connections 27
- School users → Role routing: use
frontend/src/App.jsx - Role routing → App state: provides state
frontend/src/App.jsx - Role routing → Sign-in: routes unauthenticated
frontend/src/App.jsx - Role routing → Parent dashboard: routes parent
frontend/src/App.jsx - Role routing → Driver dashboard: routes driver
frontend/src/App.jsx - Role routing → Conductor dashboard: routes conductor
frontend/src/App.jsx - Role routing → Admin dashboard: routes admin
frontend/src/App.jsx - Sign-in → App state: authenticates through
frontend/src/pages/Login.jsx - App state → HTTP API: requests auth and alerts
frontend/src/context/AppContext.jsx - App state → Socket.IO service: opens socket
frontend/src/context/AppContext.jsx - Navigation → App state: reads user state
frontend/src/components/Navbar.jsx - Navigation → Notification panel: opens panel
frontend/src/components/Navbar.jsx - Notification panel → App state: reads and marks alerts
frontend/src/components/NotificationPanel.jsx - Parent dashboard → App state: reads live state
frontend/src/pages/ParentDashboard.jsx - Parent dashboard → HTTP API: loads records and posts feedback
frontend/src/pages/ParentDashboard.jsx - Parent dashboard → Live map: renders bus location
frontend/src/pages/ParentDashboard.jsx - Live map → OpenStreetMap: renders map tiles
README.md - Driver dashboard → App state: reads socket updates
frontend/src/pages/DriverDashboard.jsx - Driver dashboard → HTTP API: posts GPS and trip actions
frontend/src/pages/DriverDashboard.jsx - Driver dashboard → Socket.IO service: emits location
frontend/src/pages/DriverDashboard.jsx - Driver dashboard → Live map: renders bus location
frontend/src/pages/DriverDashboard.jsx - Conductor dashboard → QR scanner: renders scanner
frontend/src/pages/ConductorDashboard.jsx - QR scanner → Conductor dashboard: returns scan result
frontend/src/pages/ConductorDashboard.jsx - Conductor dashboard → HTTP API: records student scan
frontend/src/pages/ConductorDashboard.jsx - Admin dashboard → App state: reads bus and alert state
frontend/src/pages/AdminDashboard.jsx - Admin dashboard → HTTP API: manages records and SOS
frontend/src/pages/AdminDashboard.jsx - HTTP API → Socket.IO service: broadcasts events
README.md