How vagbon-d/weathergpt-sih works
WeatherGPT provides multilingual weather forecasts, authoritative alerts, agricultural decision support, and conversational advisories through a web app and telephony/SMS. The principal workflow is user query and location resolution, weather and IMD knowledge retrieval, deterministic hazard/agronomic evaluation, grounded response generation, then localized text or speech. The README documents the safety pipeline and capabilities; edges backed only by that documentation are cited to the README, while source-level links use indexed references.
Main entry points: main.py FastAPI application · grounded_advisory.py Grounded advisory pipeline · weather_service.py Weather aggregation · advisory.py Advisory endpoint
Components 34
User Interfaces
- Weather web app
frontend/src/App.jsx - Frontend API client
frontend/src/api.js - Indic localization
frontend/src/i18n/LanguageContext.jsx - Browser speech
frontend/src/utils/speechManager.js
API and Telephony
- FastAPI application
backend/main.py - Chat endpoint
backend/routers/chat.py - Weather endpoint
backend/routers/weather.py - Alert endpoint
backend/routers/alerts.py - Advisory endpoint
backend/routers/advisory.py - Location endpoint
backend/routers/location.py - Language endpoint
backend/routers/language.py - IVR and SMS
backend/routers/webhook.py - Call status feed
backend/routers/ws_call_status.py
Weather Intelligence
- Weather aggregation
backend/services/weather_service.py - Forecast providers
backend/services/weather/aggregator.py - Weather classification
backend/weather_engine.py - Photon geocoder
backend/services/location/photon_service.py
IMD Knowledge
- IMD crawler
backend/services/crawler/imd_crawler.py - Bulletin parser
backend/services/crawler/bulletin_parser.py - Bulletin normalizer
backend/services/crawler/normalizer.py - Bulletin and rules retrieval
backend/services/rag_service.py
Grounded Advisory
- Grounded advisory pipeline
backend/services/grounded_advisory.py - Intent and temporal analysis
backend/services/query_engine.py - Agronomic rule evaluation
backend/services/advisory_service.py - Grounded language generation
backend/services/llm_service.py - Language processing
backend/services/language_service.py - Bhashini language services
backend/services/language/bhashini_service.py - Native speech synthesis
backend/services/language/native_tts.py
Other components
- Farmer or citizen
- Ollama LLM
- Bhashini service
- Official IMD sources
- Open-Meteo
- Photon / OpenStreetMap
Connections 40
- Farmer or citizen → Weather web app: asks forecast
README.md - Weather web app → Frontend API client: requests data
frontend/src/App.jsx - Frontend API client → FastAPI application: calls API
README.md - Weather web app → Indic localization: localizes interface
frontend/src/App.jsx - Indic localization → Browser speech: uses speech
frontend/src/i18n/LanguageContext.jsx - FastAPI application → Chat endpoint: registers route
backend/main.py - FastAPI application → Weather endpoint: registers route
backend/main.py - FastAPI application → Alert endpoint: registers route
backend/main.py - FastAPI application → Advisory endpoint: registers route
backend/main.py - FastAPI application → Location endpoint: registers route
backend/main.py - FastAPI application → Language endpoint: registers route
backend/main.py - FastAPI application → IVR and SMS: registers webhooks
backend/main.py - FastAPI application → Call status feed: registers feed
backend/main.py - Weather endpoint → Weather aggregation: fetches forecasts
backend/routers/weather.py - Alert endpoint → Weather aggregation: fetches warnings
backend/routers/alerts.py - Advisory endpoint → Weather aggregation: fetches weather
backend/routers/advisory.py - Advisory endpoint → Bulletin and rules retrieval: retrieves knowledge
backend/routers/advisory.py - Advisory endpoint → Agronomic rule evaluation: evaluates rules
backend/routers/advisory.py - Location endpoint → Photon geocoder: resolves location
backend/routers/location.py - Language endpoint → Language processing: processes language
backend/routers/language.py - Language endpoint → Bhashini language services: requests speech
backend/routers/language.py - Language endpoint → Native speech synthesis: requests synthesis
backend/routers/language.py - Weather aggregation → Photon geocoder: resolves coordinates
backend/services/weather_service.py - Weather aggregation → Forecast providers: aggregates forecasts
backend/services/weather_service.py - Forecast providers → Open-Meteo: fetches model data
README.md - Forecast providers → Official IMD sources: fetches IMD data
README.md - IMD crawler → Official IMD sources: crawls bulletins
README.md - IMD crawler → Bulletin parser: parses bulletins
backend/services/crawler/imd_crawler.py - IMD crawler → Bulletin normalizer: normalizes content
backend/services/crawler/imd_crawler.py - Bulletin and rules retrieval → IMD crawler: retrieves crawled data
backend/services/rag_service.py - Chat endpoint → Grounded advisory pipeline: builds grounded answer
backend/routers/chat.py - Grounded advisory pipeline → Intent and temporal analysis: classifies request
README.md - Grounded advisory pipeline → Weather aggregation: gets verified weather
README.md - Grounded advisory pipeline → Bulletin and rules retrieval: retrieves evidence
README.md - Grounded advisory pipeline → Agronomic rule evaluation: evaluates hazards
README.md - Grounded advisory pipeline → Grounded language generation: generates response
README.md - Grounded language generation → Ollama LLM: synthesizes language
README.md - Grounded advisory pipeline → Language processing: localizes response
README.md - Bhashini language services → Bhashini service: calls language API
backend/services/language/bhashini_service.py - Photon geocoder → Photon / OpenStreetMap: geocodes places
backend/services/location/photon_service.py