How rhythem2005/sih-crop-yield- works
AgroAI is a farmer-focused agricultural decision platform with crop-yield prediction as its main workflow: farmers enter soil, crop, and location data; weather is incorporated; the backend returns yield estimates and recommendations for the results view and report. Separate product branches support leaf-image diagnosis, farming chat, insurance and claims, and farmer-to-buyer produce trading. The README documents backend model and API integrations; sampled frontend excerpts show routing, weather lookup, image submission, and result rendering. Several feature implementations were not sampled, so their internal links are left out.
Main entry points: App.jsx Web app routes · app.py FastAPI endpoints · InputData.jsx Farm data entry · ResultPage.jsx Yield results
Components 23
App and access
- Web app routes
client/src/App.jsx - Auth context
client/src/contexts/AuthContext.jsx
Yield analysis
- Farm data entry
client/src/components/InputData.jsx - Weather lookup
client/src/utils/weatherAPi.js - FastAPI endpoints
server/app.py - OpenWeather API
- XGBoost model
- Yield results
client/src/pages/ResultPage.jsx - Economic analysis
client/src/components/EconomicAnalysis.jsx - PDF report
client/src/components/ReportGenerator.jsx
Plant diagnosis
- Leaf image upload
client/src/pages/PhotoUpload.jsx - Diagnosis results
client/src/pages/PhotoResult.jsx
Produce marketplace
- Marketplace role selection
client/src/components/ChooseRole.jsx - Farmer dashboard
client/src/components/FarmerDashboard.jsx - Crop listings
client/src/components/AddNewProduct.jsx - Buyer dashboard
client/src/components/BuyerDashboard.jsx - Produce browsing
client/src/components/Bmarketplace.jsx
Advice and protection
- Kisan Mitra chat
client/src/components/ChatBot.jsx - Gemini AI
- Insurance recommendations
client/src/components/InsuranceRecommendations.jsx - Insurance claims
client/src/components/ClaimSection.jsx
Other components
- Farmer
- Buyer
Connections 26
- Farmer → Web app routes: uses
README.md - Buyer → Web app routes: uses
README.md - Web app routes → Farm data entry: routes to
client/src/App.jsx - Web app routes → Leaf image upload: routes to
client/src/App.jsx - Web app routes → Diagnosis results: routes to
client/src/App.jsx - Web app routes → Kisan Mitra chat: renders
client/src/App.jsx - Web app routes → Auth context: provides context
client/src/App.jsx - Farm data entry → Weather lookup: fetches weather
client/src/components/InputData.jsx - Weather lookup → OpenWeather API: requests conditions
client/src/utils/weatherAPi.js - Farm data entry → FastAPI endpoints: submits prediction
README.md - FastAPI endpoints → OpenWeather API: fetches weather
README.md - FastAPI endpoints → XGBoost model: runs prediction
README.md - FastAPI endpoints → Yield results: returns prediction
README.md - Yield results → Economic analysis: renders
client/src/pages/ResultPage.jsx - Yield results → PDF report: renders
client/src/pages/ResultPage.jsx - Leaf image upload → FastAPI endpoints: submits image
client/src/pages/PhotoUpload.jsx - FastAPI endpoints → Diagnosis results: returns diagnosis
README.md - Kisan Mitra chat → FastAPI endpoints: sends messages
README.md - FastAPI endpoints → Gemini AI: queries
README.md - Web app routes → Marketplace role selection: routes to
client/src/App.jsx - Web app routes → Farmer dashboard: routes to
client/src/App.jsx - Web app routes → Buyer dashboard: routes to
client/src/App.jsx - Web app routes → Crop listings: routes to
client/src/App.jsx - Web app routes → Produce browsing: routes to
client/src/App.jsx - Farmer → Insurance recommendations: requests advice
README.md - Farmer → Insurance claims: submits claim
README.md