How selva-meenakshi-k/climateguard-ai works
ClimateGuard AI serves Tamil Nadu farmers and the public with bilingual weather warnings, deterministic hazard assessments, farm actions, and emergency guidance. The main web workflow is user selection and dashboard in React → FastAPI weather and risk endpoints → forecast retrieval and rule-based assessment → localized advisories and plans. A separate Strands agent path answers questions through tools and a safety gate; Bedrock AgentCore is an additional runtime entrypoint. The README documents irrigation, scenario simulation, historical impact, and public-safety capabilities. Some endpoint and component wiring is unsampled, so only documented or indexed relationships are connected.
Main entry points: App.jsx React application · main.py FastAPI endpoints · tools.py Agent tools · orchestrator.py Agent orchestrator
Components 26
Bilingual web experience
- React application
frontend/src/App.jsx - Language context
frontend/src/context/LanguageContext.jsx - Risk dashboard
frontend/src/components/RiskOverview.jsx - Farm advisories
frontend/src/components/AdvisoryCard.jsx - Irrigation plan
frontend/src/components/IrrigationPlan.jsx - Safety plan
frontend/src/components/SafetyPlan.jsx - Scenario simulator
frontend/src/components/WhatIfSimulator.jsx - Historical impact
frontend/src/components/ImpactPage.jsx - Weather scene
frontend/src/components/WeatherScene.jsx
Climate API and data
- FastAPI endpoints
backend/main.py - Irrigation calculation
backend/main.py - Scenario calculation
backend/main.py - District profiles
backend/data/locations.py - Forecast service
backend/services/weather_service.py
Risk and farm guidance
- Risk assessment
backend/services/risk_engine.py - Agronomic thresholds
backend/config/thresholds.py
Agent and safety
- Agent orchestrator
backend/agent/orchestrator.py - Agent tools
backend/agent/tools.py - Planner critic graph
backend/agent/app.py - Emergency gate
backend/agent/safety.py - Crop guidance
backend/agent/plan.py - AgentCore runtime
backend/agentcore_main.py - Agent baseline
backend/agent/baseline.py - Answer evaluator
backend/agent/score.py
Other components
- Farmer or public user
- Open-Meteo
Connections 30
- Farmer or public user → React application: uses
README.md - React application → FastAPI endpoints: requests REST
README.md - React application → Language context: uses translations
frontend/src/App.jsx - React application → Risk dashboard: renders
frontend/src/App.jsx - React application → Farm advisories: renders
frontend/src/App.jsx - React application → Irrigation plan: renders
frontend/src/App.jsx - React application → Safety plan: renders
frontend/src/App.jsx - React application → Scenario simulator: renders
frontend/src/App.jsx - React application → Historical impact: renders
frontend/src/App.jsx - Risk dashboard → Weather scene: renders
- FastAPI endpoints → District profiles: resolves districts
backend/main.py - FastAPI endpoints → Forecast service: requests forecasts
backend/main.py - Forecast service → Open-Meteo: fetches forecast
backend/services/weather_service.py - FastAPI endpoints → Risk assessment: assesses hazards
backend/main.py - Risk assessment → Agronomic thresholds: applies rules
backend/services/risk_engine.py - FastAPI endpoints → Irrigation calculation: serves schedule
README.md - Irrigation calculation → Forecast service: fetches forecast
backend/main.py - FastAPI endpoints → Scenario calculation: serves scenarios
README.md - Scenario calculation → Risk assessment: reassesses hazards
backend/main.py - Farmer or public user → AgentCore runtime: invokes agent
README.md - FastAPI endpoints → Agent orchestrator: routes questions
backend/main.py - AgentCore runtime → Agent orchestrator: invokes
backend/agentcore_main.py - Agent orchestrator → Agent tools: dispatches tools
backend/agent/orchestrator.py - Agent tools → District profiles: looks up district
backend/agent/tools.py - Agent tools → Forecast service: gets forecast
backend/agent/tools.py - Agent tools → Risk assessment: assesses risk
backend/agent/tools.py - Agent orchestrator → Planner critic graph: uses agent graph
README.md - Planner critic graph → Emergency gate: checks emergency
backend/agent/app.py - Agent tools → Crop guidance: uses guidance
- Agent baseline → Answer evaluator: evaluated by