A map with offline tiles, GPX import and a recorded track is a weekend of open-source parts, and OpenStreetMap already holds most of the world's trails. What AllTrails sells is not in that code: a curated database of more than 500,000 trails with reviews, photos and conditions from millions of hikers, and a phone app that keeps recording and warns you off-route with the screen locked. A web app cannot do the last part reliably on iOS, and nothing you build brings the reviews. At about $3 a month, Organic Maps or OsmAnd cover offline navigation for free.
Before you buildAllTrails Free covers browsing trails. If offline maps and navigation are all you need, Organic Maps and OsmAnd do that without a subscription.
Build me an offline hiking map web app to replace AllTrails Plus for the trails I actually walk. Requirements: - TypeScript + Vite, a PWA with no backend. `npm run dev` serves http://localhost:4970 and `npm run build` produces a static site I can host anywhere with HTTPS. - Map: MapLibre GL JS reading a Protomaps basemap from a single PMTiles file (`pmtiles` package) that I cut for my region with the `pmtiles extract` CLI. Show contours and hillshade only if the tiles contain them. - Trails: `npm run trails -- <south,west,north,east>` queries the Overpass API once for hiking route relations and named paths in that box and writes ./public/data/trails.geojson with name, length (`@turf/length`) and surface when tagged. The app searches by name and filters by length. - Offline: a service worker (`vite-plugin-pwa`) caches the app and trails.geojson. A "Download this area" button stores the whole PMTiles file in Cache Storage and a custom PMTiles `Source` reads byte ranges from it, so the map renders in airplane mode. Show the stored size and a delete button. - Recording: Geolocation `watchPosition`, Wake Lock to keep the screen on, the track saved to IndexedDB (`idb`) every 10 seconds so a crash loses nothing. Show distance, moving time and elevation gain from smoothed altitude. - Following a route: load a GPX file or pick a trail, draw it with progress along the line, and raise an off-route alert when I am more than 40 m from it for 15 seconds (`@turf/nearest-point-on-line`): vibrate, beep and a red banner. - Import GPX with `@tmcw/togeojson`; export recordings as GPX 1.1 with `togpx`. Saved lists live in IndexedDB. - Honest limits: iOS suspends a web page when the screen locks, so recording and alerts run only with the screen on. Say this on the first screen, and in the README tell me to test in airplane mode before relying on it. - Single user. No accounts, no telemetry, local-first. Outbound calls: the Overpass API when I run the trails script and the tile file I download myself. - Out of scope: reviews, photos, trail conditions, social features, voice navigation, Garmin or COROS sync. - README: cutting a PMTiles extract, running the trails script, and hosting with HTTPS (Cloudflare Pages or `tailscale serve`), because geolocation and service workers need a secure context.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own AllTrails Plus.
Add an elevation profile to the hiking app in this folder. Requirements: - For a loaded GPX route or recorded track, draw a distance-against-elevation chart under the map with `chart.js`, using the GPX elevation values when they exist. - Smooth the line with a 5-point moving average, compute total ascent and descent ignoring changes under 3 m, and colour segments by grade: under 8%, 8 to 15%, over 15%. - Hovering the chart moves a marker along the route on the map and the other way round. - Tracks without elevation show a message instead of a flat chart. - Update the README with how elevation noise from phone GPS affects the numbers.
Add a stored weather snapshot to the hiking app in this folder. Requirements: - A "Save forecast" button on a trail page that fetches the hourly forecast for the trail start from the Open-Meteo API (no key) for the next 48 hours: temperature, precipitation, wind and snowfall. - Store it in IndexedDB with the time it was fetched and show "fetched 6 hours ago" beside it, turning amber after 12 hours. - Show sunrise and sunset and highlight the daylight hours on the forecast. - Everything shows offline from the stored copy; the button says it needs a connection. - Update the README with the API's terms for non-commercial use.
Add backup and restore to the hiking app in this folder. Requirements: - An Export all button that writes one ZIP with every recorded track as GPX 1.1, saved lists as JSON and settings as JSON, named hiking-backup-YYYY-MM-DD.zip. - An Import button that reads the same ZIP, shows counts of new and duplicate tracks (matched by start time and length) and asks before adding anything. - Remind me on the home screen when the last export is older than 30 days. - Ask the browser for persistent storage (`navigator.storage.persist()`) and show whether it was granted. - Update the README with how iOS clears site data after a period of inactivity.
People pay for the offline maps and the off-route alerts, and keep paying because the trail pages tell them whether a hike is worth the drive. At about $3 a month it works as a cheap safety net, and nobody else has the same pile of recent reviews and photos.
Estimate · A static site on a free host costs nothing to run, and regional map extracts are free to download. Plus is about $3 a month, so a build rarely saves money. The build is token usage on your agent plan.
Checked 2026-10-19 against AllTrails Plus's docs: 1, 2, 3, 4, 5
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | $0 | Trail search, maps and community content without the Plus extras; ads are removed only on paid plans. |
| Plus | — | $2.99 | Unlimited offline map downloads (trails, parks and custom areas), 3D maps, printed maps, trail conditions, community heatmap, wrong-turn alerts, Live Share, Garmin and COROS sync, Trip Assistant, member deals. |
| Peak | — | $6.67 | Everything in Plus plus advanced map layers, Route Assistant for multi-day trips, in-app custom routes and Outdoor Lens plant and insect identification. |
Free covers browsing trails; offline map downloads, wrong-turn alerts and trail conditions are Plus features.
Not really. People pay for the offline maps and the off-route alerts, and keep paying because the trail pages tell them whether a hike is worth the drive. At about $3 a month it works as a cheap safety net, and nobody else has the same pile of recent reviews and photos. The prompt on this page builds the closest honest substitute.
About $2.99 a month on the Plus plan, $35.88 a year (checked 2026-10-19).
The trail pages: ratings, reviews, recent photos and difficulty from millions of hikers; Trail conditions, the community heatmap and 3D maps; A native app that records and navigates with the screen locked; Garmin and COROS sync, Live Share and printed maps; Wrong-turn alerts that keep working in a pocket. If any of those matter to you, keep paying.
Yes: Organic Maps (open source), OsmAnd (open source), CoMaps (open source).