Routlette
- React Native
- FastAPI
- Python
- Google Maps API
Problem
I walk a lot but kept defaulting to the same three routes around campus. Picking a new path on Google Maps felt like work — you have to plan a loop, estimate distance, avoid dead ends. I wanted an app where I could say “give me a 3 km walk” and get a novel, walkable loop starting from wherever I was standing, without any planning overhead.
Approach
The app is a React Native frontend paired with a FastAPI backend. The user sets a target distance and taps “generate.” The backend takes their current coordinates, queries the Google Maps Directions API with a series of randomised waypoints arranged roughly in a loop, scores the resulting route against the target distance, and returns the best candidate. The frontend renders the route on a map and provides turn-by-turn guidance. I used an iterative refinement strategy for waypoint placement: the first pass generates candidates in a rough circle, and a second pass adjusts radii to bring the total distance closer to the target.
Hard parts
Generating routes that are both the right length and actually pleasant to walk was harder than it sounds. Pure random waypoints produced routes that crossed highways, doubled back, or routed through industrial areas. I addressed this by biasing waypoint selection toward areas with high street density (using a simple heuristic based on nearby intersection count from the Places API) and adding a penalty for routes that reuse road segments. Tuning the distance-matching algorithm was also iterative — early versions either overshot by 40% or produced routes that were just out-and-back paths pretending to be loops.
Outcome
The app reliably generates walkable loops within ±15% of the target distance in most urban areas. I used it daily for about two months and discovered corners of my own neighbourhood I had never walked through. The backend handles around 200 ms per route generation call. The project was a good exercise in combining a mobile frontend with a Python backend and working with geospatial constraints, but it depends on a running server, so the portfolio shows it via a recorded demo video and case study rather than a live interactive artifact.