The MND route planner finds the best way to get from any location in Sylhet to campus by combining university bus routes with local transport options.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ihfaz297/MND/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The route planner analyzes multiple transport combinations and returns up to 3 optimal routes categorized as:- Fastest Route: Minimizes total travel time including wait time
- Least Local Transport: Minimizes use of CNG/rickshaw to reduce costs
Planning a Route
Use the/api/routes endpoint to plan a route between any two locations.
Select your origin location
Choose from the 19 available nodes in the network. Each node represents a bus stop, intersection, or destination in Sylhet.Response includes node details:
Request route options
Call the route planning endpoint with your origin, destination, and desired departure time.
The
time parameter should be in 24-hour format (HH:MM). If omitted, it defaults to the current time.Route Types
The planner considers multiple routing strategies:Direct Bus Routes
A single bus takes you from origin to destination without transfers.Bus + Local Hybrid
Take the bus as far as possible, then use local transport (CNG/rickshaw) for the remaining distance.Transfer Routes
Switch between two buses at a common stop.Transfer routes are only suggested if the wait time at the transfer point is 15 minutes or less.
Local-Only Fallback
When no bus routes are available or you’ve missed the bus, the planner provides a local-only option.Understanding Route Legs
Each route consists of one or more legs representing a segment of the journey.Bus Leg Fields
Bus Leg Fields
| Field | Type | Description |
|---|---|---|
mode | string | Always “bus” for bus legs |
route_id | string | Bus route identifier (e.g., “bus1”) |
trip_id | string | Specific trip identifier with departure time |
from | string | Origin node ID |
to | string | Destination node ID |
departure | string | Departure time in HH:MM format |
arrival | string | Arrival time in HH:MM format |
durationMin | number | Travel time in minutes |
cost | number | Cost in BDT (always 0 for buses) |
source | string | ”graph” indicates schedule-based timing |
Local Transport Leg Fields
Local Transport Leg Fields
| Field | Type | Description |
|---|---|---|
mode | string | ”local” for CNG/rickshaw/car |
submode | string | ”driving” or “walking” |
from | string | Origin node ID |
to | string | Destination node ID |
durationMin | number | Estimated travel time |
distanceMeters | number | Distance in meters |
cost | number | Estimated cost in BDT |
source | string | ”distance_matrix” or “graph” |
Using Current Route Context
When planning a route while already on a bus, provide thecurrentRoute parameter to get updated options.
Map Visualization
Rendering Route Legs
For each leg in the route:- Bus legs: Draw a polyline connecting the stops along the route
- Local legs: Use Google Maps Directions API to get turn-by-turn directions and polylines
- Walking legs: Show straight-line or walking path between points
Example: Flutter Map Integration
Best Practices
Optimizing for different scenarios
Optimizing for different scenarios
- Morning commute: Request routes 30 minutes before you need to arrive to account for wait times
- Returning from campus: Use “from_campus” direction buses which have different schedules
- Late arrivals: If you miss the bus, the local-only fallback ensures you can still get to campus
- Cost-conscious: Look for the “Least Local Transport” option to minimize expenses
Handling API responses
Handling API responses
- Always check if
optionsarray is empty - this means no routes are available - Sort options by
totalTimeMinortotalCostbased on user preference - Show
categorybadges (“Fastest”, “Least Local”) in the UI - Display
transferscount prominently - students often prefer direct routes
Related Endpoints
See the related documentation:- Viewing Schedules - Check bus departure times
- Saving Favorites - Save frequently used routes
- Authentication - Secure your API requests