KhedutMitra is a sophisticated full-stack rural intelligence platform designed for farmer-centric risk monitoring, advisory delivery, and operational excellence. It empowers institutions with real-time data, predictive analytics, and automated communication tools to support rural communities effectively.
Advanced risk scoring engine that computes vulnerability based on:
- Climate Risk: Real-time and historical weather patterns.
- Soil Suitability: Compatibility analysis for specific crops.
- Financial Risk: Loan status, insurance coverage, and market factors.
- Social Risk: Household and demographic indicators.
- Real-time weather monitoring on district levels.
- Intelligent caching strategy to prevent redundant API calls.
- Weather-aware advisories generated for specific crop cycles.
- Dynamic Metrics: Live tracking of average vulnerability scores and unique district reaches.
- Heatmaps: District-wise visualization of risk factors using Leaflet.
- Actionable Insights: Categorized alerts (Critical, High, Medium, Low) for field teams.
- Automated advisory delivery and farmer engagement via Twilio.
- Assisted response flow for conversation tracking.
- Bulk alert generation and status management.
- Computer Vision: Crop disease detection from farmer-uploaded photos using Llama-3 Vision models via Groq.
- Multilingual Support: Instant analysis and advice in Gujarati, Hindi, and English.
- Automatic Logging: Detected issues are automatically logged into the central database for field officer follow-ups.
- Rural Accessibility: Integrated Text-to-Speech (TTS) using Azure Speech Service to convert agricultural advisories into spoken audio.
- Localized Voices: Support for natural-sounding neural voices in Gujarati, Hindi, and English.
- Interactive Engagement: Hybrid interaction model combining text, images, and audio for maximum reach.
- Native support for English, Gujarati, and Hindi.
- Seamless UI localization across all modules (Dashboard, Profile, Alerts).
- Domain-Specific Modeling: Tailored farmer intelligence rather than generic CRM behavior.
- Field-Ready Profiles: Combines agronomy and finance into a single, actionable entity.
- Hybrid Advisory: Merges weather data, risk scoring, and automated alerting.
- Institutional Focus: Dashboards designed for scale, supporting both field officers and superadmins.
- Modular Architecture: Clean isolation of domains into controller/route/service layers.
GenAI-Rural_Intelligence_Platform/
├── backend/ # Express.js Server
│ ├── src/
│ │ ├── config/ # App configuration
│ │ ├── db/ # Migrations, Seeds, and Setup
│ │ │ ├── migrations/
│ │ │ ├── migrate.js
│ │ │ ├── seed.js
│ │ │ └── setup.js
│ │ ├── middleware/ # Auth, Logging, Validation
│ │ ├── modules/ # Domain-driven modules
│ │ │ ├── alerts/
│ │ │ ├── auth/
│ │ │ ├── crops/
│ │ │ ├── dashboard/
│ │ │ ├── disease/
│ │ │ ├── farmers/
│ │ │ ├── institutions/
│ │ │ ├── locations/
│ │ │ ├── schemes/
│ │ │ ├── translation/
│ │ │ ├── users/
│ │ │ ├── vulnerability/
│ │ │ ├── weather/
│ │ │ ├── whatsapp/
│ │ │ └── function-docs/
│ │ └── utils/ # Shared Helpers
│ └── server.js # API Entry Point
├── frontend/ # React Vite Application
│ ├── src/
│ │ ├── api/ # TanStack Query Hooks
│ │ ├── components/ # UI Design System
│ │ ├── hooks/ # Custom React Hooks
│ │ ├── pages/ # Feature Views (Dashboard, Map, Farmers)
│ │ ├── router/ # App Routing
│ │ ├── store/ # Global State (Zustand)
│ │ └── utils/ # Frontend Helpers
│ └── vite.config.js # Build Configuration
└── README.md
- Node.js v20 or higher
- PostgreSQL (running locally or via cloud)
- Go to the
backendfolder. - Install dependencies:
npm install - Configure environment variables in
.env(DATABASE_URL, JWT_SECRET, etc.). - Initialize DB (schema + seed):
npm run db:setup - Start server:
npm run dev
- Go to the
frontendfolder. - Install dependencies:
npm install - Configure
VITE_API_BASE_URLin.env. - Start app:
npm run dev
- Migrations: Include base schema, WhatsApp sessions, farmer sequences, and extended profile fields.
- Smart Seeding: The seed script populates farmers with complete agronomic and financial data, ensuring edit forms display realistic values immediately.
- Auto-Generated: Detailed per-function documentation is located in
backend/src/modules/function-docs. - Index: See
backend/src/modules/function-docs/README.mdfor a complete overview of controller/service logic. - Maintenance: To regenerate, rerun the documentation workflow assigned to backend modules.
/api/auth- Authentication & Refresh Tokens/api/users- User Management & RBAC/api/institutions- Organization Management/api/farmers- Profile CRUD & Life-cycle/api/crops- Crop Catalog & Suitability/api/vulnerability- FVI Calculation Engine/api/schemes- Matching & Eligibility/api/alerts- Operational Monitoring/api/dashboard- Real-time Analytics/api/disease- AI Disease Detection/api/locations- District/Taluka Assets/api/translate- Multilingual Logic/api/whatsapp- Twilio Messaging & Voice Assistant/api/telegram- GenAI Telegram Bot
- Stateful Sessions: JWT with integrated refresh flow for secure, long-lived sessions.
- Input Validation: Strict Joi schemas for all inbound requests.
- Error Handling: Centralized response normalization and logging.
- Weather Reliability: Caching strategy with smart refresh to maintain advisory context.
- Keep migrations forward-only and idempotent.
- Ensure
vulnerabilityweightages are updated in synchronization with institutional policies.
This project is for internal institutional use. Contact the administrator for licensing policies.