How saidurga144/agripredict works
AgriPredict is a farmer-facing agricultural advisory app: users enter farm and crop conditions for yield forecasts, or submit plant images for disease diagnosis; the app also offers weather, analytics, and agricultural chat. The frontend handles authentication and role-based navigation, while a FastAPI backend exposes prediction, disease, and chat capabilities. Evidence is strongest for frontend routing, context behavior, and disease-engine setup; several feature-to-backend connections are not visible in the excerpts and are omitted rather than assumed.
Main entry points: App.jsx App routing · WeatherContext.jsx Weather context · FarmerDashboard.jsx Farmer dashboard · Login.jsx Login and signup
Components 21
Web application
- App routing
frontend/src/App.jsx - Landing page
frontend/src/components/LandingPage.jsx - Farmer dashboard
frontend/src/components/FarmerDashboard.jsx - Officer dashboard
frontend/src/components/OfficerDashboard.jsx - Dashboard home
frontend/src/components/DashboardHome.jsx - Analytics
frontend/src/components/AnalyticsDashboard.jsx - Weather dashboard
frontend/src/components/WeatherDashboard.jsx - Agricultural chat
frontend/src/components/Chatbot.jsx - Disease detector
frontend/src/components/PlantDiseaseDetector.jsx - Prediction result
frontend/src/components/PredictionResult.jsx
Identity and preferences
- Login and signup
frontend/src/components/Login.jsx - Firebase client
frontend/src/firebase.js - Language context
frontend/src/context/LanguageContext.jsx - Translations
frontend/src/utils/translations.js
Farm advisory features
- Weather context
frontend/src/context/WeatherContext.jsx - Location prompt
frontend/src/components/LocationPopup.jsx
Backend services
- FastAPI endpoints
backend/main.py - Disease analysis engine
backend/utils/disease_engine.py
Other components
- Farmer
- OpenWeather API
- Groq AI
Connections 18
- Farmer → Landing page: opens app
- App routing → Landing page: renders
frontend/src/App.jsx - App routing → Login and signup: renders
frontend/src/App.jsx - App routing → Dashboard home: routes to
frontend/src/App.jsx - App routing → Farmer dashboard: routes to
frontend/src/App.jsx - App routing → Officer dashboard: routes to
frontend/src/App.jsx - App routing → Analytics: routes to
frontend/src/App.jsx - App routing → Weather dashboard: routes to
frontend/src/App.jsx - App routing → Agricultural chat: routes to
frontend/src/App.jsx - App routing → Disease detector: routes to
frontend/src/App.jsx - Farmer dashboard → Prediction result: renders
frontend/src/components/FarmerDashboard.jsx - Login and signup → Firebase client: uses auth
frontend/src/components/Login.jsx - App routing → Language context: provides context
frontend/src/App.jsx - Language context → Translations: reads strings
frontend/src/context/LanguageContext.jsx - Weather context → Location prompt: renders
frontend/src/context/WeatherContext.jsx - Weather context → OpenWeather API: fetches forecasts
frontend/src/context/WeatherContext.jsx - FastAPI endpoints → Disease analysis engine: uses engine
backend/main.py - Disease analysis engine → Groq AI: requests analysis
backend/utils/disease_engine.py