How ahmedfarazsyk/sindh-desertification-risk-prediction-and-forecasting works
This is a desertification-risk dashboard backed by a FastAPI analysis service. The main workflow lets users select an area on the map for current or forecast analysis, fetches satellite/environmental inputs, runs inference, and presents generated visualizations; users can also search precomputed districts. Separate capabilities include saved-analysis history, AI reports, and a data-grounded chat copilot. The graph reflects the route handlers and service calls visible in sampled source; frontend request wiring beyond the explicit search request is not fully evidenced, so uncertain links are omitted.
Main entry points: routes.py API routes · mongodb_service.py Mongo service · page.tsx Dashboard page · inference.py Model inference
Components 21
Dashboard UI
- Dashboard page
desertification-dashboard/app/page.tsx - District search
desertification-dashboard/components/SearchBar.tsx - Map widget
desertification-dashboard/components/MapWidget.tsx
API workflows
- FastAPI app
desertification_api/app/main.py - API routes
desertification_api/app/api/routes.py - API schemas
desertification_api/app/api/schemas.py
Analysis services
- Earth Engine data
desertification_api/app/services/ee_service.py - Model inference
desertification_api/app/services/inference.py - Forecast model
desertification_api/app/models/convgru.py - U-Net model
desertification_api/app/models/unet.py - Visualization metrics
desertification_api/app/services/visuals.py
Data and AI
- Mongo service
desertification_api/app/services/mongodb_service.py - Supabase service
desertification_api/app/services/supabase_service.py - RAG copilot
desertification_api/app/services/rag_service.py - AI reports
desertification_api/app/services/report_service.py
External platforms
- Google Earth Engine
- MongoDB
- Supabase
- Gemini
- Visualization image URLs
Other components
- Dashboard user
Connections 24
- Dashboard user → Dashboard page: uses
- Dashboard page → District search: renders
- Dashboard page → Map widget: loads
- District search → FastAPI app: requests search
- FastAPI app → API routes: dispatches
- API routes → API schemas: validates
- API routes → Earth Engine data: fetches inputs
- Earth Engine data → Google Earth Engine: queries imagery
- API routes → Model inference: runs analysis
- API routes → Visualization metrics: generates outputs
- API routes → Supabase service: stores outputs
- Supabase service → Supabase: uploads and records
- API routes → Mongo service: searches districts
- Mongo service → MongoDB: queries
- API routes → RAG copilot: dispatches chat
- RAG copilot → Mongo service: reads district data
- RAG copilot → Gemini: streams answers
- API routes → AI reports: generates report
- AI reports → Visualization image URLs: downloads images
- AI reports → Gemini: submits report
- API routes → Supabase: reads history
- API routes → Mongo service: loads district data
- Model inference → Forecast model: uses forecast network
- Model inference → U-Net model: uses segmentation network