How kaleemarif/procuresmart works
ProcureSmart guides farmers toward a procurement centre and time using centre data, waiting-time estimates, and ranked recommendations; it also describes operator queue management and a Sahayak assistant. The visible backend implements prediction, recommendation, synthetic operator state, CEDA lookups, and tool-mediated chat. The README documents additional user-facing capabilities, but sampled frontend excerpts do not establish its API wiring. Prototype centre data and model metrics should not be treated as real-world operational data.
Main entry points: main.py API and state · predict.py Wait predictor · service.py Chat service · tools.py Operational tools
Components 20
User experience
- Farmer guidance
frontend/app/farmer/page.tsx - Centre map
frontend/components/farmer/ProcurementMap.tsx - Operator console
frontend/app/operator - API client
frontend/lib/api.ts
Backend API
- API and state
backend/main.py
Prediction and recommendation
- Centre ranking
backend/recommendation.py - Wait predictor
backend/ml/predict.py - Trained model
backend/ml/artifacts/waiting_time_model.joblib - Feature config
backend/ml/config.py - Feature preprocessing
backend/ml/preprocess.py - Model training
backend/ml/train.py
Sahayak assistant
- Chat endpoint
backend/chatbot/router.py - Chat service
backend/chatbot/service.py - Operational tools
backend/chatbot/tools.py - Assistant prompt
backend/chatbot/prompts.py - Gemini adapter
backend/chatbot/adapter.py
Other components
- Farmer
- Operator
- CEDA service
- Gemini API
Connections 22
- Farmer → Farmer guidance: uses
README.md - Farmer guidance → Centre map: shows map
- Operator → Operator console: uses
README.md - Farmer guidance → API client: uses API
- API client → API and state: requests
- Operator console → API and state: updates state
- API and state → Centre ranking: calls
backend/main.py - API and state → Wait predictor: calls
backend/main.py - API and state → CEDA service: requests data
backend/main.py - Centre ranking → Wait predictor: predicts waits
backend/recommendation.py - Wait predictor → Trained model: loads
backend/ml/predict.py - Wait predictor → Feature config: uses features
backend/ml/predict.py - Model training → Feature preprocessing: builds pipeline
backend/ml/train.py - Feature preprocessing → Feature config: uses feature sets
backend/ml/preprocess.py - Chat endpoint → Chat service: calls
backend/chatbot/router.py - Chat service → Gemini adapter: delegates
backend/chatbot/service.py - Chat service → Operational tools: provides tools
backend/chatbot/service.py - Chat service → Assistant prompt: provides prompt
backend/chatbot/service.py - Gemini adapter → Gemini API: calls API
backend/chatbot/adapter.py - Operational tools → API and state: reads live state
backend/chatbot/tools.py - Operational tools → Centre ranking: calls
backend/chatbot/tools.py - Operational tools → Wait predictor: calls
backend/chatbot/tools.py