How condabeta/routerest works
RouteRest is a web-based truck trip planner that turns driver location and cycle-hour inputs into an HOS-aware route, stop schedule, trip summary, and daily ELD logs. The main flow runs from the React form through the Django planning endpoint, location lookup, road routing, and HOS simulation; the result is saved and returned for map, directions, itinerary, compliance, and log-sheet views. The README also documents PDF export. Edges reflect the excerpts, SOURCE INDEX references, or README; unsampled internals are not inferred.
Main entry points: views.py Planning endpoint · App.jsx Results coordinator · api.js API client · TripForm.jsx Trip form
Components 21
Trip planning UI
- Trip form
frontend/src/components/TripForm.jsx - Location autocomplete
frontend/src/components/LocationInput.jsx - API client
frontend/src/api.js - Results coordinator
frontend/src/App.jsx - Route map
frontend/src/components/RouteMap.jsx - Route directions
frontend/src/components/RouteInstructions.jsx - Trip summary
frontend/src/components/TripSummary.jsx - Stops itinerary
frontend/src/components/StopsTimeline.jsx - Compliance summary
frontend/src/components/ComplianceCard.jsx - Daily log sheets
frontend/src/components/LogSheets.jsx - ELD log grid
frontend/src/components/LogSheet.jsx - PDF export
frontend/src/components/LogSheets.jsx
Planning services
- Planning endpoint
backend/trips/views.py - Input validation
backend/trips/serializers.py - Geocoding and suggestions
backend/trips/services/geocoding.py - Road routing
backend/trips/services/routing.py - HOS planner and logs
backend/trips/services/hos_planner.py
External services
- Photon / Nominatim
- OSRM
Trip records
- Trip record
backend/trips/models.py
Other components
- Driver
Connections 24
- Driver → Trip form: enters trip
README.md - Trip form → Location autocomplete: collects locations
frontend/src/components/TripForm.jsx - Location autocomplete → API client: requests suggestions
frontend/src/components/LocationInput.jsx - API client → Planning endpoint: posts plan
frontend/src/api.js - API client → Planning endpoint: requests autocomplete
frontend/src/api.js - Planning endpoint → Input validation: validates input
backend/trips/views.py - Planning endpoint → Geocoding and suggestions: geocodes locations
backend/trips/views.py - Planning endpoint → Geocoding and suggestions: gets suggestions
backend/trips/views.py - Geocoding and suggestions → Photon / Nominatim: queries places
backend/trips/services/geocoding.py - Planning endpoint → Road routing: gets route
backend/trips/views.py - Road routing → OSRM: requests directions
backend/trips/services/routing.py - Planning endpoint → HOS planner and logs: simulates HOS plan
backend/trips/views.py - Planning endpoint → Trip record: saves plan
backend/trips/views.py - Planning endpoint → API client: returns plan
- Results coordinator → API client: requests plan
frontend/src/App.jsx - Results coordinator → Trip form: renders form
frontend/src/App.jsx - Results coordinator → Route map: renders route
frontend/src/App.jsx - Results coordinator → Route directions: renders directions
frontend/src/App.jsx - Results coordinator → Trip summary: renders summary
frontend/src/App.jsx - Results coordinator → Stops itinerary: renders itinerary
frontend/src/App.jsx - Results coordinator → Compliance summary: renders compliance
frontend/src/App.jsx - Results coordinator → Daily log sheets: renders logs
frontend/src/App.jsx - Daily log sheets → ELD log grid: renders sheets
frontend/src/components/LogSheets.jsx - Driver → PDF export: downloads logs
README.md