Skip to content

Latest commit

ย 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒพ Yukti - An Agricultural Machinery Intelligence & CHC Operations Platform

Yukti Agricultural Machinery Intelligence Platform

Predict. Allocate. Operate. Settle.
A production-ready cloud operations platform connecting Indian farmers, Custom Hiring Centres (CHCs), machinery operators, and agronomists into a unified, high-efficiency equipment sharing economy.

Production Ready 34 Tests Passing TypeScript Stack Vercel Edge Ready Supabase Realtime


๐Ÿ“ธ Platform Showcase Gallery

Tractor Live Tracking
Live Machine Tracking & GPS
Real-time tractor speed, fuel usage, and engine sensor monitoring
Farmer Mobile Portal
Farmer Mobile Marketplace
1-tap tractor booking, plot polygon geofencing & Pay After Harvest
Harvester Fleet Allocation
CHC Fleet Reallocation
Surplus rebalancing, dynamic pricing & regional shortage prediction

๐Ÿšœ The Agronomic Challenge & Yukti Solution

In India's agricultural belt, over 85% of smallholder farmers cannot afford high-capacity machinery (e.g. 75+ HP 4WD Tractors, Tracked Combine Harvesters, Laser Levelers). Concurrently, Custom Hiring Centres (CHCs) suffer from suboptimal fleet utilization (< 32%), unpredictable demand surges, heavy fuel leakages, and delayed cashflow due to informal credit.

Yukti transforms fragmented machinery ownership into a predictable, high-efficiency shared utility:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                 YUKTI CLOSED-LOOP PIPELINE                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
  1. FARM CONTEXT & WEATHER           โ”€โ”€โ”€โ–บ Real-time Open-Meteo Satellite & Live Rain Radar
                                           โ”‚
  2. DEMAND FORECASTING               โ”€โ”€โ”€โ–บ +34% Regional Surge Alerts across District Clusters
                                           โ”‚
  3. FLEET REBALANCING                โ”€โ”€โ”€โ–บ Moves Idle Machinery to High-Demand CHC Centers
                                           โ”‚
  4. SMART MACHINE MATCHING           โ”€โ”€โ”€โ–บ 7-Factor Compatibility Fit with Explainable Reasons
                                           โ”‚
  5. MULTILINGUAL VOICE AI            โ”€โ”€โ”€โ–บ Natural Hindi/Hinglish Voice Booking Assistant
                                           โ”‚
  6. FLEXIBLE CHECKOUT                โ”€โ”€โ”€โ–บ Razorpay Standard Checkout & Pay After Harvest Credit
                                           โ”‚
  7. LIVE OPERATOR COCKPIT            โ”€โ”€โ”€โ–บ GPS Route Tracking, Diesel Logging & Work Timer
                                           โ”‚
  8. MACHINE SENSOR MONITORING        โ”€โ”€โ”€โ–บ Extra Diesel Usage & Engine Temperature Alerts
                                           โ”‚
  9. AUTOMATED GST INVOICING          โ”€โ”€โ”€โ–บ Dispute-Free Branded PDF Receipts with Verified Hours

๐ŸŒŸ Core System Modules

1. ๐Ÿ”ฎ Regional Demand Intelligence Engine

  • Synthesizes regional crop stage progression (Sowing โž” Vegetative โž” Flowering โž” Harvest-Ready), booking density, and live meteorological signals.
  • Computes shortage indices across machinery categories (e.g. 5 Harvesters required vs 2 available in Sehore district).

2. ๐ŸŒฆ๏ธ Live Open-Meteo Weather Risk Radar & RainViewer Doppler

  • Connects directly to Open-Meteo API to fetch real-time satellite telemetry (current temperature, humidity, wind velocity, precipitation).
  • Formulates agronomic harvest risk, distinguishes between immediate 24h rain vs 7-day cumulative rainfall, and computes soil tractability limits (Max 18T machine weight).
  • Integrates interactive RainViewer live Doppler satellite radar loop for tracking incoming precipitation fronts.

3. ๐ŸŽ™๏ธ Multilingual Voice AI Assistant (Kisan Voice)

  • Built for Indian farmers with low digital literacy: farmers can speak naturally in Hindi, Hinglish, or English (e.g. "เคฎเฅเคเฅ‡ เค•เคฒ 5 เคเค•เคกเคผ เค—เฅ‡เคนเฅ‚เค‚ เค•เคŸเคพเคˆ เค•เฅ‡ เคฒเคฟเค เคนเคพเคฐเฅเคตเฅ‡เคธเฅเคŸเคฐ เคšเคพเคนเคฟเค").
  • Extracts structured intent (cropType, acres, activity, date, urgency), searches available inventory, recommends the top-rated machine, and synthesizes natural audio responses.

4. ๐ŸŽฏ 7-Factor Explainable Smart Matching

  • Ranks candidate machines using a weighted compatibility model:
    • Task Suitability (25%) โ€ข Availability (20%) โ€ข Distance (15%) โ€ข Machine Health (15%) โ€ข Tariff Fit (10%) โ€ข Reliability (10%) โ€ข Operator Rating (5%)
  • Delivers transparent, plain-English reasons explaining why the machine fits the farmer's plot.

5. ๐Ÿ’ณ Pay After Harvest (AgriCredit) & Razorpay Gateway

  • AgriCredit Scoring (300โ€“900): Evaluates landholding size, crop variety, and repayment reliability, granting pre-approved credit limits (up to โ‚น10,000) payable within 45 days after selling produce at the APMC Mandi.
  • Razorpay Standard Checkout: Official SDK redirection supporting UPI (Google Pay, PhonePe, Paytm), QR code scanning, RuPay/Visa/MasterCard, and NetBanking.

6. ๐Ÿ“ก Live Machine GPS Tracking & Diesel Alerts

  • Tracks real-time machine speed, fuel remaining (%), diesel usage rate (L/hr), engine heat (ยฐC), and working hours.
  • Automated anomaly sentinels flag diesel leaks (+17% burn rate) and engine heat warnings before mechanical failure occurs.

7. ๐Ÿงพ Automated GST Billing & Branded Tax Invoices

  • Dynamically reconciles booked vs verified engine runtime hours, transportation charges, and 5% GST.
  • Generates downloadable, print-ready branded PDF invoices via jsPDF and html2canvas.

๐Ÿ‘ฅ 4 Role-Based Operational Portals

Portal Route Key Functionalities
๐ŸŒพ Farmer Portal /farmer โ€ข Machinery search & booking
โ€ข Farm acreage & GPS polygon setup
โ€ข Pay After Harvest limit tracker
โ€ข Live tractor GPS route map
โ€ข Downloadable payment receipts
๐Ÿข CHC Hub Hub /chc โ€ข 7-day regional demand forecasting
โ€ข Fleet registry & machine health scoring
โ€ข Inter-hub relocation approvals
โ€ข Live tractor sensor stream & diesel leak alerts
โ€ข GST revenue analytics
๐Ÿšœ Machine Operator /operator โ€ข Active job cockpit with start/pause/finish stopwatch
โ€ข Direct farmer call button & turn-by-turn map
โ€ข Digital diesel refill slip logger
โ€ข Breakdown & maintenance reporter
โ€ข Shift earnings & acreage incentive statement
๐Ÿ›ก๏ธ Platform Admin /admin โ€ข Multi-district hub oversight
โ€ข Dynamic pricing bounds (0.80x โ€“ 1.30x)
โ€ข Cross-district fleet relocation approvals
โ€ข SMAM subsidy compliance & security audit logs

๐Ÿ› ๏ธ Technology Stack

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   CLIENT ARCHITECTURE                  โ”‚
โ”‚   React 18  โ€ข  TypeScript (Strict)  โ€ข  Vite  โ€ข  Tailwindโ”‚
โ”‚   React Router v6  โ€ข  Lucide Icons  โ€ข  Leaflet GIS Mapsโ”‚
โ”‚   jsPDF  โ€ข  html2canvas  โ€ข  Web Speech API (Voice AI)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚ REST / Realtime WebSockets
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    BACKEND & CLOUD                     โ”‚
โ”‚   Supabase Cloud PostgreSQL 15 (RLS, PostGIS, UUIDs)   โ”‚
โ”‚   Supabase Auth & Realtime Channels                    โ”‚
โ”‚   Supabase Edge Functions (Deno Telemetry Webhook)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚ APIs & Gateways
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 EXTERNAL INTEGRATIONS                  โ”‚
โ”‚   Open-Meteo Weather API (Real-time Satellite Forecast)โ”‚
โ”‚   RainViewer Doppler Satellite Telemetry               โ”‚
โ”‚   Razorpay Standard Checkout Payment Gateway           โ”‚
โ”‚   OpenStreetMap & CartoDB Tile Services                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก Quickstart & Local Setup

Prerequisites

  • Node.js: v18.0.0+ or v20.0.0+
  • npm: v9.0.0+

1. Clone & Install

git clone https://github.com/your-org/KisanOps.git
cd KisanOps
npm install

2. Configure Environment Variables

Create a .env file in the root directory:

# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key-here

# Razorpay Payment Gateway (Test Key for Sandbox)
VITE_RAZORPAY_KEY_ID=rzp_test_yourKeyIdHere

(Note: If Supabase credentials are not provided, KisanOps operates with zero downtime using typed seed fallback data).

3. Run Development Server

npm run dev

Open http://localhost:5173 in your browser.

4. Build for Production

npm run build
npm run preview

๐Ÿงช Automated Test Suite

Yukti includes comprehensive unit tests verifying all pricing algorithms, weather intelligence, voice intent extraction, Razorpay order validation, and offline database fallback resilience:

npx vitest run
 RUN  v4.1.11 C:/Users/vastu/OneDrive/Desktop/Projects/KisanOps

 โœ“ src/lib/__tests__/weatherEngine.test.ts (4 tests)
 โœ“ src/lib/__tests__/engines.test.ts (10 tests)
 โœ“ src/services/__tests__/voiceIntent.test.ts (9 tests)
 โœ“ src/lib/__tests__/razorpay.test.ts (6 tests)
 โœ“ src/lib/__tests__/iotAndDb.test.ts (5 tests)

 Test Files  5 passed (5)
      Tests  34 passed (34)
   Duration  1.43s

๐ŸŒ Production Deployment Guide (Vercel)

Yukti is optimized for zero-configuration deployment to Vercel Edge CDN:

Deploy via Vercel CLI

npm install -g vercel
vercel login
vercel

Deploy via GitHub

  1. Push your repository to GitHub: git push origin main.
  2. In the Vercel Dashboard, import your repository.
  3. Framework Preset: Vite
  4. Build Settings:
    • Build Command: npm run build
    • Output Directory: dist
  5. Add VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, and VITE_RAZORPAY_KEY_ID under Environment Variables.
  6. Click Deploy.

๐Ÿ—„๏ธ Database & IoT Webhook Integration

1. Database Schema

Execute supabase/schema.sql in your Supabase SQL Editor to provision all tables (profiles, chcs, machines, farms, bookings, invoices, telemetry_logs, demand_forecasts, allocations).

2. Ingest Hardware GPS & Sensor Payload

Hardware GPS trackers can POST live machine metrics directly to the telemetry endpoint:

curl -X POST "https://your-project.supabase.co/functions/v1/telemetry-webhook" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ANON_KEY" \
  -d '{
    "machineId": "mach-jd-harv-07",
    "latitude": 22.7196,
    "longitude": 75.8577,
    "speedKmh": 18.2,
    "fuelLevelPercent": 82.0,
    "fuelConsumptionRateLph": 7.4,
    "engineHours": 348.5,
    "engineTemperatureC": 86,
    "rpm": 1950,
    "batteryVoltage": 13.6,
    "status": "ACTIVE"
  }'

๐Ÿ“„ License & Compliance

  • Compliance: Designed for Indian Custom Hiring Centres under Sub-Mission on Agricultural Mechanization (SMAM) guidelines.
  • License: MIT License.

About

KisanOps - An Intelligent Smart Operations for Modern Agriculture ๐Ÿ˜

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages