An AI-powered parametric insurance platform for India's 12 million gig delivery workers.
Zero claim forms. Zero paperwork. Automatic UPI payout in 120 seconds.
LIVE DEMO
Β·
Bot Simulator
Β·
View Demo phase 1 Video
Β·
View Demo phase 2 Video
.
App Demo (Try it on phone)
.
View Presentation
Table of Contents
- The Problem β 12 Million Workers, Zero Protection
- Who We Build For β Persona Stories
- The Solution β Smart Income Shield
- How It Works β End-to-End Workflow
- The Weekly Premium Model
- AI/ML Integration β Kavach Engine
- π‘οΈ Adversarial Defense & Anti-Spoofing Strategy
- Tech Stack
- Platform Choice Justification
- Database Schema
- Phase 2 β Registration Process
- Phase 2 β Insurance Policy Management
- Phase 2 β Dynamic Premium Calculation
- Phase 2 β Claims Management & Automated Triggers
- Phase 3 β Advanced Fraud Detection
- Phase 3 β Instant Payout System
- Phase 3 β Intelligent Dashboards
- Getting Started
- Development Roadmap
- Team & Contributors
India has 12 million gig delivery workers. Every single one of them is exposed to income loss from events completely beyond their control β and not a single parametric income protection product exists for this segment today.
| Reality | The Number |
|---|---|
| Gig delivery workers in India | 12,000,000 |
| Monthly income lost during monsoon/heatwave | 20β30% |
| Time to resolve a traditional insurance claim | 3 weeks |
| Number of documents required for a standard claim | 10 PDFs |
| Actual payout received for disruption under existing plans | βΉ500 in 3 months |
| Parametric income protection products available for gig workers | 0 |
The disruptions we cover:
- Heavy Rain β IMD Red Alert (rainfall > 65mm/hr)
- Extreme Heat β Temperature exceeding 45Β°C
- Severe Air Pollution β AQI > 300 (hazardous to health)
- App Outages β Zomato/Swiggy platform failures on peak nights
- Curfews & Strikes β Government-issued movement restrictions
These aren't edge cases. For a delivery rider in Delhi, these are monthly occurrences.
Ravi is 31 years old. Full-time Zomato rider, Okhla Industrial Zone, New Delhi. He's been on the road for 4 years. He wakes up at 7am, logs on by 8, and rarely stops before 8pm. On a good day, he makes βΉ800. That money feeds his wife and six-year-old daughter.
When the Delhi monsoon hits β and it always hits β Ravi parks under a flyover and waits. He can't deliver. He can't earn. The platform doesn't compensate him. He's tried insurance before β once. The form asked for documents he didn't have. The claim was rejected after 3 weeks without explanation. He never tried again.
In a typical July, Ravi loses 7-9 working days to rain. That's βΉ5,600ββΉ7,200 gone. With zero safety net.
| Detail | Ravi's Reality |
|---|---|
| Employment Type | Full-time, self-employed |
| Platform | Zomato, Okhla Zone |
| Daily Earnings | βΉ800/day |
| Daily Hours | 10β12 hours |
| Device | Entry-level Android, WhatsApp, PhonePe |
| Insurance Experience | Never successfully claimed |
| Monthly Income Loss (Monsoon) | 20β30% (~βΉ4,800ββΉ7,200) |
OffShift for Ravi: He texts "HI" to our WhatsApp number once. 60 seconds later, he has βΉ99/week coverage. The next time it rains β really rains β he gets a WhatsApp notification and βΉ1,500 appears in his PhonePe. He didn't fill a single form.
OffShift is a parametric insurance engine β payouts are triggered by objective, external data conditions, never by self-reported claims. Five pillars underpin the entire system:
- WhatsApp-First Onboarding β 60-second signup. Phone number + UPI ID only. No app download. No documents.
- Weekly Micro-Premium Model β Sachet-sized pricing (βΉ49/βΉ99/βΉ349) built around gig workers' weekly cash flows.
- Kavach AI Engine β Our proprietary XGBoost model prices risk to the pincode level, dynamically per rider.
- Parametric Auto-Triggers β IMD API, AQICN API, Downdetector, GPS cluster inactivity β objective data only. No subjective judgment.
- 120-Second UPI Auto-Payout β Razorpay API sends money directly to the rider's UPI handle. Zero claim forms. Ever.
STEP 1: ONBOARDING (60 seconds)
ββββββββββββββββββββββββββββββββββββββββββββββββ
Rider texts "HI" to OffShift WhatsApp
β Dialogflow CX bot collects: name, pincode, UPI ID
β Kavach AI scores zone risk for that pincode
β Personalized weekly premium generated (βΉ39ββΉ79 range)
β Rider pays via PhonePe UPI deep link
β Coverage ACTIVE β all within 60 seconds
STEP 2: MONITORING (Every 15 Minutes)
ββββββββββββββββββββββββββββββββββββββββββββββββ
Node.js cron job runs every 15 minutes:
β Polls IMD Weather API for Red Alerts by pincode
β Polls AQICN API for pollution levels by zone
β Monitors Downdetector for Zomato/Swiggy outage spikes
β Cross-references rider GPS cluster inactivity from Supabase
STEP 3: PARAMETRIC TRIGGER
ββββββββββββββββββββββββββββββββββββββββββββββββ
Condition met if:
β Rainfall > 65mm/hr (IMD Red Alert) OR
β Temperature > 45Β°C OR
β AQI > 300 OR
β Downdetector spike + 50 riders GPS-inactive in same 5km zone
β Trigger event logged to Supabase
β Kavach Trust Score calculated per rider
β Payout queue initiated
STEP 4: PAYOUT (Trust-Scored, Tiered)
ββββββββββββββββββββββββββββββββββββββββββββββββ
Trust Score > 0.75 β Razorpay UPI payout in 120 seconds
Trust Score 0.40-0.75 β 1 WhatsApp message β payout in 3 mins
Trust Score < 0.40 β 15-min admin hold β auto-release if confirmed
Traditional insurance charges βΉ2,000ββΉ5,000/year for plans that exclude gig workers entirely. OffShift charges for what the rider actually needs, when they need it.
| Plan | Price | Duration | Max Payout | Coverage |
|---|---|---|---|---|
| Shift Pass | βΉ49 | 24 hours | βΉ500 | Heavy Rain, Heatwave |
| Weekly Pass | βΉ99 | 7 days | βΉ1,500 | Weather + App Outages |
| Monthly Pro | βΉ349 | 30 days | βΉ4,000 | All disruptions + Curfews |
The weekly base premium is adjusted Β±βΉ10 based on 4 real-time signals:
- Historical rainfall frequency for rider's pincode (last 3 years of IMD data)
- Rider shift pattern β a morning rider in Okhla vs an evening rider in Gurugram face different risk profiles
- Weather forecast lead time β if a storm is coming in 6 hours, the premium adjusts upward
- Zone-level historical payout ratio β pincodes with high historical claims share higher collective risk
This means Ravi in monsoon-prone Okhla pays a contextually accurate premium β not a generic flat fee designed for someone in Rajasthan.
Kavach is our AI core. It is not a black box β it is three distinct, purpose-built models, each solving a specific problem.
Purpose: Generate a personalized, risk-appropriate weekly premium per rider per pincode.
| Attribute | Detail |
|---|---|
| Algorithm | XGBoost (Gradient Boosted Trees) |
| Library | scikit-learn + xgboost (open source, free) |
| Input Features | pincode, day of week, shift hour, IMD forecast score, historical payout ratio for zone, rider shift pattern baseline, hours until predicted event |
| Output | Dynamic weekly premium in βΉ39ββΉ79 range |
| Training Data | IMD historical rainfall records (public), OpenWeatherMap Historical API, synthetic rider activity data |
# Kavach Pricing Engine β Simplified Feature Vector
features = {
'pincode_risk_score': 0.73, # 3-year historical IMD payout ratio
'day_of_week': 3, # Wednesday
'shift_hour': 18, # 6pm start
'imd_forecast_score': 0.85, # High confidence 24hr rain forecast
'zone_historical_payout_rate': 0.41, # 41% of events in this zone triggered payout
'hours_to_event': 6, # Storm predicted in 6 hours
'rider_morning_vs_evening': 1, # Evening rider = higher rain exposure
}
# Model output β premium = βΉ67 (base βΉ49 + βΉ18 risk adjustment for Okhla, July)Purpose: Distinguish a genuine platform outage from riders simply going offline on purpose.
| Attribute | Detail |
|---|---|
| Algorithm | Isolation Forest (Anomaly Detection) |
| Library | scikit-learn (free) |
| Input | GPS ping frequency per rider cluster, Downdetector scrape data, time-of-day baseline activity patterns |
| Output | Binary β REAL_OUTAGE or FALSE_OFFLINE |
| Threshold | 50+ riders in the same 5km zone showing simultaneous inactivity required |
A genuine app outage creates a sharp, correlated inactivity spike across a geographic cluster β a statistical anomaly the Isolation Forest excels at detecting. Riders individually going offline creates no such spatial correlation.
Purpose: Score every rider's claim with a Trust Weight from 0.0 to 1.0 using 6 independent behavioral signals.
| Signal | Data Source | What It Catches |
|---|---|---|
| GPS vs Cell Tower Match | OpenCelliD API (free) | Spoofed GPS location |
| Accelerometer Micro-Pattern | Browser DeviceMotion API (free) | Spoofer sitting at home vs rider in storm |
| App Activity Fingerprint | Last Zomato/Swiggy session timestamp | Was rider actually on-shift before the event? |
| Historical Shift Pattern Deviation | Supabase 4-week baseline | Rider claiming in zone they've never worked |
| Subscription Timing vs Alert Gap | Trigger event timestamp | Subscribed after Red Alert went public? |
| Device Fingerprint Uniqueness | Browser fingerprint hash | Same device used for multiple accounts |
# Trust Score Calculation β Weighted Average
trust_score = (
0.25 * gps_cell_tower_match + # Highest weight β hardest to fake
0.20 * accelerometer_score +
0.20 * app_activity_score +
0.15 * shift_pattern_score +
0.10 * subscription_timing_score +
0.10 * device_fingerprint_score
)
# Output: 0.0 (certain fraud) to 1.0 (certain genuine)Payout tiers based on Trust Score:
> 0.75β Instant UPI payout in 120 seconds0.40 β 0.75β Single WhatsApp soft-verify β payout in 3 mins< 0.40β 15-minute hold β auto-release if confirmed independently
The Market Crash Scenario: A coordinated syndicate of 500 riders uses GPS-spoofing apps to fake their location inside a Red Alert weather zone β while sitting safely at home β triggering mass false payouts and draining the liquidity pool.
Simple GPS verification is dead. Our defense goes 6 layers deeper.
Our parametric model's biggest vulnerability is location fraud at scale. A genuine stranded rider and a GPS-spoofed rider look identical on a map. They look completely different across 5 behavioral dimensions and 1 mathematical mechanism. Here is exactly how we catch them.
Layer 1 β Cell Tower Triangulation
GPS coordinates can be fabricated in software. Physical cell tower connections cannot be faked without being physically present. Every rider's reported GPS location is cross-referenced against their actual connected cell tower ID, retrieved via the OpenCelliD API (free, global coverage). A rider claiming to be in Okhla but connected to a cell tower in Dwarka is flagged instantly. Cost: βΉ0.
Layer 2 β Accelerometer Micro-Pattern Analysis
A rider genuinely parked in heavy rain β even completely stationary β experiences ambient micro-vibrations: passing vehicles, raindrops on the bike, wind. A person sitting on a sofa at home registers a near-zero, flat accelerometer reading. We score physical plausibility using the browser DeviceMotion API (free, no permissions beyond HTTPS). Spoofers at home produce a telltale flat line. Flagged.
Layer 3 β Shift History Behavioral Baseline
Kavach AI builds a 4-week activity baseline per rider stored in Supabase: which pincodes they work in, what hours, which days of the week. A rider who has never made a single delivery in Connaught Place suddenly claiming a payout there during a Red Alert is a statistical anomaly with near-zero false positive risk. Flagged instantly.
Layer 4 β Temporal Subscription Analysis
Genuine riders subscribe before disruptions happen. Opportunist fraudsters subscribe during active Red Alerts. Any subscription placed within 10 minutes of a publicly announced Red Alert is automatically moved to a Pending Verification queue β never instant payout. This alone eliminates reactive fraud with zero tech cost.
Layer 5 β Fraud Ring Detection (Isolation Forest)
Coordinated ring fraud leaves unmistakable statistical signatures that individual fraud cannot:
| Ring Fraud Signal | Normal Behavior | Fraud Ring Signature |
|---|---|---|
| Subscription timing | Spread over days/weeks | 50+ subscriptions within 60 minutes of alert |
| Device fingerprints | Unique devices, varied models | Multiple accounts sharing same device_id hash |
| Cell tower overlap | Riders spread across zone | Unnatural cluster hitting the same 1β2 towers |
| UPI receiver patterns | Diverse payout accounts | Multiple accounts routing to same UPI handle |
| Accelerometer variance | High (environmental vibration) | Near-zero across entire group |
When 3 or more of these signals fire simultaneously across a cluster of riders, our Isolation Forest model raises a ** Syndicate Alert** β freezing payouts for that cluster and routing them to the admin dashboard for a 15-minute human review.
Layer 6 β Weighted Quorum Trust Voting
This is the mathematical kill-shot for coordinated spoofing.
Our anti-fraud layer already requires 50+ riders in a 5km zone to confirm an outage. We upgrade this: each rider's confirmation carries a Trust Weight (0.0β1.0) based on their behavioral Trust Score. The payout only fires when the weighted quorum crosses a threshold β not a raw count.
Scenario A β 500 Spoofed Riders:
500 riders Γ Trust Weight 0.1 = 50 weighted votes
Payout threshold: NOT MET
Scenario B β 50 Genuine Riders:
50 riders Γ Trust Weight 0.9 = 45 weighted votes
Payout threshold: MET β payout fires
500 GPS-spoofed accounts cannot collectively generate enough trusted signal to trigger a payout. This is mathematically unsolvable for fraudsters without physical presence.
The hardest design problem: a genuine rider in a storm may have weak GPS signal, low accelerometer readings (sheltering under a bridge), or a new account with no behavioral baseline. Here is our 3-Tier Response System β not a binary approve/reject:
| Tier | Trust Score | Action | Experience |
|---|---|---|---|
| Auto-Approve | > 0.75 | UPI payout in 120 seconds | Zero friction β 85%+ of genuine riders |
| Soft Verify | 0.40 β 0.75 | 1 WhatsApp message: "Reply YES to confirm you're on shift" | Payout in 3 minutes after reply |
| Hold & Review | < 0.40 | 15-minute admin review; auto-release if IMD + cell tower confirm disruption independently | WhatsApp update sent; no penalty, no rejection |
The Golden Rule: We NEVER deny a claim based on a single signal. Denial requires 3+ independent signals pointing to fraud. When in doubt β we pay.
A βΉ500 false positive costs us less than destroying the trust of 10 genuine riders forever.
Every component is free or open-source. Total infrastructure cost: βΉ0.
| Layer | Technology | Purpose | Cost |
|---|---|---|---|
| Bot Interface | WhatsApp Business API (sandbox) + Dialogflow CX | Rider onboarding & soft-verify flow | Free |
| Frontend | React + Vite + Tailwind CSS | Admin analytics dashboard | Free |
| Backend | Node.js (TypeScript) + Express.js | API server, cron jobs, webhook handlers | Free |
| Hosting | Vercel (frontend) + AWS Lambda free tier (backend) | Production hosting | Free |
| Database | Supabase (PostgreSQL) | All persistent data + real-time subscriptions | Free tier |
| Cache | Upstash Redis (free tier) | Active storm event state, rate limiting | Free |
| ML Models | Python + scikit-learn + XGBoost | Kavach Pricing Engine, Isolation Forest | Open source |
| Weather Oracle | IMD API + OpenWeatherMap free tier | Rainfall, temperature triggers | Free |
| AQI Oracle | AQICN API (free tier) | Pollution level triggers | Free |
| Outage Oracle | Downdetector scraper + GPS cluster analysis | App outage validation | Free |
| Payments | Razorpay test mode + PhonePe UPI sandbox | Automated UPI payouts | Free (sandbox) |
| Auth | Supabase Auth | Rider & admin authentication | Free |
| Cell Tower | OpenCelliD API | Anti-spoofing triangulation | Free |
| Motion Data | Browser DeviceMotion API | Accelerometer fraud signal | Free (browser) |
| Fraud Detection | scikit-learn Isolation Forest | Ring fraud detection | Open source |
The single most important product decision we made.
| Factor | Native App | WhatsApp (Our Choice) |
|---|---|---|
| Adoption barrier | Download required, ~50MB | Zero β already installed |
| Device compatibility | Requires Android 8+ | Works on βΉ5,000 phones from 2019 |
| Notification reliability | Depends on battery optimization | WhatsApp messages always delivered |
| UPI payment flow | Deep link integration needed | Native UPI links work inside WhatsApp |
| Time to first interaction | 5β10 minutes (download + signup) | 60 seconds |
| Battery impact | Constant background drain | None |
95% of delivery riders already use WhatsApp daily. Meeting them where they already are β not asking them to change their behavior β is the only way a βΉ49 product gets adopted at scale.
- Real-time Supabase subscriptions work natively in browser β no iOS/Android deployment required
- Lightweight, instant deployment to Vercel β no app store approval delays
- Works on any device for the insurance operations team
- Admin users are not the same constraints as field riders
All data is stored in Supabase (PostgreSQL) with Row-Level Security (RLS) enforced at the database level.
-- Riders (Insured Workers)
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
phone TEXT UNIQUE NOT NULL,
pincode TEXT NOT NULL,
upi_id TEXT NOT NULL,
trust_score FLOAT DEFAULT 0.5,
device_fingerprint TEXT,
created_at TIMESTAMPTZ DEFAULT now()
);
-- Insurance Policies / Plans
CREATE TABLE policies (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL, -- 'Shift Pass', 'Weekly Pass', 'Monthly Pro'
duration_hours INTEGER NOT NULL, -- 24, 168, 720
base_premium_inr INTEGER NOT NULL, -- 49, 99, 349
max_payout_inr INTEGER NOT NULL, -- 500, 1500, 4000
coverage_types TEXT[] NOT NULL -- ['rain', 'heat', 'aqi', 'outage', 'curfew']
);
-- Active Coverage Sessions
CREATE TABLE active_sessions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id),
policy_id UUID REFERENCES policies(id),
kavach_premium_inr INTEGER NOT NULL, -- Dynamic AI-adjusted premium
start_time TIMESTAMPTZ DEFAULT now(),
end_time TIMESTAMPTZ NOT NULL,
status TEXT DEFAULT 'active' -- 'active', 'expired', 'claimed'
);
-- Trigger Events (Parametric Conditions)
CREATE TABLE trigger_events (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
event_type TEXT NOT NULL, -- 'rain', 'heat', 'aqi', 'outage', 'curfew'
pincode TEXT NOT NULL,
severity_value FLOAT NOT NULL, -- 74.2mm/hr, 47Β°C, AQI 340, etc.
triggered_at TIMESTAMPTZ DEFAULT now(),
source_api TEXT NOT NULL, -- 'IMD', 'AQICN', 'Downdetector'
resolved BOOLEAN DEFAULT false
);
-- Claims / Payouts
CREATE TABLE claims (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id),
session_id UUID REFERENCES active_sessions(id),
trigger_event_id UUID REFERENCES trigger_events(id),
amount_inr INTEGER NOT NULL,
trust_score_at_claim FLOAT NOT NULL,
tier INTEGER NOT NULL, -- 1 (auto), 2 (soft verify), 3 (hold)
status TEXT DEFAULT 'pending', -- 'pending', 'paid', 'rejected', 'review'
razorpay_payout_id TEXT,
created_at TIMESTAMPTZ DEFAULT now(),
paid_at TIMESTAMPTZ
);Onboarding is WhatsApp-native, zero-download, 60 seconds flat. No app stores. No email. No KYC documents.
Rider texts "HI" β WhatsApp Business API
β Dialogflow CX bot initiates conversational flow
β Collects: Full Name, Pincode, Delivery Platform (Zomato/Swiggy/Both)
β Collects: UPI ID (validated via Razorpay Contact API)
β Auto-generates: Device Fingerprint (browser hash)
β Kavach AI runs initial zone risk scoring
β Rider profile created in Supabase `users` table
β Welcome message + plan options sent instantly
| Channel | Method | Target Segment |
|---|---|---|
| WhatsApp Bot | Text "HI" to OffShift number | Primary β 95% of riders |
| Web PWA | offshift.vercel.app/register |
Admin/insurer onboarding |
| Voice (Hindi) | Whisper-powered voice command on PWA | Low-literacy riders |
| Field | Source | Purpose |
|---|---|---|
| Name | Rider input | Identity |
| Phone | WhatsApp number (auto) | Auth + notifications |
| Pincode | Rider input | Zone risk scoring |
| UPI ID | Rider input (validated) | Instant payout destination |
| Platform | Rider selects | Outage trigger mapping |
| Device Fingerprint | Auto-generated browser hash | Fraud detection signal |
| Registration Timestamp | System | Temporal fraud analysis |
Policies are sachet-sized, weekly, and rider-controlled. No annual lock-ins. No hidden clauses.
CREATION β ACTIVE β MONITORING β TRIGGERED β CLAIMED β EXPIRED/RENEWED
| Plan | Duration | Base Premium | Max Payout | Coverage Scope |
|---|---|---|---|---|
| π’ Shift Pass | 24 hours | βΉ49 | βΉ500 | Heavy Rain + Heatwave |
| π΅ Weekly Pass | 7 days | βΉ99 | βΉ1,500 | Weather + App Outages |
| π£ Monthly Pro | 30 days | βΉ349 | βΉ4,000 | All disruptions + Curfews + Strikes |
- Instant Activation: Policy goes live the moment UPI payment is confirmed via Razorpay webhook
- Auto-Renewal via WhatsApp: Bot sends renewal reminder 6 hours before expiry with one-tap UPI link
- Plan Upgrades: Rider can upgrade mid-week (e.g., Shift Pass β Weekly Pass) β prorated billing
- Coverage History: Full history of all policies, triggers, and payouts accessible via WhatsApp command
"MY HISTORY" - Family/Pod Coverage: Riders can add dependents or form "Resilience Pods" of 5β10 riders for group discounts
[CREATED] ββpayment confirmedβββ [ACTIVE]
[ACTIVE] ββduration expiresββββ [EXPIRED] ββrenewalβββ [ACTIVE]
[ACTIVE] ββtrigger eventβββββββ [TRIGGERED] ββpayoutβββ [CLAIMED]
[ACTIVE] ββrider cancelsβββββββ [CANCELLED]
Every rider gets a personalized premium β not a flat fee. Kavach AI adjusts Β±βΉ10ββΉ30 from the base price using hyper-local risk factors.
The core innovation: We use Machine Learning to adjust the Weekly premium based on hyper-local risk factors. This is NOT a lookup table β it's a trained gradient-boosted model that learns from historical weather patterns, rider behavior, and zone-specific claims data.
| Attribute | Detail |
|---|---|
| Algorithm | XGBoost (Gradient Boosted Decision Trees) |
| Library | scikit-learn + xgboost (Python), inference also in JS via ONNX |
| Input Features | 10 hyper-local risk signals (see below) |
| Output | Personalized weekly premium in βΉ39ββΉ149 range |
| Training Data | IMD historical rainfall (3 years, public), OpenWeatherMap API, AQICN historical, synthetic rider profiles |
| Retraining Schedule | Weekly, using latest 4 weeks of claims + weather data |
| Inference Time | <50ms per rider |
# Feature vector fed to XGBoost model for each rider
features = {
'pincode_risk_score': 0.73, # 3-year IMD historical payout ratio for pincode
'day_of_week': 3, # Wednesday (mid-week = lower risk)
'shift_hour': 18, # 6 PM start = evening monsoon window
'imd_forecast_score': 0.85, # High-confidence 24hr rain prediction
'zone_payout_history': 0.41, # 41% historical claim rate in this zone
'hours_to_predicted_event': 6, # Storm arriving in 6 hours
'rider_shift_pattern': 1, # Evening rider = higher rain exposure
'aqi_7day_trend': 285, # Rising AQI approaching hazardous
'waterlogging_zone_flag': True, # Pincode in known waterlogging area
'rider_claim_frequency': 0.12, # Rider's personal claim rate (low = discount)
}
# Output: premium = βΉ67 (base βΉ49 + βΉ18 Okhla monsoon risk adjustment)[IMD Historical Data] βββ
[OpenWeatherMap API] βββ€
[AQICN Historical] βββΌβββ [Feature Extraction] βββ [XGBoost Training]
[Rider Activity Logs] βββ€ β
[Claims History] βββ βΌ
[Trained Model .pkl]
β
[ONNX Export for JS]
β
[Real-Time Inference]
(POST /api/calculate-premium)
| Risk Factor | Effect on Premium | Data Source | Example |
|---|---|---|---|
| Pincode in historically safe zone (no waterlogging) | ββΉ2 to ββΉ5/week | IMD flood maps | Rider in Vasant Kunj (no flooding history) saves βΉ2/week |
| Storm predicted within 6 hours | +βΉ8 to +βΉ15 | OpenWeatherMap forecast | Cyclone approaching = premium adjusts upward |
| Rider has zero claims in last 4 weeks | ββΉ5 loyalty discount | Supabase history | Long-term riders rewarded for low claims |
| AQI trending above 300 for 3+ days | +βΉ10 pollution surcharge | AQICN API | Delhi winter smog = higher AQI risk |
| Resilience Pod membership (5+ riders) | β25% group discount | Pod smart contract | Social incentive for group coverage |
| Predictive weather modelling shows clear week | Extended coverage hours at same price | ML forecast | Clear forecast = 168hrs coverage for price of 120hrs |
| Rider operates in known waterlogging zone | +βΉ3 to +βΉ8/week | IMD + municipal flood data | Okhla Industrial Area = higher water risk |
| Weekend shift (Sat/Sun peak hours) | +βΉ2 surge adjustment | Historical delivery data | Weekend rain during peak = maximum disruption |
Example 1 β Ravi (Okhla, Evening Rider, Monsoon Season):
Base Weekly Pass: βΉ99
+ Okhla waterlogging: +βΉ5 (known flood zone)
+ Evening shift risk: +βΉ3 (6PMβ10PM monsoon window)
+ IMD storm in 6 hours: +βΉ12 (high forecast confidence)
β Zero claims (4 weeks): ββΉ5 (loyalty discount)
βββββββββββββββββββββββββββββ
FINAL PREMIUM: βΉ114/week
Coverage Hours: 168 hours (standard)
Example 2 β Priya (Vasant Kunj, Morning Rider, Clear Week):
Base Weekly Pass: βΉ99
β No waterlogging zone: ββΉ2 (historically safe)
β Morning shift (low): ββΉ0 (no adjustment)
β Clear week forecast: ββΉ0 (but gets +24hr bonus coverage)
β Zero claims (8 weeks): ββΉ5 (loyalty discount)
βββββββββββββββββββββββββββββ
FINAL PREMIUM: βΉ92/week
Coverage Hours: 192 hours (+24hr bonus for clear forecast)
Example 3 β Amit (Gurugram, AQI Season):
Base Monthly Pro: βΉ349
+ AQI trending 320: +βΉ10 (pollution surcharge)
+ 3-day sustained hazard: +βΉ5 (extended exposure)
β Pod member (8 riders): ββΉ87 (25% group discount)
βββββββββββββββββββββββββββββ
FINAL PREMIUM: βΉ277/month
POST /api/calculate-premium
Body: { "rider_id": "uuid", "plan_type": "weekly", "pincode": "110020" }
Response: {
"base_premium": 99,
"risk_adjustments": [
{ "factor": "waterlogging_zone", "adjustment": +5, "source": "IMD flood map" },
{ "factor": "evening_shift", "adjustment": +3, "source": "rider shift pattern" },
{ "factor": "storm_forecast_6hr", "adjustment": +12, "source": "OpenWeatherMap" },
{ "factor": "loyalty_4_weeks", "adjustment": -5, "source": "claims history" }
],
"total_risk_adjustment": +15,
"final_premium": 114,
"coverage_hours": 168,
"bonus_hours": 0,
"model_confidence": 0.87,
"risk_factors": ["waterlogging_zone", "evening_shift", "forecast_rain_6hr"]
}
Zero-touch. Zero-form. 120 seconds from trigger to UPI deposit.
The entire claims process is fully automated β riders never fill a form, upload a document, or speak to an agent.
We monitor 5 independent data sources via cron jobs running every 15 minutes. Each trigger uses a public API (or mock equivalent for demo) to objectively identify disruptions that cause income loss:
| # | Trigger | Threshold | Public API | Endpoint | Verification Method |
|---|---|---|---|---|---|
| 1 | π§οΈ Heavy Rainfall | >65mm/hr (IMD Red Alert) | IMD Weather API + OpenWeatherMap | api.openweathermap.org/data/2.5/weather?q={pincode} |
Cross-verified: IMD confirms OWM reading |
| 2 | π₯ Extreme Heat | >45Β°C sustained 3+ hrs | OpenWeatherMap API | api.openweathermap.org/data/2.5/forecast?q={pincode} |
3-hour rolling average check |
| 3 | π¨ Hazardous AQI | AQI >300 (Hazardous) | AQICN API (aqicn.org) | api.waqi.info/feed/{city}/?token={key} |
3-hour sustained reading required |
| 4 | π± App Outage | Spike + 50 riders GPS-inactive | Downdetector Scraper + GPS cluster | Custom scraper on downdetector.in/status/zomato |
Isolation Forest anomaly detection |
| 5 | π« Curfew/Strike | Govt notification + news | NewsAPI | newsapi.org/v2/everything?q=curfew+{city} |
Admin dashboard manual confirmation |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRIGGER MONITOR (Node.js Cron) β
β Runs every 15 minutes β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β IMD Weather β β OpenWeather β β AQICN API β β
β β API β β Map API β β β β
β β (Rainfall) β β (Temp) β β (AQI) β β
β ββββββββ¬ββββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β β
β ββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄βββββββ β
β β THRESHOLD COMPARATOR β β
β β Rain >65mm? β Temp >45Β°C? β AQI >300? β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ β
β β YES β
β ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ β
β β TRIGGER EVENT LOGGER β β
β β β Log event type, pincode, severity, timestamp β β
β β β Query active riders in affected zone β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ β
β β KAVACH TRUST SCORER β β
β β β 6-signal behavioral analysis per rider β β
β β β Output: Trust Score 0.0 β 1.0 β β
β ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββ β
β β TIERED PAYOUT ENGINE β β
β β Score >0.75 β Razorpay UPI instant (120 sec) β β
β β Score 0.40β0.75 β WhatsApp soft-verify (3 min) β β
β β Score <0.40 β Admin hold + auto-release (15 min) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Each oracle returns standardized data for the trigger monitor to evaluate:
// Weather Oracle Response (IMD + OpenWeatherMap)
{
"pincode": "110020",
"rainfall_mm_hr": 74.2,
"temperature_c": 32,
"alert_level": "RED",
"source": "IMD",
"cross_verified": true,
"timestamp": "2026-07-15T16:00:00+05:30"
}
// AQI Oracle Response (AQICN)
{
"pincode": "110020",
"aqi": 342,
"dominant_pollutant": "PM2.5",
"sustained_hours": 4,
"alert_level": "HAZARDOUS",
"source": "AQICN",
"timestamp": "2026-11-10T08:00:00+05:30"
}
// Outage Oracle Response (Downdetector + GPS)
{
"platform": "Zomato",
"outage_score": 87,
"reports_last_30min": 1240,
"riders_inactive_5km_cluster": 63,
"anomaly_detected": true,
"source": "Downdetector",
"timestamp": "2026-08-20T20:30:00+05:30"
}| Disruption | How It Causes Income Loss | How We Detect It | Avg. Daily Loss |
|---|---|---|---|
| Monsoon Flooding | Roads impassable, no deliveries for 6β12 hours | IMD Red Alert >65mm/hr | βΉ400ββΉ800 |
| Extreme Heatwave | Govt advisory to stay indoors, platforms reduce orders | Temp >45Β°C for 3+ hrs | βΉ300ββΉ600 |
| Toxic Air Quality | Health risk, reduced outdoor activity, fewer orders | AQI >300 sustained | βΉ200ββΉ500 |
| App Platform Crash | Cannot receive/complete orders despite good weather | Downdetector spike + GPS cluster | βΉ500ββΉ1,000 |
| Curfew/Bandh/Strike | Movement restrictions, complete shutdown | News API + admin flag | βΉ800 (full day) |
Design Philosophy: The best claim process is one the rider doesn't even know happened. Money appears in their UPI before they realize they've lost income.
| Step | Traditional Insurance | OffShift (Zero-Touch) |
|---|---|---|
| Claim initiation | Rider fills 3-page form | Automatic β system detects event |
| Evidence submission | Upload 5+ documents, photos | None β API data is the evidence |
| Human review | Agent reviews in 3β7 business days | AI Trust Score in <1 second |
| Approval | Email after weeks of back-and-forth | Instant for 85%+ of riders |
| Payout | Bank transfer in 15β30 days | UPI in 120 seconds |
| Notifications | "Your claim is under review" emails | WhatsApp: "βΉ500 deposited. Stay safe." |
π 3:45 PM β Ravi is delivering orders in Okhla, Delhi
π§οΈ 4:00 PM β Heavy rain starts, roads flooding rapidly
π‘ 4:00 PM β OffShift cron detects IMD Red Alert for pincode 110020
(rainfall: 74.2mm/hr > 65mm threshold)
π 4:00 PM β System queries: "Which riders have active coverage in 110020?"
β Ravi has Weekly Pass (active until March 25)
π§ 4:00 PM β Kavach Trust Score calculated for Ravi:
GPS-Cell Tower Match: 0.95 (genuine location)
Accelerometer: 0.88 (outdoor vibration detected)
Shift History: 0.92 (regular Okhla rider)
Subscription Timing: 0.90 (subscribed 3 days ago)
Device Fingerprint: 1.00 (unique device)
App Activity: 0.85 (last Zomato delivery 12 min ago)
βββββββββββββββββββββββββββββββββ
TRUST SCORE: 0.91 β TIER 1 (Auto-Approve)
π° 4:01 PM β Razorpay UPI payout initiated: βΉ1,500 β rajesh@ybl
π± 4:02 PM β WhatsApp message delivered:
"Hi Ravi π
π‘οΈ Your OffShift Weekly Shield just activated.
βΉ1,500 deposited to rajesh@ybl
Reason: IMD Red Alert β Heavy Rain in Okhla (74.2mm/hr)
Ref: TXN_RZP_20260715_001
Stay safe. Your income is protected. πͺ"
β±οΈ TOTAL TIME: 120 seconds
π FORMS FILLED: 0
π CALLS MADE: 0
π§ EMAILS SENT: 0
Beyond the 6-layer defense documented above, Phase 3 deploys delivery-specific fraud catching mechanisms. We don't just track where they are; we track how they work.
We analyze the temporal relationship between delivery platform signals and claim triggers. A fraudster sitting at home lacks the "Order Lifecycle" telemetry that a genuine rider possesses.
| Signal | Genuine Rider | Bad Actor (Spoofer) |
|---|---|---|
| GPS Jitter | Natural drift (3-5m) due to weather/buildings | Unnaturally static or "perfect" paths |
| Order Proximity | Last delivery drop-off within 2km of claim zone | Last delivery in a completely different city/zone |
| App Telemetry | Active "Online" status on Zomato/Swiggy | "Offline" status or no recent order pings |
| Motion Profile | Accelerometer shows bike vibration/walking | Near-zero movement (sitting on a couch) |
Every claim is cross-referenced against three independent weather oracles. If two oracles (e.g., IMD and OpenWeatherMap) report "Dry" while the rider claims "Heavy Rain," the claim is flagged.
# Advanced Historical Cross-Validation Logic
def validate_weather_claim(rider_pincode, event_timestamp):
# 1. Check Historical IMD Gridded Data (Primary Oracle)
imd_rainfall = fetch_imd_pincode_data(rider_pincode, event_timestamp)
# 2. Cross-Ref with OpenWeatherMap Historical API (Secondary Oracle)
owm_rainfall = fetch_owm_historical(rider_pincode, event_timestamp)
# 3. Analyze Cluster Behavior (The Social Oracle)
# If 50 riders in the same 2km radius are NOT claiming, but 1 is...
active_claims_in_vicinity = count_active_claims(rider_pincode, radius="2km")
if (imd_rainfall < THRESHOLD) and (owm_rainfall < THRESHOLD):
if active_claims_in_vicinity < QUORUM_MIN:
return "FLAG_FOR_REVIEW" # High probability of fraud
return "AUTO_APPROVE"We use Isolation Forest (Anomaly Detection) to identify coordinated fraud rings. Coordinated groups leave a "Cluster Signature" that individual users do not.
| Ring Signal | Normal Population | Fraud Ring Signature |
|---|---|---|
| Subscription Timing | Spread over days/weeks | 50+ subscriptions within 10 mins of an alert |
| Device Fingerprints | 1 Device : 1 User | 5+ Users sharing the same device_id hash |
| Cell Tower Overlap | Riders spread across the zone | 100% overlap on a single tower (impossible in storms) |
| UPI Routing | Each rider has a unique UPI | Multiple rider accounts routing to 1-2 UPI handles |
We demonstrate the "Moment of Truth" β when the payout hits the worker's account in real-time. For the demo, we integrate with Mock Payment Gateways to simulate the entire fund-flow.
| Gateway | Mode | Purpose in Demo |
|---|---|---|
| Razorpay Payouts | Test Mode | Simulates bulk UPI payouts to 500+ riders simultaneously. |
| Stripe Sandbox | Test API | Demonstrates international scalability for gig workers globally. |
| UPI Simulator | Mock API | Visualizes the "Notification Pop-up" on a simulated worker's phone. |
- Trigger Confirmation: IMD API confirms Red Alert status.
- Fund Disbursement: Backend calls
razorpay.payouts.create()usingrzp_testkeys. - Instant Credit: Funds are moved from the OffShift Liquidity Pool to the Rider's UPI VPA.
- Verification: Webhook confirms success; Rider receives an automated WhatsApp receipt.
// Razorpay Instant Payout Simulation (Node.js)
const payout = await razorpay.payouts.create({
account_number: "781022331100", // OffShift Escrow
fund_account_id: rider.fund_id,
amount: 150000, // βΉ1,500.00
currency: "INR",
mode: "UPI",
purpose: "payout",
reference_id: `CLAIM_${claim.id}`,
});We provide two distinct views: one for the frontline worker (Shield Status) and one for the insurer (Risk & Liquidity).
A mobile-first, haptic dashboard built for the road.
- Earnings Protected: Total lifetime payouts received (The "Peace of Mind" metric).
- Active Weekly Coverage: A real-time countdown of seconds remaining on the current "Rain Shield."
- Claim History: One-tap access to every past disruption event and its payout status.
- Trust Score: A gamified "Kavach Score" β workers with high scores get faster payouts and lower premiums.
A dark-mode, high-performance dashboard for risk managers.
- Loss Ratios: Real-time tracking of premiums collected vs. claims paid (The "Solvency" metric).
- Syndicate Alerts: Instant flags when the Isolation Forest detects coordinated fraud clusters.
- Predictive Analytics: "The Week Ahead" β predicting next week's likely weather/disruption claims based on LSTM models.
- Zone Heatmaps: Visualizing rainfall patterns across Delhi/NCR in real-time, mapped against rider density.
# Predictive Analytics for Insurer Dashboard
def predict_next_week_claims(pincode):
features = [historical_payouts, forecast_intensity, active_policies]
# Predicts likely liquidity drain for the coming 7 days
predicted_payout_volume = model.predict(features)
return {
"pincode": pincode,
"likely_disruption": "Heavy Rain (Tuesday)",
"projected_payout": "βΉ4,50,000",
"liquidity_risk": "MEDIUM"
}- Node.js v18+ and npm
- Python 3.9+ (for ML models)
- Supabase account (free)
- WhatsApp Business API sandbox (Twilio or Meta sandbox)
npm install npm@latest -g-
Clone the repository
git clone https://github.com/SHIVIKA330/OffShift.git cd OffShift -
Install Node.js dependencies
npm install
-
Install Python ML dependencies
pip install scikit-learn xgboost pandas numpy
-
Configure environment variables β create a
.envfile:# Supabase VITE_SUPABASE_URL='YOUR_SUPABASE_PROJECT_URL' VITE_SUPABASE_ANON_KEY='YOUR_SUPABASE_ANON_KEY' # Razorpay UPI Payouts RAZORPAY_KEY_ID='YOUR_RAZORPAY_KEY' RAZORPAY_KEY_SECRET='YOUR_RAZORPAY_SECRET' # WhatsApp / Twilio TWILIO_ACCOUNT_SID='YOUR_TWILIO_SID' TWILIO_AUTH_TOKEN='YOUR_TWILIO_TOKEN' TWILIO_WHATSAPP_FROM='whatsapp:+14155238886' # Weather & AQI Oracles OPENWEATHER_API_KEY='YOUR_OWM_KEY' AQICN_API_KEY='YOUR_AQICN_KEY' OPENCELLID_API_KEY='YOUR_OPENCELLID_KEY'
-
Start the development server
npm run dev
- README & architecture fully documented
- Supabase DB schemas designed (users, policies, sessions, claims, trigger_events)
- WhatsApp onboarding bot flow wireframed (
index.htmlprototype) - Adversarial defense & anti-spoofing strategy documented in full
- Tech stack selected β all free/open-source
- Kavach AI architecture designed (XGBoost + Isolation Forest)
Theme: "Protect Your Worker"
- Registration Process: WhatsApp sandbox bot live β Dialogflow CX + Twilio integration
- Registration Process: Multi-channel onboarding (WhatsApp + Web PWA + Voice Hindi)
- Insurance Policy Management: Policy lifecycle engine (create β active β triggered β claimed β expired)
- Insurance Policy Management: Plan selection, instant activation via UPI, auto-renewal reminders
- Dynamic Premium Calculation: Kavach XGBoost model trained on IMD historical data + synthetic riders
- Dynamic Premium Calculation: Hyper-local risk pricing (pincode-level, Β±βΉ10ββΉ30 adjustment)
- Dynamic Premium Calculation: Zone waterlogging discount (βΉ2 less/week for safe zones)
- Dynamic Premium Calculation: Extended coverage hours via predictive weather modelling
- Claims Management: Node.js cron job polling IMD + AQICN + Downdetector every 15 minutes
- Claims Management: 5 automated parametric triggers (Rain, Heat, AQI, App Outage, Curfew)
- Claims Management: Trust-scored tiered payout (auto/soft-verify/hold)
- Claims Management: Razorpay UPI test mode β automated 120-second payout flow
- Claims Management: Zero-touch WhatsApp claim notification + receipt
- 2-Minute Demo Video: Screen recording of registration β coverage β trigger β payout flow
Theme: "Perfect for Your Worker"
- Advanced Fraud Detection: GPS spoofing detection (cell tower + accelerometer + jitter analysis)
- Advanced Fraud Detection: Fake weather claims caught via historical cross-validation
- Advanced Fraud Detection: Isolation Forest fraud ring detection deployed
- Advanced Fraud Detection: 6-signal Trust Score engine live
- Advanced Fraud Detection: Weighted quorum anti-spoofing (500 spoofers can't trigger payout)
- Instant Payout System: Razorpay test mode full integration with webhook confirmations
- Instant Payout System: PhonePe sandbox for premium UPI collection
- Instant Payout System: Simulated disruption β automated AI claim approval β instant payout demo
- Worker Dashboard: Earnings protected, active weekly coverage, claim history, trust score
- Admin Dashboard (Nebula): Loss ratios, predictive analytics, weather heatmap, fraud alerts
- Admin Dashboard (Nebula): Next-week claim prediction engine with ML forecasting
- Admin Dashboard (Nebula): Revenue analytics, payout queue, Syndicate Alert management
- 5-Minute Demo Video: Full walkthrough with simulated rainstorm β AI claim β payout
- Final Pitch Deck: PDF covering persona, AI/fraud architecture, Weekly pricing viability
Built with purpose and late nights by the OffShift team for Guidewire DEVTrails 2026.
Shivika @SHIVIKA330 |
Tejika @TejikaSingh02 |
Nomita @nomita1303 |
Yuvika @yuvi194 |
Love @love123-code |
OffShift Team β DEVTrails 2026 β shivikaj47@gmail.com
Project (live site): https://offshift-9iok.onrender.com/
Every other platform asks WHERE you are. OffShift asks WHO you are, HOW you move, WHEN you subscribed, and WHETHER your behavior matches 4 weeks of your own history.
GPS tells us your location. Kavach tells us your truth.
Built for the riders who keep cities moving β even when the sky falls.