How shekhar-commit/crop_disease_detection works
AgriDoc AI lets a farmer upload a crop image and receive a disease diagnosis and practical recovery plan in Hindi or English. The React app manages image selection, submits the image and language to the diagnosis API, displays the returned report, and stores recent scans in browser local storage. The Express endpoint builds a language-specific diagnostic prompt and requests analysis from Gemini. The excerpts show these main interactions; other UI behavior and styling are not fully sampled.
Main entry points: App.tsx Diagnosis interface · server.ts Diagnosis endpoint · main.tsx App bootstrap
Components 6
Farmer app
- App bootstrap
src/main.tsx - Diagnosis interface
src/App.tsx - Recent scans
src/App.tsx
Diagnosis service
- Diagnosis endpoint
server.ts
AI provider
- Gemini AI
Other components
- Farmer
Connections 6
- App bootstrap → Diagnosis interface: renders
src/main.tsx - Farmer → Diagnosis interface: uploads image
src/App.tsx - Diagnosis interface → Diagnosis endpoint: posts image
src/App.tsx - Diagnosis endpoint → Gemini AI: requests analysis
server.ts - Diagnosis endpoint → Diagnosis interface: returns report
server.ts - Diagnosis interface → Recent scans: stores scans
src/App.tsx