How welpmemates/gsra works
GSRA is a site-readiness decision system for Ahmedabad. A user explores the map, selects a location, and receives a 0–100 score with factor breakdowns; the dashboard also exposes spatial layers, heatmaps, clusters, hotspots, and travel-time areas. Comparison, reporting, configurable use-case weights, and weight optimization are additional product workflows. The backend combines PostGIS metrics with explainable scoring, while ETL prepares spatial datasets and H3 grids. Connections for unsampled features are included only where the README documents them; source excerpts provide stronger evidence for the main scoring and map interactions.
Main entry points: main.py HTTP API · App.jsx Page router · api.js API client · IndiaMap.jsx Interactive map
Components 24
Web application
- Page router
frontend/src/App.jsx - Map dashboard
frontend/src/pages/Dashboard.jsx - Interactive map
frontend/src/components/map/IndiaMap.jsx - UI state
frontend/src/store/useStore.js - API client
frontend/src/api/api.js - Site comparison
frontend/src/pages/Compare.jsx - Reports and export
frontend/src/pages/Report.jsx - Scoring settings
frontend/src/pages/Settings.jsx
Scoring service
- HTTP API
backend/app/main.py - Metric extraction
backend/app/db/spatial_queries.py - Score engine
backend/app/scoring/engine.py - Weight profiles
backend/app/scoring/weights.py - Weight optimizer
backend/app/optimizer.py
Spatial analysis
- Spatial layers
backend/app/main.py - DBSCAN clusters
backend/app/clustering/dbscan_clusters.py - Gi* hotspots
backend/app/clustering/gi_star.py - Isochrone service
backend/app/routing/isochrone.py - Grid scoring
backend/app/scripts/score_h3_grid.py
Spatial data
- PostGIS database
Data preparation
- Spatial ETL
backend/etl/02_reproject_and_clean.py - PostGIS loader
backend/etl/04_load_postgis.py - H3 grid generation
backend/etl/05_generate_h3_grid.py
Other components
- Analyst
- OSRM routing
Connections 29
- Analyst → Page router: uses
- Page router → Map dashboard: selects page
frontend/src/App.jsx - Page router → Site comparison: selects page
frontend/src/App.jsx - Page router → Reports and export: selects page
frontend/src/App.jsx - Page router → Scoring settings: selects page
frontend/src/App.jsx - Map dashboard → Interactive map: renders
frontend/src/pages/Dashboard.jsx - Interactive map → API client: requests scores
frontend/src/components/map/IndiaMap.jsx - Interactive map → UI state: updates selection
frontend/src/components/map/IndiaMap.jsx - Site comparison → API client: requests comparison
frontend/src/pages/Compare.jsx - Reports and export → API client: requests export
frontend/src/pages/Report.jsx - Scoring settings → UI state: sets weights
frontend/src/pages/Settings.jsx - API client → HTTP API: HTTP requests
frontend/src/api/api.js - HTTP API → Metric extraction: fetches metrics
backend/app/main.py - HTTP API → Score engine: computes score
backend/app/main.py - Score engine → Weight profiles: uses profiles
backend/app/scoring/engine.py - Metric extraction → PostGIS database: queries metrics
backend/app/db/spatial_queries.py - HTTP API → Weight optimizer: optimizes weights
backend/app/main.py - Weight optimizer → Score engine: evaluates scores
backend/app/optimizer.py - Weight optimizer → Metric extraction: loads metrics
backend/app/optimizer.py - HTTP API → Spatial layers: serves GeoJSON
README.md - HTTP API → DBSCAN clusters: dispatches cluster query
backend/app/main.py - HTTP API → Gi* hotspots: dispatches hotspot query
backend/app/main.py - HTTP API → Isochrone service: routes request
backend/app/main.py - Isochrone service → OSRM routing: requests routes
README.md - Spatial ETL → PostGIS loader: prepares data
README.md - PostGIS loader → PostGIS database: loads datasets
README.md - H3 grid generation → PostGIS database: stores grid
README.md - Grid scoring → H3 grid generation: scores grid
- HTTP API → Grid scoring: serves heatmap