How 23f2001033/environmental-hacks works
JalSaathi turns JJM-WQMIS drinking-water failures into village cases, contaminant-specific Hindi/English alerts, and a tracked remediation workflow that requires field-kit and lab re-tests to pass before closure. The graph covers ingestion and classification, case handling, messaging and read models, and the supporting data store. Evidence is limited to the supplied excerpts, SOURCE INDEX references, and README; unsampled subsystem links are omitted where their wiring is not shown.
Main entry points: case_steps.py Case steps · webhook.py Bot webhook · ingest.py Failure ingestion · store.py DynamoDB access
Components 25
Data ingestion
- Failure ingestion
src/jalsaathi/ingest.py - WQMIS access
src/jalsaathi/wqmis.py - Portal adapter
src/jalsaathi/wqmis_portal.py - HTTP adapter
src/jalsaathi/wqmis_http.py - Record parsing
src/jalsaathi/parse.py - Geocoding
src/jalsaathi/geo.py
Case workflow
- Case steps
src/jalsaathi/case_steps.py - Severity and timers
src/jalsaathi/rules.py - Contaminant advice
src/jalsaathi/advice.py - Action policy
src/jalsaathi/policy.py
Alerts and interaction
- Bot webhook
src/jalsaathi/webhook.py - Telegram client
src/jalsaathi/telegram.py - Voice notes
src/jalsaathi/voice.py - Kit photo hint
src/jalsaathi/vision.py - Bot translations
src/jalsaathi/i18n.py
Data and policy
- DynamoDB access
src/jalsaathi/store.py - DynamoDB
- Runtime configuration
src/jalsaathi/config.py - Bundled data paths
src/jalsaathi/paths.py - AWS runtime stack
infra/stack.py
User access
- Web API
src/jalsaathi/api.py - Shared read models
src/jalsaathi/views.py - Admin actions
src/jalsaathi/actions.py
Other components
- JJM-WQMIS
- Village relay / engineer
Connections 35
- JJM-WQMIS → Failure ingestion: supplies results
README.md - Failure ingestion → WQMIS access: uses source access
src/jalsaathi/ingest.py - Failure ingestion → Record parsing: parses records
src/jalsaathi/ingest.py - Failure ingestion → Severity and timers: classifies failures
src/jalsaathi/ingest.py - Failure ingestion → Geocoding: geocodes villages
src/jalsaathi/ingest.py - Failure ingestion → DynamoDB access: writes cases
src/jalsaathi/ingest.py - Failure ingestion → AWS runtime stack: starts workflows
src/jalsaathi/ingest.py - Case steps → DynamoDB access: records progress
src/jalsaathi/case_steps.py - Case steps → Severity and timers: uses deadlines
src/jalsaathi/case_steps.py - Case steps → Contaminant advice: builds alerts
src/jalsaathi/case_steps.py - Case steps → Action policy: checks permission
src/jalsaathi/case_steps.py - Case steps → Telegram client: sends messages
src/jalsaathi/case_steps.py - Case steps → Voice notes: prepares audio
src/jalsaathi/case_steps.py - Bot webhook → Case steps: handles callbacks
src/jalsaathi/webhook.py - Bot webhook → Admin actions: dispatches actions
src/jalsaathi/webhook.py - Bot webhook → Telegram client: parses and replies
src/jalsaathi/webhook.py - Bot webhook → Kit photo hint: requests photo hint
src/jalsaathi/webhook.py - Bot webhook → DynamoDB access: reads subscriptions
src/jalsaathi/webhook.py - Bot webhook → Bot translations: formats prompts
src/jalsaathi/webhook.py - Village relay / engineer → Bot webhook: submits bot updates
README.md - Village relay / engineer → Web API: views case status
README.md - Web API → Shared read models: builds responses
src/jalsaathi/api.py - Web API → DynamoDB access: reads and updates
src/jalsaathi/api.py - Shared read models → DynamoDB access: loads case data
src/jalsaathi/views.py - Shared read models → Contaminant advice: includes advice
src/jalsaathi/views.py - Shared read models → Voice notes: provides audio URLs
src/jalsaathi/views.py - DynamoDB access → DynamoDB: reads and writes
src/jalsaathi/store.py - Severity and timers → Record parsing: uses normalization
src/jalsaathi/rules.py - Contaminant advice → Severity and timers: uses contaminant rules
src/jalsaathi/advice.py - Contaminant advice → Bundled data paths: loads advice content
src/jalsaathi/advice.py - Action policy → Bundled data paths: loads policy files
src/jalsaathi/policy.py - Voice notes → Contaminant advice: uses voice scripts
src/jalsaathi/voice.py - Voice notes → DynamoDB access: stores audio metadata
src/jalsaathi/voice.py - AWS runtime stack → Case steps: configures task handler
infra/stack.py - AWS runtime stack → Bot webhook: configures webhook
infra/stack.py