v0.1.0npm install →

Developer

Self-Hosting

Run Auron locally or deploy to Vercel. The main app lives at apps/web. The docs site at apps/docs.


Local setup

bash
git clone https://github.com/anirudhh206/auron
cd auron/apps/web
npm install
cp .env.example .env.local
npm run dev

The dev server starts at http://localhost:3000. With only the required env vars set, the app runs in demo mode — on-chain verification still runs against devnet, but the final INR payout is simulated.


Database setup

Auron uses Supabase (Postgres). Run the migrations in order in the Supabase SQL Editor:

bash
# Initial schema — transactions, settlements, status_history, contacts, api_keys
apps/web/lib/db/schema.sql

# Migration 001 — receipt hash + refund columns
apps/web/lib/db/migration_001_receipt_refund.sql
WARNING
Row-level security is enabled on all tables by default. Make sure you are using the service role key (SUPABASE_SERVICE_ROLE_KEY) in server-side routes — the anon key will fail most write operations.

Environment variables

Required — basic functionality

ANTHROPIC_API_KEYREQ
Claude AI for intent parsing and chat. Get at console.anthropic.com.
NEXT_PUBLIC_SUPABASE_URLREQ
Your Supabase project URL.
NEXT_PUBLIC_SUPABASE_ANON_KEYREQ
Supabase anon key — safe for client-side use.
SUPABASE_SERVICE_ROLE_KEYREQ
Service role key — server-side only. Never expose to client.
NEXT_PUBLIC_SOLANA_NETWORKSet to devnet for development, mainnet-beta for production.

Required — real settlements

RAZORPAY_KEY_IDREQ
Razorpay API key ID. Use rzp_test_xxx for sandbox.
RAZORPAY_KEY_SECRETREQ
Razorpay API secret. Server-side only.
RAZORPAY_ACCOUNT_ID
Razorpay X virtual account number. Required for real UPI payouts. Needs KYB.
ONMETA_API_KEY
OnMeta off-ramp API key. Primary settlement path. Requires OnMeta KYB (3–7 days).
ONMETA_WEBHOOK_SECRET
HMAC secret for OnMeta webhook verification. Without this, webhooks are unverified.
TREASURY_KEYPAIR_BASE58Base58 private key of the treasury wallet. Required for auto-refunds. Never log or expose.

Infrastructure

KV_URL
Vercel KV connection URL. Required for rate limiting. Degrades gracefully without it.
KV_REST_API_URL
Vercel KV REST API URL.
KV_REST_API_TOKEN
Vercel KV REST token.
SOLANA_RPC_URL
Helius or custom RPC. Defaults to public devnet if unset (slow).
CRON_SECRETBearer token for /api/workers/*. Without this, settlement and reconciliation workers are publicly callable.

Monitoring & security

SENTRY_DSN
Sentry project DSN for error tracking.
NEXT_PUBLIC_SENTRY_DSN
Client-side Sentry DSN.
NEXTAUTH_SECRETSession signing secret. Generate with: openssl rand -hex 32

Feature flags

DEMO_SETTLEMENT
Set true to skip real payout dispatch. On-chain verification still runs.
NEXT_PUBLIC_FULL_DEMO_MODE
Set true to skip on-chain TX entirely. For demos without Phantom.
NEXT_PUBLIC_ENABLE_VOICE_INPUTSet true to enable Web Speech API voice input in the chat interface (Chrome only).

Vercel deployment

bash
# Deploy the main app
cd apps/web
vercel --prod

# Deploy the docs (separate Vercel project)
cd apps/docs
vercel --prod

Configure Vercel Cron in vercel.json for the settlement and reconciliation workers:

apps/web/vercel.json
{
  "crons": [
    {
      "path": "/api/workers/settlement",
      "schedule": "*/30 * * * * *"
    },
    {
      "path": "/api/workers/reconcile",
      "schedule": "0 2 * * *"
    }
  ]
}
NOTE
The settlement worker runs every 30 seconds to retry failed settlements. The reconciliation worker runs daily at 02:00 UTC to fix stuck payments and detect provider mismatches.

Live activation — OnMeta

OnMeta is a FIU-registered crypto off-ramp under India's VDA framework. KYB is required for production settlements.

01

Apply at onmeta.in/business

Submit: Certificate of Incorporation, Director Aadhaar + PAN, bank account proof

02

Compliance review

3–7 business days for KYB approval

03

Set ONMETA_API_KEY + ONMETA_WEBHOOK_SECRET

Add to Vercel environment variables

04

Register webhook URL

Set https://your-domain.com/api/webhooks/onmeta in OnMeta dashboard