CH 16Basic

Transportation & Fleet Management

The operational layer for school vehicles, routes, driver assignments, trip scheduling and live tracking, and parent-facing bus visibility — vehicle registry with document expiry alerts, route and stop management with transport fees, student assignments, admin trip scheduling, live GPS tracking, SOS handling, the full vehicle maintenance and fuel-logging workflow, and a dedicated transport analytics dashboard. Entirely Basic tier — no AI dependency.

Basic Tier Features

Basic

Vehicle Registry

Basic
  • Register buses, mini-buses, vans, and contract vehicles with vehicle type and fuel type classification
  • Document tracking: insurance, fitness certificate, permit, and pollution certificate with expiry dates
  • Daily cron scans all vehicle documents and alerts Admins/Facilities Admins 30 days before expiry
  • Web UI: /dashboard/admin/transport/buses

Route & Stop Management

Basic
  • Named routes with ordered stops, GPS coordinates, per-direction ETAs, and per-stop geofence radius
  • Route-based transport fee configuration (amount + billing cycle) referenced by the Finance module
  • Web UI: /dashboard/admin/transport/routes

Student Transport Assignment

Basic
  • Assign each student to a route with distinct pickup and drop-off stops
  • One active assignment per student per academic year, enforced at the database level
  • Web UI: /dashboard/admin/transport/students

Trip Scheduling & Live GPS Tracking

Basic
  • Admin schedules morning/afternoon trips per route and date; driver and bus are taken from the route's assigned bus
  • Driver mobile app starts/ends trips and streams live location over REST + Socket.IO; web driver dashboard starts/ends trips and marks students but does not push live GPS
  • Live map (OpenStreetMap/Leaflet) on the admin live-tracking dashboard, the parent web portal, and the parent mobile app — all three update in real time from the same Socket.IO location stream (New: web maps)
  • Parent can also request live bus location via WhatsApp self-service menu — see Chapter 15
  • Boarding, drop-off, and absent events recorded per student per trip; full trip history with per-trip event timeline
  • Web UI: /dashboard/admin/transport/trips (scheduler + list), /trips/[id] (detail + manifest), /live (live map) · Mobile: (driver) trip screens, (parent) transport screen

SOS & Delay Handling

Basic
  • Driver-triggered SOS pushes an immediate alert to Admin/Facilities Admin with GPS coordinates
  • Admin resolves an active SOS from the live tracking dashboard
  • Driver-reported delays (minutes) accumulate on the trip and notify parents on the route

Vehicle Maintenance Workflow

Basic
  • Report breakdown or scheduled-service issues; the vehicle is taken out of service automatically
  • Status workflow: Reported → Inspection → Repair → Approved → Returned to Service
  • Vehicle is automatically reactivated once returned to service
  • Web UI: /dashboard/admin/transport/maintenance

Fuel Logs

Basic
  • Record fuel entries per vehicle: date, liters, cost, and odometer reading
  • Web UI: /dashboard/admin/transport/fuel

Transport Fees

Basic
  • Route-level fee amount and billing cycle (monthly/quarterly/annual), set during route creation or edit
  • Referenced by Finance module operators when building student fee structures

Analytics & Reports

Basic
  • Trip history filterable by route, driver, direction, and date range
  • Per-trip manifest and event timeline for boarding/drop-off compliance review
  • Dedicated transport analytics dashboard: trip completion rate, trips by status, most active routes
  • Web UI: /dashboard/admin/analytics/transport

API Reference — Chapter 16

Buses, Routes & Assignments

POST/api/transport/buses

Register a new vehicle

GET/api/transport/buses

List all vehicles for the school

PATCH/api/transport/buses/:id

Update vehicle details, documents, and expiry dates

POST/api/transport/routes

Create a route with stops and optional transport fee

PATCH/api/transport/routes/:id

Update route, stops, or transport fee

POST/api/transport/assignments

Assign a student to a route with pickup/drop-off stops

GET/api/transport/drivers

List active drivers for the school (for bus/driver assignment)

Trip Scheduling, Live Tracking & SOS

POST/api/transport/trips

Schedule a trip — driver/bus taken from the route's assigned bus (New)

GET/api/transport/trips

List trips, filterable by date, route, driver, direction, status (New)

PATCH/api/transport/trips/:id/cancel

Cancel a scheduled trip (New)

GET/api/transport/trips/:id

Get trip details (New)

GET/api/transport/trips/:id/events

Get a trip's event timeline (New)

GET/api/transport/trips/:id/manifest

Get a trip's student manifest (admin or assigned driver)

GET/api/transport/live

List all trips currently in progress

GET/api/transport/history

Filterable trip history

PATCH/api/transport/trips/:id/sos-resolve

Resolve an active SOS on a trip (admin/facilities_admin)

Analytics

GET/api/analytics/dashboard/transport

Transport analytics: completion rate, trips by status, most active routes (admin/facilities_admin)

Vehicle Maintenance & Fuel (New)

GET/api/transport/maintenance

List maintenance records, filterable by bus/status

POST/api/transport/maintenance

Report a maintenance issue — takes the vehicle out of service

PATCH/api/transport/maintenance/:id

Advance workflow status; returned_to_service reactivates the vehicle

GET/api/transport/fuel-logs

List fuel entries, filterable by bus

POST/api/transport/fuel-logs

Record a fuel entry

Driver

GET/api/transport/driver/trips/today

Today's scheduled trips for the driver

PATCH/api/transport/driver/trips/:id/start

Start a trip

PATCH/api/transport/driver/trips/:id/location

Push a GPS location update

POST/api/transport/driver/trips/:id/mark-student

Record pickup/dropoff/absent for a student

PATCH/api/transport/driver/trips/:id/sos

Trigger an SOS alert

POST/api/transport/driver/trips/:id/delay

Report a trip delay in minutes (New)

PATCH/api/transport/driver/trips/:id/end

End a trip

Parent

GET/api/transport/parent/child/:childId

Child's active transport assignment

GET/api/transport/parent/child/:childId/live

Live trip location and status

GET/api/transport/parent/child/:childId/history

Trip history for the child

Real-Time (Socket.IO)

A dedicated transport:* event namespace pushes live location, student boarding status, and SOS alerts without polling.

transport:join-trip / leave-trip
Join a trip's room to receive its live location broadcasts
transport:track-child / untrack-child
Parent subscribes to a child's pickup/dropoff status updates
transport:location-update → transport:location
Driver emits location; broadcast to the trip room and school room
transport:student-event → transport:student-status / transport:child-status
Driver emits a pickup/dropoff/absent event
transport:sos → transport:sos
Driver-triggered emergency broadcast to the school's admins

Frontend Pages

PathRoleDescriptionTier
/dashboard/admin/transportAdmin / Facilities AdminTransport dashboard, stats, and document expiry alertsBasic
/dashboard/admin/transport/busesAdmin / Facilities AdminVehicle registry with document and expiry managementBasic
/dashboard/admin/transport/routesAdmin / Facilities AdminRoute and stop management with transport fee configurationBasic
/dashboard/admin/transport/studentsAdmin / Facilities AdminStudent route assignmentBasic
/dashboard/admin/transport/tripsAdmin / Facilities AdminTrip scheduler (route + date + direction) and trip list (New)Basic
/dashboard/admin/transport/trips/[id]Admin / Facilities AdminTrip detail — manifest and event timeline (New)Basic
/dashboard/admin/transport/liveAdmin / Facilities AdminLive trip tracking with SOS resolution (New)Basic
/dashboard/admin/transport/maintenanceAdmin / Facilities AdminVehicle maintenance workflow (New)Basic
/dashboard/admin/transport/fuelAdmin / Facilities AdminFuel log entries (New)Basic
/dashboard/admin/analytics/transportAdmin / Facilities Admin / Super AdminTransport analytics dashboard — completion rate, status breakdown, active routes (New)Basic
/dashboard/driverDriverToday's trips — start/end tripBasic
/dashboard/driver/busDriverAssigned bus details and document statusBasic
/dashboard/driver/trip/[id]DriverActive trip: student manifest (mark pickup/dropoff/absent) and SOS triggerBasic
/dashboard/parent/transportParentChild's route, live bus location, driver infoBasic

Mobile Screens

(driver)/index
Today's morning/afternoon trips (New)
Basic
(driver)/bus
Assigned bus, documents, and expiry status (New)
Basic
(driver)/trip/[id]
Live map with GPS push, manifest, mark student, delay reporting, SOS (New)
Basic
(parent)/transport
Route/stop/driver cards plus live bus map (upgraded)
Basic