Pedestrian routing that avoids winter sidewalk hazards — built for Hack Canada. SafeSteps helps people plan safer walking routes when ice, snow buildup, or other reported conditions make straight-line directions risky.
- Crowdsourced hazard reporting — Users pick a hazard type (e.g. icy conditions, high snow) and a location via Google Places; reports appear on the map with a visible radius buffer so risk areas are easy to see.
- Hazard-aware walking routes — The app requests walking directions and, when the path would cross a reported hazard, iteratively adds detour waypoints by testing candidate points on rings around the hazard, using the Google Maps Geometry library (spherical distance) to measure route–hazard intersection. The route polyline updates to favor paths that minimize or clear those intersections.
- Mobile-style UI — A phone-frame layout with map, search, and reporting so the demo reads clearly on a hackathon screen or video.
| Area | Technologies |
|---|---|
| Frontend | React 19, Vite, Tailwind CSS, React Router |
| Maps & location | Google Maps JavaScript API, Places Autocomplete, Directions Service, Geometry (spherical) |
| Backend (API for conditions & geocoding) | Python, FastAPI, Uvicorn, Pydantic |
| Data | MongoDB Atlas (async access via Motor) |
SafeSteps/
├── frontend/ # Vite + React app (map, routing UI, hazard form)
└── backend/ # FastAPI app: report/list conditions, Google route helpers
- Node.js (LTS) and npm
- Python 3 with pip (for the backend)
- A Google Maps Platform API key with at least: Maps JavaScript API, Directions API, Places API, Geocoding API (as needed for your flows)
- MongoDB connection string if you run the backend against Atlas or local MongoDB
cd frontend
npm install
npm run devThe dev server runs on http://localhost:3000 (see vite.config.js).
Set your Maps API key where the app loads the JS API (e.g. replace the placeholder in frontend/src/App.jsx for useJsApiLoader).
Install dependencies:
pip install fastapi uvicorn pydantic requests pymongo motorConfigure your environment (recommended: use a config module or env vars for API keys and never commit secrets). Start the API, for example:
cd backend
uvicorn main:app --reload --host 127.0.0.1 --port 8000The Vite dev server proxies /api/* to http://localhost:8000 if you wire the frontend to those routes.
- Demo tip: Report one or two hazards along a plausible walking corridor, then request directions between two pins — the safe-route flow should visibly reroute compared to a naive shortest path through the hazard disk.
- Story: Winter pedestrian safety / accessibility — aligns with civic-tech and sustainability tracks at many hackathons.