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.
- 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).
Next.js 15 (App Router), React 18, TypeScript, Tailwind + shadcn/ui, Supabase, Razorpay, OpenRouter, MapLibre/Turf, Vitest, Playwright, Astro Starlight (docs).
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
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 devOpen http://localhost:3000.
Copy the template and fill required values:
cp .env.local.example .env.localKey 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).
bun run test # Vitest
bun run test:e2e # Playwright
bun run lint- Import the repo into Vercel
- Set environment variables (same as
.env.local.example) - Deploy
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 |
- OpenAPI spec:
docs/openapi.yaml - Docs site:
https://oasisdocs.vercel.app
MIT. See LICENSE.
