Skip to content

lohitkolluri/Oasis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

136 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oasis Header
Oasis
AI-powered parametric wage protection.
Weekly billing. Automatic triggers. Zero claim forms.

Live Demo    Documentation    Pitch Deck    Report Bug

Oasis

Oasis is an AI-powered parametric insurance prototype for India’s gig delivery partners (Zepto, Blinkit, Instamart, etc.). It sells weekly income-protection plans and uses automated triggers (weather, curfews/lockdowns, major disruptions) to create eligible payout events without paperwork-heavy claims.

Important

Product scope (strict): Oasis covers loss of income from external disruptions only (e.g., extreme weather, zone curfew/lockdown, severe delivery-blocking disruption). It does not cover health, life, accidents, or vehicle repairs. Billing is weekly only.

What’s inside

  • Rider app: onboarding + KYC, weekly plan purchase, coverage status, claims, wallet, PWA support.
  • Admin console: trigger/source health, operations, pricing analytics, demo trigger tools.
  • Parametric engine: scheduled ingestion + rule evaluation + ledger events + fraud/location checks.
  • Integrations: Supabase (Postgres/Auth/Realtime/Storage), Razorpay (weekly billing), OpenRouter (LLM/vision verification), Tomorrow.io / Open-Meteo / NewsData / TomTom (signals).

Tech stack (high level)

Next.js 15 (App Router), React 18, TypeScript, Tailwind + shadcn/ui, Supabase, Razorpay, OpenRouter, MapLibre/Turf, Vitest, Playwright, Astro Starlight (docs).

Repository structure

app/            Next.js routes (rider, admin, API)
components/     UI components (rider/admin/shared)
lib/            Core logic (adjudicator, pricing, fraud, payments, geo, clients)
scripts/        Setup and helper scripts
supabase/       Migrations and Supabase tooling
tests/          Vitest + Playwright tests
docs/           Documentation site + OpenAPI

Quickstart

Prereqs: Node.js 20+, Bun (or npm), a Supabase project, Razorpay test keys.

bun install
cp .env.local.example .env.local
# fill values in .env.local
bun run db:migrate
bun run setup-storage
bun dev

Open http://localhost:3000.

Environment variables

Copy the template and fill required values:

cp .env.local.example .env.local

Key variables (see .env.local.example for the full list):

Variable Purpose
NEXT_PUBLIC_SUPABASE_URL Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anon key
SUPABASE_SERVICE_ROLE_KEY Supabase service role (server-only)
ADMIN_EMAILS Comma-separated admin emails
OPENROUTER_API_KEY LLM/vision verification
TOMORROW_IO_API_KEY Weather signals
NEWSDATA_IO_API_KEY News signals
NEXT_PUBLIC_RAZORPAY_KEY_ID Razorpay key id (must be rzp_test_* in dev)
RAZORPAY_KEY_SECRET Razorpay secret (server-only)

Caution

Never commit .env.local. Never expose server-only keys to the browser (no NEXT_PUBLIC_ prefix).

Running tests

bun run test        # Vitest
bun run test:e2e    # Playwright
bun run lint

Deployment

Vercel (recommended)

  • Import the repo into Vercel
  • Set environment variables (same as .env.local.example)
  • Deploy

Background jobs (cron)

These endpoints are meant to run on a schedule (see .github/workflows/cron.yml for one option):

Endpoint Cadence Purpose
/api/cron/adjudicator ~15 min Ingest signals, detect disruptions, create ledger/claim events
/api/cron/self-report-verification As needed Drain queued self-reports and re-run vision verification
/api/cron/weekly-premium Weekly Weekly billing + policy window rotation

API reference & docs

  • OpenAPI spec: docs/openapi.yaml
  • Docs site: https://oasisdocs.vercel.app

License

MIT. See LICENSE.

Live Demo  ·  Docs  ·  Issues


About

Oasis: AI-powered parametric wage protection for India's Q-commerce delivery partners.

Resources

Stars

Watchers

Forks

Contributors

Languages