Skip to content
All builds

Pit StopPorta-Potty Finder (Pit Stop)

What it does for you

A local restroom finder that ranks stops by distance, route and recent community reports.

Pit Stop screenshot

Screenshots

Pit Stop screenshot 1

In more detail

Pit Stop helps you find a restroom near you or along the route you are driving. It also gives an honest signal about how recently people reported on it. A pin on a map might be closed, gone, or too far off your actual trip, and Pit Stop tries not to pretend otherwise.

Honest limits

Overpass, Refuge, OSRM and the map tiles were never called during the build, so their live behavior still needs field testing. Detours are measured as straight-line distance to the route, not on real roads. There are no signed-in reporters and no moderation, so it is not ready for strangers to share pins. It is a local app that runs and passes 47 checks.

How I built it

This is the bonus project, number 101. Codex built it, off the Codex list in the split file, in about 0.8 hours. It wrote its own LOG-ENTRY.json and never touched the shared tracker. Claude Code re-ran its checks, confirmed the screenshots and case study, and then merged it.

I set the scope and the safety constraints. Codex wrote the spatial core, the source adapters, a small local server with SQLite storage and the responsive map interface. It wrote fixture and HTTP checks, drove a real browser through the key flows, and looked at the dark, light and mobile screenshots before capture. The sample places are explicitly fictional and work with no network at all.

One thing went wrong: a CSS edit briefly wiped out most of the layout. The browser screenshots made it obvious right away, so the stylesheet was restored and the browser flows were run again. That is a good argument for the screenshot rule every build followed.

The map uses Leaflet. There are read-only adapters for OpenStreetMap toilets through Overpass, Refuge Restrooms and OSRM routing. New pins and condition reports go into SQLite with input validation and a limit of one report per device per day.

What I learned

  • A nearby pin and a useful stop on your trip are different ranking problems. Route mode needs a corridor calculation (how far each place is from the route line), even when the route itself comes from a routing service.
  • A timestamp is evidence of a report, not proof the restroom is usable right now. The status labels stay cautious, and it is always visible whether you are looking at sample or live data.
  • Public place data comes in different shapes. Normalizing OpenStreetMap and Refuge into one local model made the map and the ranking independent of where the data came from.
  • One pure spatial module handles distance, route corridors, freshness and ranking, which kept it all testable in one place.

What carried forward

Pit Stop and #93 Wayfind are the two Codex spatial builds from the same final list, and they share habits: Leaflet, fictional samples, OSRM left uncalled, and labels on anything uncertain. It is a habit match, not a code import. It also follows the house rules every builder shared: a tested pure core, verify.mjs, serve.mjs on port 5201, and ?demo=1 for reproducible screenshots.

If I took it further

I would add signed-in reporters, moderation and hosted storage before letting users share pins with each other. I would also compute detours on the road network instead of straight-line distance.

#101 Built with Codex September 24, 2026 47 automated checks

Want one like this?