How rodrigoricky/bantayani works
Bantay Ani is a crop-monitoring and insurance-claims verification platform for municipal agricultural officers. Its main domain workflow collects farm and claim information, compares pre- and post-disaster satellite indicators, and presents claim decisions and reports. The graph also preserves the dashboard, satellite monitoring, role-based access, notifications, and chat capabilities named or represented in the repository. Backend routing and several service dependencies are supported by excerpts or the SOURCE INDEX; frontend-to-API wiring is not shown, so those links are omitted.
Main entry points: main.py FastAPI application · claim_service.py Claim verification · satellite_service.py Satellite processing · database.py Database and demo data
Components 29
User interface
- Dashboard
frontend/app/(authenticated)/dashboard/page.js - Farm records
frontend/app/(authenticated)/farms/page.js - Claims
frontend/app/(authenticated)/claims/page.js - Sign in
frontend/app/login/page.js - Verification result
frontend/components/claims/VerificationResult.js - Chat assistant
frontend/components/chat/ChatWidget.js - Satellite imagery panel
frontend/components/map/SentinelImagePanel.js
API routes
- Authentication API
backend/api/auth.py - Farm API
backend/api/farms.py - Claims API
backend/api/claims.py - Reports API
backend/api/reports.py - Satellite API
backend/api/satellite.py - Chat API
backend/api/chat.py - FastAPI application
backend/main.py
Product services
- Claim verification
backend/services/claim_service.py - Farm monitoring
backend/services/farm_service.py - Assistant logic
backend/services/chat_service.py - Notifications
backend/services/notification_service.py - AI assessment
backend/services/ai_service.py - Assessment templates
backend/services/ai_templates.py
Satellite analysis
- Satellite processing
backend/services/satellite_service.py - Sentinel Hub integration
backend/services/sentinel_hub_service.py - Earth Engine setup
backend/services/earth_engine.py - NDVI calculations
backend/utils/ndvi.py
Identity and data
- Authentication and roles
backend/services/auth_service.py - Role data
backend/services/role_service.py - Database and demo data
backend/utils/database.py
Other components
- Agricultural officer
- Supabase PostgreSQL
Connections 31
- FastAPI application → Authentication API: registers route
backend/main.py - FastAPI application → Farm API: registers route
backend/main.py - FastAPI application → Claims API: registers route
backend/main.py - FastAPI application → Reports API: registers route
backend/main.py - FastAPI application → Satellite API: registers route
backend/main.py - FastAPI application → Chat API: imports route
backend/main.py - Authentication API → Authentication and roles: authenticates
backend/api/auth.py - Authentication API → Role data: gets role data
backend/api/auth.py - Claims API → Claim verification: delegates claims
backend/api/claims.py - Farm API → Farm monitoring: delegates farms
backend/api/farms.py - Reports API → Claim verification: gets claim
backend/api/reports.py - Chat API → Assistant logic: delegates chat
backend/api/chat.py - Satellite API → Satellite processing: delegates imagery
backend/api/satellite.py - Satellite API → Sentinel Hub integration: uses integration
backend/api/satellite.py - Claim verification → Satellite processing: computes indices
backend/services/claim_service.py - Claim verification → Sentinel Hub integration: uses imagery
backend/services/claim_service.py - Claim verification → AI assessment: requests assessment
backend/services/claim_service.py - Claim verification → Assessment templates: uses templates
backend/services/claim_service.py - Claim verification → Notifications: sends notifications
backend/services/claim_service.py - Farm monitoring → Satellite processing: reads scan cache
backend/services/farm_service.py - Farm monitoring → Notifications: notifies regional
backend/services/farm_service.py - Assistant logic → AI assessment: uses assessment
backend/services/chat_service.py - Satellite processing → Earth Engine setup: uses engine
backend/services/satellite_service.py - Sentinel Hub integration → Earth Engine setup: checks availability
backend/services/sentinel_hub_service.py - Satellite processing → Database and demo data: stores scan data
backend/services/satellite_service.py - Farm monitoring → Database and demo data: reads farm data
backend/services/farm_service.py - Authentication and roles → Database and demo data: queries users
backend/services/auth_service.py - Role data → Database and demo data: reads role data
backend/services/role_service.py - AI assessment → NDVI calculations: uses calculations
backend/services/ai_service.py - FastAPI application → Earth Engine setup: initializes
backend/main.py - Database and demo data → Supabase PostgreSQL: can use
README.md