Features
Google Maps integration
Fetch real transit options with times and transfers
Manual entry
Add routes without API lookup
Day-linked routing
Associate routes with specific trip days
Visual preview
Embedded or static map for each route
How transit routing works
Step 1: Enter route details
Specify:- Day: Which day of your trip (e.g. Day 3)
- From: Origin (autocomplete via Google Places)
- To: Destination (autocomplete via Google Places)
- Time filter: “Leave at” or “Arrive by”
- Time: Specific departure or arrival time (optional)
Transit searches use the trip start date + day index to calculate the exact date and weekday. This ensures route suggestions reflect real schedules.
Step 2: View suggestions
The platform calls Google Directions API and returns up to 3 transit options, sorted by duration. API request:Cost estimates may be unavailable for some routes. When
estimatedCost is null, the UI shows “Fare unavailable”.Step 3: Save or edit
You can:- Save selected route: One-click save with all details auto-filled
- Use manual entry: Switch to manual mode to adjust duration, cost, mode, or notes
Transit modes
- Subway: Metro and underground systems
- Bus: Local and long-distance buses
- Tram: Streetcars and light rail
- Rail: Trains (regional, intercity, high-speed)
- Ferry: Water transport
- Walk + Transit: Mixed walking and public transport
- Other: Any other mode
Manual entry fields
- Day: Trip day (1 to totalDays)
- From / To: Origin and destination labels
- Mode: Transit type
- Duration: Travel time in minutes
- Estimated cost: Fare (0 or higher)
- Currency: ISO code (e.g. USD, EUR)
- Departure time: Local datetime
- Arrival time: Local datetime
- Transfers: Number of connections
- Walking minutes: Time spent walking
- Reference link: URL to route info
- Notes: Stop details, platform numbers, payment info
Saved routes display
Routes are grouped by day and sorted by departure time. Each saved route shows:- From → To with departure and arrival times
- Badge indicating source (Google Maps or Manual)
- Mode, duration, cost, and transfers
- Reference link (if provided)
- Actions: Preview, Edit, Delete
Route map preview
Click “Preview” on any saved route to load the map. The platform shows:- Static map (if
providerRouteRefpolyline is available): Rendered route line on Google Static Maps - Embedded directions (fallback): Google Maps Embed with transit mode
Map preview requires
NEXT_PUBLIC_GOOGLE_MAPS_EMBED_API_KEY in your environment. Without it, the platform shows a “Map key missing” alert.Bulk import from notes
Paste route pairs in the bulk text area to quickly import multiple routes: Format:LOCATION - LOCATION and creates manual routes with:
- Mode: Other
- Duration: 60 minutes (default)
- Cost: 0 (default)
- Day: Currently selected day
API configuration
Transit routing requires:GOOGLE_MAPS_API_KEY(orNEXT_PUBLIC_GOOGLE_MAPS_EMBED_API_KEY) for route suggestionsNEXT_PUBLIC_GOOGLE_MAPS_EMBED_API_KEYfor map preview
- Route suggestions return a 503 error
- Map preview shows a configuration alert
- Manual entry still works
Example saved route object
Validation
The platform validates:- From and To must be different locations
- Day must be between 1 and trip total days
- Duration must be greater than 0
- Cost must be 0 or higher
- Arrival time cannot be earlier than departure time