
Detour: The Fine Print
The PRD for Detour. It covers 32 functional requirements across the inputs, how a route is generated, the map, the hand-off to Google Maps and GPX, the server function that protects the key, and what happens when a request can't be met.
The project at a glance
- Problem
- Most route tools ask for a distance, while people planning a walk or a short drive start from the time they have. Converting one to the other, and fitting the route within a radius, is left to the user.
- Approach
- Turning the shipped Detour V1 into requirements: scope, goals and non-goals, core scenarios, edge cases, the cost and security constraints, testing, metrics and deferred candidates.
- Solution
- A free, no-login web app that takes a start point, walk or drive, a time and a trip type, and returns a route that can be opened in Google Maps, exported as GPX or shared.
- Work produced
- A 1.0 PRD with 32 functional requirements, edge cases, non-functional requirements, a test record, metrics and release considerations. This page is a condensed version.
- Status
- V1 shipped in Nov 2026. This document records its baseline.
Product overview
Detour turns “I have 45 minutes” into a route. The user picks walk or drive, a time between 10 minutes and 4 hours, and one of three trip types: a loop that ends where it started, a there-and-back that returns the same way, or a one-way trip that ends somewhere new. An optional stay-within limit keeps the whole route inside a chosen radius. The route can be opened in Google Maps, downloaded as a GPX file or shared as a link that rebuilds it. It needs no account and runs at zero cost.
Assumption
Hypothesis: If a route planner takes the time a person has, rather than a distance, and plans a walk or a drive in one step, people who think in minutes will be able to get a usable route without converting time to distance themselves or signing up for anything.
V1 scope
V1 covers walking and driving; a time budget from 10 minutes to 4 hours; three trip types (loop, there and back, one-way); an optional stay-within radius; results on a map; hand-off to Google Maps, GPX and share links; and phone, desktop and home-screen use, with no login and no backend database.
Problem and evidence
Most route tools ask for a distance. People planning a walk or a short drive usually start from time instead (“I have 45 minutes”), and converting that into a distance, then into a route that returns to the start or stays within a radius, is left to the user.
Source | What it shows | Type |
|---|---|---|
Personal need | The product owner's repeated question: how to plan an X-minute walk or drive, one-way or return, within Y km. | Personal observation |
r/walking, Jul 2026 | A maker post for a random-loop tool drew 40 upvotes and 10 comments, including a request for time-based A-to-B routes. | Community signal |
r/cycling, Apr 2026 | A thread asking for an app that generates a random route drew 12 replies naming tools. | Community signal |
Existing tools | Several loop-route generators exist. Most are distance-led and focus on walking, running or cycling; drive loops are served mainly by motorcycle apps. | Secondary research |
No validated findings exist yet: no user research has been run and V1 has no usage data. The signals show that people look for generated routes and that a time-based request has come up. They do not show how many people would use Detour, or that time-based input suits most users better than distance.
Time-based input already exists in a narrow form: LoopWalk accepts a walk time but produces walking loops only. Detour's scope is one page that takes minutes as input for both walking and driving, with three trip types. The full competitive comparison is in the Detour case study and is not repeated here.
Goals, non-goals and principles
Goals
Let a user get a walking or driving route from a time budget, without converting time to distance.
Support the three trip shapes people ask for: back to the start, back the same way, or ending somewhere new.
Keep the whole route within a chosen radius when the user sets one.
Make the route easy to take away: Google Maps, GPX for Strava or Garmin, and a share link.
Run at zero cost and keep the routing key out of the browser.
Fail clearly: when a request cannot be met or the free limit is busy, say so instead of breaking.
Non-goals for V1
Fitness tracking, turn-by-turn navigation or a social route library. Google Maps provides navigation once the route is handed over.
Accounts, sign-in or saved routes.
A backend database or any server-side storage of user routes.
Live traffic in drive times.
Cycling, elevation and road-type preference options.
A user-chosen destination for one-way trips.
Paid APIs or paid hosting.
Principles
Principle | What it means for the product |
|---|---|
Time is the input | The user states how long they have; Detour performs the conversion to distance. |
One page, one job | Set a few inputs and get a route, with no sign-up or onboarding. |
Honest results | If a route runs shorter than requested or a limit cannot be met, the app states it. |
Hand off, do not replace | Google Maps, GPX and share links carry the route to the tools people already use. |
Zero cost, key on the server | Free tiers only, and the routing key never reaches the browser. |
Users and core scenarios
The primary user has a fixed amount of free time and wants a walk or a short drive without planning it: a lunch-break walk, an evening loop around the neighbourhood, or an hour's drive that should not go too far. A secondary user is a runner or walker who plans in one app, records in another and moves routes between them as GPX files.
Scenario | Expected behaviour | FRs |
|---|---|---|
Walking loop. A user with 45 minutes sets a start point with place search and chooses Walk, 45 minutes and Loop. | The route ends at the start without retracing its steps. Time, distance and the furthest point from the start are shown. | FR-01, FR-03 to FR-05, FR-11, FR-18 |
There and back with a limit. A driver chooses Drive, 1 hour, There and back, and stay within 5 km. | The route returns along the same path, the turnaround is marked and the route stays inside the dashed circle. If the hour cannot be filled inside the limit, the best route that fits is shown and flagged as shorter than requested. | FR-06, FR-12, FR-14, FR-15, FR-19, FR-20 |
One-way trip. A user chooses a 30-minute one-way walk. | The route, its end point and the straight-line distance from the start are shown. The user does not choose the destination. | FR-13, FR-21 |
GPX export and Google Maps. A runner wants the route in Strava or Garmin; another user wants to start it in Google Maps. | Download GPX produces a valid file with the full track. Open in Google Maps passes eight points along the route. | FR-22, FR-23 |
Shared route. A user sends the route to a friend. | The share link opens the same route on any device, including the units. | FR-24 |
Shuffle. The user does not like the first route. | One tap builds a new route for the same settings. | FR-17 |
No start point. The user taps generate before setting a start. | A prompt asks for a start point; no routing request is made. | FR-02 |
Selected requirements
The PRD has 32 functional requirements across inputs, route generation, results, hand-off, layout, the server function, errors and privacy. These are the ones that shape the experience most; the PDF has all of them.
ID | Requirement |
|---|---|
FR‑02 | If the user generates without a start point, Detour shows a clear prompt to set one and makes no routing request. |
FR‑04 | The user chooses a time between 10 minutes and 4 hours. |
FR‑09 | Detour corrects the target using the travel time the router returns, and retries up to four times. |
FR‑10 | Detour accepts a route within 12% of the requested time, and otherwise keeps the attempt closest to the target that also respects the limit. |
FR‑14 | When a stay-within limit is set and any part of the route leaves the circle, Detour shortens the target and tries again. |
FR‑15 | When the time cannot be met inside the limit, Detour shows the best route that fits and says it runs shorter than asked, instead of failing. |
FR‑17 | Every route carries a seed number. Shuffle picks a new seed and builds a new route for the same settings. |
FR‑22 | Open in Google Maps passes eight points along the route to Google Maps. |
FR‑24 | A share link encodes the settings and seed, and opening it rebuilds the same route, including the units. |
FR‑27 | Every route request goes through a server function at /api/route that adds the routing key. The key never reaches the browser. |
FR‑28 | The function accepts only POST requests, only the foot-walking and driving-car profiles, at most five points, and round trips between 0.2 and 100 km. Anything else is rejected. |
FR‑30 | When the free routing limit is reached, the user sees a “limit busy, try again” message rather than a crash. |
Edge cases and errors
Conditions fully specified by their requirements and the error table: no start point set (FR-02); no attempt within the time tolerance (FR-10); a request outside the allowed shape (FR-28); a shared link opened on another device, which needs no server state (FR-24); the daily or per-minute limit reached, which resets on its own (FR-30); and a moved router address or a service outage (FR-29, FR-31). The table lists only behaviour or context that the requirements do not already state.
Condition | Requirement | Additional behaviour or context |
|---|---|---|
Long time with a tight limit | FR-14, FR-15 | Retries made to stay inside the limit count toward the four-attempt maximum. The shorter route is flagged on screen; it is not treated as an error. |
Awkward or odd loop | FR-11, FR-17 | Turning points are randomised, so some loops are awkward. Shuffle is the in-product fallback. |
Thin footpath or lane data | None (data dependency) | OpenStreetMap footpath and lane data is less complete in some Indian cities, so some walking routes may take odd turns. Quality varies by city and is a test item for Mumbai suburbs. |
Google Maps draws a different path | FR-22, FR-23 | Google Maps reconstructs its own path between the eight points it receives. The GPX file contains the generated track. |
Drive times in traffic | None (service limit) | Drive times come from the routing service and exclude live traffic, so travel in heavy traffic can take longer than shown. |
Errors the user can see
Message | Cause | Resolution |
|---|---|---|
Server is missing ORS_API_KEY | The variable is not set, or the site was not redeployed after setting it | Set it, then redeploy |
Invalid API key | A typo or stray space in the key | Re-paste it and redeploy |
Could not reach the routing service | The API address moved or the service is down | Set ORS_BASE_URL, or wait |
The free routing limit is busy | The daily or per-minute cap was reached | Wait; it resets on its own |
Non-functional requirements
Area | Requirement |
|---|---|
Cost and hosting | Zero running cost. A static site and one server function on Netlify's free tier, routing from the openrouteservice free Standard plan and map tiles from OpenStreetMap. |
Service limits and capacity | The free plan allows 2,000 directions a day and 40 a minute. A route uses up to four requests, so about 500 routes a day is a planning estimate, not a guaranteed capacity. |
Generation limits | At most four routing requests per route, which bounds generation time and quota use. |
Security and key handling | ORS_API_KEY exists only in the server function's environment. The function at /api/route adds it to requests and accepts only the narrow request shape in FR-28. |
Resilience | The routing API address is configurable through ORS_BASE_URL. Reaching the service limit produces a message, not a crash. |
Technology | Front end in plain HTML, CSS and JavaScript, with no framework and no build step. Map display with Leaflet 1.9.4, bundled with the site, using OpenStreetMap tiles with attribution. Routing, round trips and place search from openrouteservice. |
Install and offline shell | A web app manifest and a service worker. The service worker caches the page only, never routes or map tiles. |
Privacy and storage | No accounts, no database and no stored routes. A share link carries the settings and seed needed to rebuild a route. |
Units | Metric by default: kilometres, with miles available (FR-07). All technical values in this document are metric. |
Release quality
Direct observation
Before launch, the main flows were tested end to end in a headless browser against a stand-in routing service, because the build environment could not reach openrouteservice. All ten checks below passed with no page errors. These results confirm application behaviour against the stand-in, not the quality of live routes.
Check | Result |
|---|---|
Generate with no start point | Clear prompt to set one |
Place search, then a 45-minute walking loop | Route, time, distance and furthest point shown |
Shuffle | New seed and new route |
1-hour drive, there and back, within 5 km | Stayed inside the limit and flagged that it ran shorter than asked |
30-minute one-way walk | End point and straight-line distance shown |
Switch km to miles | All figures converted |
GPX download | Valid file with the full track |
Shared link opened fresh | Same route rebuilt, including units |
Phone layout | Controls collapse to a summary bar with Start in Maps |
Server function | Rejects unknown modes, oversized loops and non-POST calls |
Testing against the deployed openrouteservice integration began after deployment. Live route quality has not been fully tested. Open items: ten real walking routes in Mumbai suburbs before local release, a review of the 22 km/h driving estimate in city conditions, and continued spot checks of generated routes.
Known limitations at release are the data and service conditions listed under edge cases above.
Success metrics
V1 has no analytics. Routes generated are estimated from daily openrouteservice request counts, used as a proxy. Launch reactions and feature requests are supporting signals. All of these are planned measures, not measured results.
Type | Metric | How it is measured |
|---|---|---|
Primary | Routes generated per day | Daily request counts on the openrouteservice dashboard, divided by up to four requests per route, as a proxy. |
Supporting | Reaction to launch posts | Upvotes and comments per Reddit post. |
Supporting | Feature requests | The number of distinct requests from first users, and how often each comes up. |
Guardrail | Days the free limit is reached | Days on which the daily cap is hit and users see “limit busy, try again”. |
Launch plan and next version
Before local release, test ten real walking routes in Mumbai suburbs.
At launch, monitor daily openrouteservice request counts and the days on which the free limit is reached.
After launch, ship one visible fix from first-user feedback within a week.
The following are deferred possibilities, not committed requirements or a roadmap. They are ordered by how often the need showed up in research; the decision on what, if anything, to build next depends on first-user feedback. The candidates are a one-way route to a chosen destination stretched to a set time, avoiding busy roads in favour of parks, an elevation profile, a cycling mode and free, privacy-friendly analytics.
Risks and open questions
Risk | Mitigation |
|---|---|
Route quality in Indian cities | Quality varies by city; Mumbai suburbs are tested before local release. Shuffle is the in-product fallback. |
Free quota exhausted during a usage spike | FR-30 message instead of a crash; limits reset daily, and openrouteservice accepts free applications for a higher quota. |
Routing API address changes | ORS_BASE_URL, with no code change (FR-29). |
API key misuse | Key held server-side and a narrow request shape (FR-27, FR-28). |
Live-service validation | Pre-launch tests used a stand-in; live routes need continued spot checks. |
Driving-time estimates | No live traffic, and 22 km/h is an initial estimate. Review whether it should vary by city. |
Open questions
How usable are walking routes in Mumbai suburbs in practice?
Is 22 km/h a reasonable estimate for city driving, or should it vary by city?
