How gopi45-gk/uzhavan-ai-1 works
Uzhavan AI is a multilingual agricultural assistant for farmers, combining a web app, personalized agricultural guidance, market/weather/news information, disease diagnosis, and voice interaction. The main user journey runs from the app shell and dashboard into a chosen advisory feature; chat and the call bot add AI-generated responses and speech. The README documents broader call-bot routing and model fallbacks, but the sampled source does not verify all of those runtime links. The graph therefore preserves those capabilities while limiting source-level edges to shown references and calls.
Main entry points: api.ts Backend API client · geminiService.ts AI response service · PhoneCall.tsx Voice call bot · App.tsx App navigation
Components 22
App and identity
- App navigation
App.tsx - Dashboard
screens/Dashboard.tsx - Sign-in and registration
screens/Login.tsx
Farmer advisories
- Dashboard data context
context/DataContext.tsx - Weather advisories
screens/Weather.tsx - Market prices
screens/DailyPricePredictions.tsx - Agriculture news
screens/AgricultureNews.tsx - Crop recommendations
screens/CropRecommendation.tsx - Disease diagnosis
screens/DiseasePrediction.tsx
AI and voice
- Agriculture chat
screens/Chat.tsx - Voice call bot
screens/PhoneCall.tsx - AI response service
services/geminiService.ts - Offline agricultural intelligence
services/offlineIntelligenceService.ts - Speech synthesis
services/ttsService.ts - Live farmer context
services/farmerContextService.ts
Backend data services
- Backend API client
services/api.ts - Agricultural API
backend/main.py
Profiles and state
- Authentication service
services/firebaseAuth.ts - Firebase Auth and Firestore
services/firebase.ts - Farmer profiles
services/firestoreProfile.ts
Other components
- Farmer
- Open-Meteo
Connections 24
- Farmer → App navigation: uses
- App navigation → Dashboard: routes to
App.tsx - App navigation → Sign-in and registration: routes to
App.tsx - Sign-in and registration → Authentication service: authenticates through
services/firebaseAuth.ts - Authentication service → Firebase Auth and Firestore: uses
services/firebaseAuth.ts - Authentication service → Farmer profiles: loads profile
services/firebaseAuth.ts - Dashboard → Dashboard data context: reads dashboard data
- Dashboard data context → Backend API client: fetches dashboard
context/DataContext.tsx - Backend API client → Agricultural API: requests data
services/api.ts - Weather advisories → Dashboard data context: reads weather
screens/Weather.tsx - Market prices → Backend API client: requests prices
services/api.ts - Agriculture news → Backend API client: requests news
screens/AgricultureNews.tsx - Crop recommendations → Backend API client: requests recommendations
services/api.ts - Disease diagnosis → AI response service: requests diagnosis
screens/DiseasePrediction.tsx - Disease diagnosis → Farmer profiles: loads crop profile
screens/DiseasePrediction.tsx - Agriculture chat → AI response service: requests answers
screens/Chat.tsx - Agriculture chat → Speech synthesis: speaks replies
screens/Chat.tsx - Voice call bot → Speech synthesis: speaks replies
screens/PhoneCall.tsx - Voice call bot → Farmer profiles: loads farmer profile
screens/PhoneCall.tsx - AI response service → Live farmer context: loads live context
services/geminiService.ts - Live farmer context → Backend API client: fetches live data
services/farmerContextService.ts - AI response service → Offline agricultural intelligence: uses offline fallback
services/geminiService.ts - Agricultural API → Open-Meteo: fetches forecasts
backend/main.py - Voice call bot → Agricultural API: routes agricultural queries