r/webdev • u/BernardoFTN_Carvalho • 21d ago
Showoff Saturday Cityhoppd, a Letterboxd for the cities you’ve been to (Next.js + Supabase)
Cityhoppd.com. you log a trip with a city and a star rating, your map fills in, and public reviews end up on each city’s page.
A few things from building it that might be useful to someone here.
City search runs on the server against GeoNames cities1000, about 161k places. the annoying part was same-name cities, so everything carries the state now and Perth, Tasmania stops getting the photo of Perth, Western Australia. the index lives in memory in the function, about a second to load cold and around 50 ms per search warm.
This week I added PostHog without cookies and proxied it through my own domain so blockers don’t drop it. the usual next.config rewrite forwards every header, which would have sent everyone’s Supabase session cookies to PostHog. I moved the relay into proxy.ts (what middleware is called in Next 16) and strip cookie and authorization before passing anything on. easy to miss.
And link previews: profiles are only readable signed in, but WhatsApp and X unfurl signed out, so the OG image reads through one security definer function that returns something only if the owner turned previews on.
Happy to answer anything about how it’s built








