StillSpace is a Flask + OSMnx web app for intelligent urban walking routes.
Instead of showing only the shortest path, it can compare:
- Fastest
- Calm
- Safe
- Accessibility
- Dog Walk
- Weather Smart
The app uses OpenStreetMap graph data (city.graphml), computes routes with NetworkX, and renders them in Leaflet.
- Multi-mode route planning over a real street graph
- Geometry-accurate route rendering (curves, not straight node jumps)
- Marker-to-route connector segments for seamless visual start/end alignment
- Coverage guardrails (rejects clicks too far from mapped streets)
- Weather-aware weighting with mock/live weather support
- Safety-zone overlay API
- Search history persistence using SQLite
- Responsive UI with simple and advanced route mode flows
- Backend: Python, Flask, NetworkX, OSMnx, Shapely
- Frontend: HTML, CSS, JavaScript, Leaflet
- Data: OpenStreetMap GraphML
- Storage: SQLite (
search_history.db)
stillspace/
app.py
wsgi.py
city.graphml
database.py
routing_utils.py
route_modes.py
weather_service.py
safety_zones.py
accessibility.py
dog_mode.py
qa_smoke.py
templates/
index.html
static/
css/app.css
js/app.js
docs/screenshots/
.env.example
requirements.txt
Request body:
{
"start_lat": 30.7333,
"start_lon": 76.7794,
"end_lat": 30.7392,
"end_lon": 76.7739,
"route_mode": "calm",
"dog_sub_mode": "relax",
"preference_bias": 50
}Main response fields:
fastest_routesmart_routeshortest_statssmart_statscomparisonconnectors(visual bridge segments)snapped_nodessnap_distances_m
Returns GeoJSON polygons for safety overlays.
Returns recent searches from SQLite.
Deletes one search history row.
Health metadata including graph bounds and max snap distance.
- Create and activate a virtual environment.
Windows:
python -m venv .venv
.venv\Scripts\activatemacOS/Linux:
python -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Create
.envfrom template:
cp .env.example .env- Run:
python app.pyOpen http://127.0.0.1:5000.
Defined in .env.example:
FLASK_DEBUGFLASK_HOSTFLASK_PORTLOG_LEVELGRAPH_PATHMAX_SNAP_DISTANCE_MDB_PATHUSE_MOCK_WEATHEROPENWEATHER_API_KEYWEATHER_CACHE_TTL_SECWEATHER_REQUEST_TIMEOUT_SEC
python qa_smoke.pygunicorn wsgi:app --bind 0.0.0.0:5000 --workers 2 --threads 4city.graphmlis loaded at startup.- Very large graphs require more RAM and slower cold starts.
- For best UX, keep selected points within the graph coverage bounds.