How keval2347/floodguard-response-planner works
JalNiti is a ward-scale flood response planner: it turns mapped streets and environmental data into segment risk scores, allocates a simulated pump-truck fleet, and lets operators explore scenario overrides in a map-based console. The repository shows a TypeScript runtime pipeline and frontend alongside a Python data-fetch-and-cache pipeline; the README’s broader proposed FastAPI, database, and model-training steps are not represented in the supplied tree. Some subsystem links below rely on README or SOURCE INDEX references because their full source was not excerpted.
Main entry points: run_pipeline.py Pipeline CLI · model.ts Risk and allocation · pipeline.server.ts Data acquisition · index.tsx Planner console
Components 19
Python Data Pipeline
- Pipeline CLI
backend/app/data_pipeline/run_pipeline.py - Ward configuration
backend/app/config.py - Input schemas
backend/app/schemas.py - OSM fetch
backend/app/data_pipeline/osm_source.py - Elevation fetch
backend/app/data_pipeline/dem_source.py - Rainfall fetch
backend/app/data_pipeline/rainfall_source.py - File cache
backend/app/data_pipeline/cache.py
Live Data Runtime
- Live data service
src/lib/jalniti/live.functions.ts - Data acquisition
src/lib/jalniti/pipeline.server.ts - Ward data model
src/lib/jalniti/data.ts - Geospatial helpers
src/lib/jalniti/geo.ts
Risk And Response
- Risk and allocation
src/lib/jalniti/model.ts - Scenario validation
src/lib/jalniti/schema.ts - Hospital access assessment
src/lib/jalniti/hospitals.ts
Operator Console
- Planner console
src/routes/index.tsx - Ward map
src/components/jalniti/WardMap.tsx - Map panel
src/components/jalniti/MapPanel.tsx
Other components
- Ward operator
- Public data services
Connections 29
- Ward operator → Planner console: uses
src/routes/index.tsx - Planner console → Live data service: requests data
src/routes/index.tsx - Planner console → Risk and allocation: runs plan
src/routes/index.tsx - Planner console → Map panel: renders
src/routes/index.tsx - Map panel → Ward map: renders
src/components/jalniti/MapPanel.tsx - Ward map → Ward data model: reads
src/components/jalniti/WardMap.tsx - Ward map → Hospital access assessment: reads
src/components/jalniti/WardMap.tsx - Live data service → Data acquisition: delegates
src/lib/jalniti/live.functions.ts - Live data service → Ward data model: uses
src/lib/jalniti/live.functions.ts - Data acquisition → Ward data model: uses
src/lib/jalniti/pipeline.server.ts - Data acquisition → Geospatial helpers: uses
src/lib/jalniti/pipeline.server.ts - Risk and allocation → Ward data model: scores inputs
src/lib/jalniti/model.ts - Risk and allocation → Geospatial helpers: uses
src/lib/jalniti/model.ts - Risk and allocation → Scenario validation: validates overrides
src/lib/jalniti/model.ts - Hospital access assessment → Geospatial helpers: measures distance
src/lib/jalniti/hospitals.ts - Hospital access assessment → Risk and allocation: assesses roads
src/lib/jalniti/hospitals.ts - Data acquisition → Public data services: fetches datasets
src/lib/jalniti/pipeline.server.ts - Ward operator → Pipeline CLI: runs
backend/app/data_pipeline/run_pipeline.py - Pipeline CLI → OSM fetch: fetches streets
backend/app/data_pipeline/run_pipeline.py - Pipeline CLI → Elevation fetch: fetches elevation
backend/app/data_pipeline/run_pipeline.py - Pipeline CLI → Rainfall fetch: fetches rainfall
backend/app/data_pipeline/run_pipeline.py - Pipeline CLI → Input schemas: validates arguments
backend/app/data_pipeline/run_pipeline.py - OSM fetch → Ward configuration: reads settings
backend/app/data_pipeline/osm_source.py - OSM fetch → File cache: caches files
backend/app/data_pipeline/osm_source.py - Elevation fetch → File cache: uses cache
backend/app/data_pipeline/dem_source.py - Rainfall fetch → File cache: uses cache
backend/app/data_pipeline/rainfall_source.py - Elevation fetch → Ward configuration: reads settings
backend/app/data_pipeline/dem_source.py - Rainfall fetch → Ward configuration: reads settings
backend/app/data_pipeline/rainfall_source.py - Pipeline CLI → Ward configuration: loads configuration
backend/app/data_pipeline/run_pipeline.py