How navadeepvandhanapu/avani works
AVANI is a multilingual crop-disease detection and field-action platform for farmers. The main journey is to scan a leaf, receive a prediction, answer field-context questions, and get an actionable plan; farmers can also review scan history, check weather risks, and use voice assistance. The frontend coordinates these flows through an API client, while the FastAPI backend routes inference, guidance, persistence, weather, and voice requests. README descriptions establish several capabilities whose detailed implementation was not sampled; those links are cited as documented behavior, not as inspected source.
Main entry points: App.tsx Application flow · api.ts API client · main.py FastAPI routes · VoiceAssistantModal.tsx Voice assistant
Components 23
Farmer experience
- Application flow
frontend/src/App.tsx - Home and alerts
frontend/src/components/HomePage.tsx - Leaf scanner
frontend/src/components/LeafScanner.tsx - Prediction result
frontend/src/components/PredictionResult.tsx - Field questionnaire
frontend/src/components/FollowUpQuestionnaire.tsx - Action checklist
frontend/src/components/ActionSupportPlan.tsx - Scan history
frontend/src/components/ScanHistoryModal.tsx - Weather view
frontend/src/components/WeatherModal.tsx - Voice assistant
frontend/src/components/VoiceAssistantModal.tsx - Notifications
frontend/src/components/NotificationsModal.tsx
Frontend services
- API client
frontend/src/services/api.ts - Speech utilities
frontend/src/utils/speech.ts - UI translations
frontend/src/translations.ts
Diagnosis and guidance
- Leaf inference
backend/model_service.py - Plan generation
backend/guidance_service.py - Curated guidance
backend/guidance_data.py - Guidance translations
backend/guidance_translations.py
Backend services
- FastAPI routes
backend/main.py - Voice query service
backend/voice_service.py - Weather risk service
backend/weather_service.py - SQLite scan store
backend/database.py
Other components
- Farmer
- OpenWeatherMap
Connections 32
- Farmer → Application flow: uses
README.md - Application flow → Home and alerts: renders
frontend/src/App.tsx - Application flow → Leaf scanner: renders
frontend/src/App.tsx - Application flow → Prediction result: renders
frontend/src/App.tsx - Application flow → Field questionnaire: renders
frontend/src/App.tsx - Application flow → Action checklist: renders
frontend/src/App.tsx - Application flow → Scan history: renders
frontend/src/App.tsx - Application flow → Weather view: renders
frontend/src/App.tsx - Application flow → Voice assistant: renders
frontend/src/App.tsx - Application flow → Notifications: renders
frontend/src/App.tsx - Application flow → API client: requests scans
frontend/src/App.tsx - Home and alerts → Application flow: starts scan
frontend/src/App.tsx - Leaf scanner → Application flow: provides image
frontend/src/App.tsx - API client → FastAPI routes: calls API
frontend/src/services/api.ts - FastAPI routes → Leaf inference: runs prediction
backend/main.py - FastAPI routes → Plan generation: generates plan
backend/main.py - Plan generation → Curated guidance: uses references
backend/guidance_service.py - Plan generation → Guidance translations: localizes plan
backend/guidance_service.py - API client → Prediction result: returns prediction
frontend/src/components/PredictionResult.tsx - API client → Action checklist: returns plan
- Application flow → Field questionnaire: collects answers
frontend/src/App.tsx - FastAPI routes → SQLite scan store: persists scans
README.md - API client → Scan history: loads history
- Application flow → Weather view: loads weather
frontend/src/App.tsx - FastAPI routes → Weather risk service: routes weather
backend/main.py - Weather risk service → OpenWeatherMap: fetches conditions
README.md - FastAPI routes → Voice query service: routes queries
backend/main.py - Voice assistant → Speech utilities: uses speech
frontend/src/utils/speech.ts - Speech utilities → API client: requests audio
frontend/src/utils/speech.ts - Voice query service → Curated guidance: uses references
backend/voice_service.py - Voice assistant → API client: sends queries
frontend/src/components/VoiceAssistantModal.tsx - Application flow → UI translations: uses language