How yash-sojitra-20/crop-recommendation-system works
This is a farmer-facing crop recommendation web app. Farmers enter seven soil and climate values in the React form; the FastAPI endpoint validates the request, gets a nearest-match crop from the CSV-backed recommender, then asks Gemini for a rotation suggestion and Gujarati translations before returning results for display. The UI also provides a home page and a multilingual farmer disease guide. The endpoint and module calls are visible in the sampled source; the frontend-to-backend link is inferred from the matching request path, and no deployment or persistence layer is shown.
Main entry points: App.jsx App routes · main.py Prediction endpoint · CropInputFrom.jsx Prediction form · Navbar.jsx Navigation
Components 12
Farmer interface
- React entry
Frontend/frontend_form/src/main.jsx - App routes
Frontend/frontend_form/src/App.jsx - Navigation
Frontend/frontend_form/src/components/Navbar.jsx - Home page
Frontend/frontend_form/src/pages/Home.jsx - Prediction form
Frontend/frontend_form/src/components/CropInputFrom.jsx - Farmer disease guide
Frontend/frontend_form/src/pages/FarmerGuide.jsx
Prediction API
- Prediction endpoint
Backend/main.py
Crop recommendation
- Constraint and nearest-match predictor
Backend/crop_recommendation/recommendation.py - Crop dataset
Backend/crop_recommendation/Crop_Recommendation.csv
Rotation and translation
- Rotation and translation
Backend/crop_rotation/rotation.py
Other components
- Farmer
- Gemini API
Connections 13
- Farmer → Prediction form: enters conditions
Frontend/frontend_form/src/components/CropInputFrom.jsx - React entry → App routes: renders
Frontend/frontend_form/src/main.jsx - App routes → Navigation: renders
Frontend/frontend_form/src/App.jsx - App routes → Home page: routes to
Frontend/frontend_form/src/App.jsx - App routes → Prediction form: routes to
Frontend/frontend_form/src/App.jsx - App routes → Farmer disease guide: routes to
Frontend/frontend_form/src/App.jsx - Navigation → App routes: navigates routes
Frontend/frontend_form/src/components/Navbar.jsx - Prediction form → Prediction endpoint: posts prediction
Frontend/frontend_form/src/components/CropInputFrom.jsx - Prediction endpoint → Constraint and nearest-match predictor: calls predictor
Backend/main.py - Constraint and nearest-match predictor → Crop dataset: reads dataset
Backend/crop_recommendation/recommendation.py - Prediction endpoint → Rotation and translation: calls rotation
Backend/main.py - Rotation and translation → Gemini API: requests suggestions
Backend/crop_rotation/rotation.py - Prediction endpoint → Prediction form: returns results
Backend/main.py