Alameda Sidewalks
Next.js PostGIS GCP
Overview
Sidewalk contractor stamps—names and years pressed into concrete—are an overlooked historical record of urban development. The Alameda Sidewalk Map crowdsources the documentation of these stamps, creating a searchable, interactive archive before they’re lost to time and repaving. Site is hosted at alameda-sidewalks.com.
Features
- Interactive Map: Full-screen Leaflet map with segments color-coded by decade (1900s–2020s)
- Smart Coordinate Snapping: PostGIS-powered snapping to 2,600+ reference sidewalks imported from OpenStreetMap—users click near a sidewalk and points automatically align to actual geometry
- Community Contributions: OAuth sign-in (Google/GitHub), photo uploads for documenting stamps, and wiki-style segment editing
- Admin Tools: Moderation workflow, overlap conflict detection, batch correction utilities, and edit history tracking

Technical Stack
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS, Leaflet
- Backend: PostgreSQL with PostGIS for geospatial queries
- Infrastructure: Google Cloud Run, Cloud SQL, Cloud Storage
- Auth: Auth.js v5 with OAuth providers
Highlights
- Geospatial queries using PostGIS (ST_ClosestPoint, ST_Intersects, ST_DWithin)
- Dual-layer snapping: prioritizes existing approved segments, falls back to OSM reference data
- Real-time overlap detection for quality control
- Fully containerized deployment with CI/CD via GitHub Actions