How vbasigamalu/agri-ai works
Agri-AI supports a farmer workflow from account access through crop-image disease analysis and advisory, with separate pest monitoring, forecasting, follow-up, outbreak mapping, and expert review capabilities. The graph shows documented UI-to-server entry points and sampled service ownership; unsampled routes and model wiring are represented only where the tree or README supports the subsystem, without guessing internal call chains.
Main entry points: server.js HTTP API · App.jsx Application Shell · chatbotService.js Agricultural Chat · pestRoutes.js Pest Endpoints
Components 30
Farmer Application
- Application Shell
client/src/App.jsx - Sign-in UI
client/src/components/AuthPage.jsx - Disease Scan UI
client/src/components/DiseaseTab.jsx - Pest Monitor UI
client/src/components/PestTab.jsx - Forecast UI
client/src/components/ForecastTab.jsx - Follow-up UI
client/src/components/FollowupTab.jsx - History UI
client/src/components/HistoryTab.jsx - Outbreak Map UI
client/src/components/OutbreakMapTab.jsx - Expert Review UI
client/src/components/ExpertTab.jsx
Crop Analysis
- Vision Pipeline
backend/vision/index.js - Disease Classifier
backend/classifier.js - Disease Guidance
backend/cropDatabase.js - Scan Artifacts
backend/vision/storage.js - Pest Endpoints
backend/routes/pestRoutes.js - Pest Detection
backend/pestDetector.js
Advisory and Risk
- Risk Engine
backend/forecasting/riskEngine.js - Forecast Endpoints
backend/routes/forecastRoutes.js - Agricultural Chat
backend/services/chatbotService.js - Knowledge Service
backend/services/knowledgeBaseService.js
Monitoring and Review
- Follow-up Service
backend/services/followupService.js - Spatial Endpoints
backend/routes/spatialRoutes.js - Spatial Analysis
backend/spatial.js - Expert Review Endpoints
backend/routes/expertRoutes.js - Case Queue
backend/jobs/queue.js
Backend Services
- HTTP API
backend/server.js - Database Access
backend/dbHelper.js - MongoDB
backend/postgres.js
Other components
- Farmer
- Weather API
- Groq AI
Connections 37
- Farmer → Application Shell: uses
- Application Shell → Sign-in UI: shows
- Application Shell → Disease Scan UI: shows
- Application Shell → Pest Monitor UI: shows
- Application Shell → Forecast UI: shows
- Application Shell → Follow-up UI: shows
- Application Shell → History UI: shows
- Application Shell → Outbreak Map UI: shows
- Application Shell → Expert Review UI: shows
- Sign-in UI → HTTP API: requests
- Disease Scan UI → HTTP API: submits scan
- HTTP API → Vision Pipeline: processes image
- HTTP API → Disease Classifier: classifies
- HTTP API → Disease Guidance: gets guidance
- HTTP API → Weather API: fetches weather
- HTTP API → MongoDB: persists scan
- Pest Monitor UI → Pest Endpoints: requests
- Pest Endpoints → Pest Detection: detects pest
- Pest Endpoints → Database Access: stores reports
- Forecast UI → Forecast Endpoints: requests
- Forecast Endpoints → Risk Engine: computes risk
- Follow-up UI → HTTP API: requests
- HTTP API → Follow-up Service: handles follow-up
- History UI → HTTP API: requests
- Outbreak Map UI → Spatial Endpoints: requests
- Spatial Endpoints → Spatial Analysis: queries reports
- Expert Review UI → Expert Review Endpoints: requests
- Expert Review Endpoints → Case Queue: enqueues cases
- Pest Endpoints → Case Queue: escalates cases
- Expert Review Endpoints → Database Access: reads and updates
- Agricultural Chat → Database Access: loads case context
- Agricultural Chat → Knowledge Service: searches guidance
- Agricultural Chat → Weather API: fetches context
- Agricultural Chat → Groq AI: requests answer
- HTTP API → Groq AI: requests chat
- Database Access → MongoDB: accesses records
- Vision Pipeline → Scan Artifacts: saves artifacts