Skip to content

Sumant3086/GigShield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ GigShield - AI-Powered Parametric Insurance for Gig Workers

Protecting 12M+ Indian gig workers with instant, automated insurance payouts

Live Demo License

๐Ÿ”— Live Demo: https://gigshield-jvm8.onrender.com/login
๐Ÿ“น Video Demo: Watch on Google Drive
๐Ÿ† Built for: Guidewire DEVTrails 2026 Hackathon


๐Ÿ’ก The Problem

India's 12 million gig workers lose โ‚น50,000 crore annually to weather disruptions, platform outages, and health emergencies. Yet 95% have zero insurance because traditional insurance requires:

  • 7-14 days claim processing
  • Complex paperwork (barrier for low-literacy workers)
  • High premiums (โ‚น500-2000/month)
  • Manual verification and disputes

GigShield solves this with parametric insurance that auto-triggers payouts in 2 hoursโ€”no paperwork, no disputes.


๐ŸŽฏ Our Solution

Core Innovation: Parametric Triggers

When IMD/OpenWeather detects disruptions (heavy rain, extreme heat, floods) in a worker's zone, claims auto-trigger and payouts reach their UPI within 2 hours.

Key Features

  • โšก Auto-Triggered Claims - Zero paperwork, instant activation
  • ๐Ÿค– AI Fraud Detection - 7-signal Behavioral Coherence Score (85% accuracy)
  • ๐Ÿ’ฐ 2-Hour Payouts - Razorpay UPI integration
  • ๐Ÿ”ฎ 48-Hour Forecasts - Predict disruptions before they happen
  • ๐Ÿค Cooperative Pools - Zone-based mutual risk sharing (15% discount)
  • ๐Ÿ“ฑ Multi-Platform Income - Aggregate Swiggy/Zomato/Amazon earnings
  • ๐ŸŽค Voice Interface - Hindi/Tamil/Telugu for accessibility (Twilio)
  • โ›“๏ธ Blockchain Transparency - Immutable records on Polygon
  • ๐Ÿ“ฒ WhatsApp Alerts - Real-time notifications

๐Ÿ—๏ธ Technical Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Next.js 14   โ”‚โ—„โ”€โ”€โ”€โ”€โ–บโ”‚  Express API     โ”‚โ—„โ”€โ”€โ”€โ”€โ–บโ”‚   MongoDB       โ”‚
โ”‚   Frontend     โ”‚      โ”‚  + Node-cron     โ”‚      โ”‚   Database      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ–ผ            โ–ผ            โ–ผ
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚ Weather  โ”‚  โ”‚ Razorpay โ”‚  โ”‚ Polygon  โ”‚
            โ”‚   API    โ”‚  โ”‚ Payments โ”‚  โ”‚Blockchainโ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

  • Frontend: Next.js 14, TypeScript, Tailwind CSS, Framer Motion, Zustand
  • Backend: Node.js, Express, MongoDB, Mongoose
  • AI/ML: Custom fraud detection (Isolation Forest), XGBoost risk scoring
  • Integrations: Razorpay, OpenWeather API, Twilio, WhatsApp Business, Polygon
  • Real-time: Node-cron for trigger engine (runs every 15 min)

AI Fraud Detection System

7-Signal Behavioral Coherence Score (BCS):

  1. Delivery pattern consistency
  2. Income fingerprint analysis
  3. Zone-based anomaly detection
  4. Claim frequency patterns
  5. Multi-platform correlation
  6. Community fraud reports
  7. Device fingerprinting

Result: 85% fraud detection accuracy with <2% false positives


๏ฟฝ Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)

Installation & Run

# Clone repository
git clone https://github.com/yourusername/gigshield.git
cd gigshield

# Backend setup
npm install
# Configure .env with your MongoDB URI
npm start                    # Runs on http://localhost:5000

# Frontend setup (new terminal)
cd client
npm install
npm run dev                  # Runs on http://localhost:3000

Demo Credentials

  • Worker: Any 10-digit phone (OTP in console)
  • Admin: admin / gigshield2026 at /admin/login

๏ฟฝ Business Model & Impact

Metric Value
Target Market 12M+ gig workers in India
Income at Risk โ‚น50,000 crore/year
Premium Range โ‚น29-99/week (vs โ‚น500-2000/month traditional)
Payout Speed <2 hours (vs 7-14 days industry)
Fraud Reduction 85% via AI + community reporting
Revenue Model 20% margin on premiums + reinsurance

๐ŸŽฌ User Flow

  1. Register โ†’ Phone OTP verification
  2. Onboard โ†’ Select platform (Swiggy/Zomato/Amazon), zone, UPI
  3. Subscribe โ†’ AI calculates personalized premium (โ‚น29-99/week)
  4. Auto-Protection โ†’ Trigger engine monitors weather 24/7
  5. Instant Payout โ†’ Money hits UPI in 2 hours when disruption occurs
  6. AI Insights โ†’ Get earnings optimization recommendations

๐Ÿ† Hackathon Differentiators

  1. Real-World Impact - Solves critical problem for 12M+ workers
  2. Technical Innovation - Blockchain + AI + Voice + Parametric triggers
  3. Accessibility - Voice interface for low-literacy users (60% of gig workers)
  4. Production-Ready - Deployed, scalable, with real integrations
  5. Business Viability - Clear revenue model, sustainable margins

๐Ÿ“ Project Structure

gigshield/
โ”œโ”€โ”€ server.js                    # Express entry point
โ”œโ”€โ”€ models/                      # Mongoose schemas
โ”‚   โ”œโ”€โ”€ Worker.js               # User profiles
โ”‚   โ”œโ”€โ”€ Policy.js               # Insurance policies
โ”‚   โ”œโ”€โ”€ Claim.js                # Claims + payouts
โ”‚   โ”œโ”€โ”€ TriggerEvent.js         # Weather events
โ”‚   โ””โ”€โ”€ RiskPool.js             # Cooperative pools
โ”œโ”€โ”€ routes/                      # REST API
โ”‚   โ”œโ”€โ”€ auth.js                 # OTP authentication
โ”‚   โ”œโ”€โ”€ workers.js              # Worker dashboard
โ”‚   โ”œโ”€โ”€ policies.js             # Policy management
โ”‚   โ”œโ”€โ”€ claims.js               # Claims processing
โ”‚   โ”œโ”€โ”€ triggers.js             # Trigger engine
โ”‚   โ””โ”€โ”€ admin.js                # Admin analytics
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ mlService.js            # AI risk scoring
โ”‚   โ”œโ”€โ”€ fraudEngine.js          # Fraud detection
โ”‚   โ”œโ”€โ”€ triggerEngine.js        # Parametric triggers
โ”‚   โ”œโ”€โ”€ paymentService.js       # Razorpay integration
โ”‚   โ”œโ”€โ”€ blockchainService.js    # Polygon integration
โ”‚   โ”œโ”€โ”€ whatsappService.js      # WhatsApp notifications
โ”‚   โ””โ”€โ”€ voiceService.js         # Twilio voice interface
โ””โ”€โ”€ client/                      # Next.js frontend
    โ””โ”€โ”€ app/
        โ”œโ”€โ”€ login/              # Authentication
        โ”œโ”€โ”€ onboard/            # Registration flow
        โ”œโ”€โ”€ dashboard/          # Worker dashboard
        โ”œโ”€โ”€ claims/             # Claims history
        โ”œโ”€โ”€ insights/           # AI recommendations
        โ””โ”€โ”€ admin/              # Admin panel

๐Ÿ”ง Environment Setup

Create .env in root:

MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
ADMIN_USERNAME=admin
ADMIN_PASSWORD=gigshield2026
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
OPENWEATHER_API_KEY=your_openweather_key

# Optional enhancements
WHATSAPP_TOKEN=your_whatsapp_token
TWILIO_ACCOUNT_SID=your_twilio_sid
POLYGON_RPC_URL=https://rpc-mumbai.maticvigil.com
BLOCKCHAIN_PRIVATE_KEY=your_private_key

๐Ÿ“ฑ API Documentation

Authentication

  • POST /api/auth/send-otp - Send OTP to phone
  • POST /api/auth/verify-otp - Verify OTP & login

Worker Operations

  • GET /api/workers/dashboard - Dashboard data
  • POST /api/policies - Activate policy
  • GET /api/claims - View claims
  • POST /api/claims/confirm/:id - Confirm soft-hold

Admin Operations

  • POST /api/auth/admin-login - Admin authentication
  • GET /api/admin/stats - Platform analytics
  • POST /api/triggers/simulate - Simulate disruption

AI & Insights

  • GET /api/insights/my - Personalized recommendations
  • GET /api/insights/risk-score - Worker risk assessment

๐ŸŽฅ Demo Video

Watch our demo: Google Drive


๐Ÿ‘ฅ Team

Built with โค๏ธ for financial inclusion


๐Ÿ“„ License

MIT License - see LICENSE file


โญ Star this repo if you believe in protecting gig workers!

About

Guidewire DEVTrails University Hackathon 2026-Protecting the last-mile warriors of Amazon & Flipkart from income loss caused by uncontrollable external disruptions.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages