Razorpay AI Buildathon — Track 1 & AI Risk Track
A deterministic, auditable FinTech AI agent with zero LLM hallucinations in pricing, complete with a React/Vite Storefront and Razorpay Webhook integration.
┌─────────────────┐ chat ┌──────────────────────────────────────┐
│ React / Vite │ ───────────► │ FastAPI Backend │
│ (Storefront) │ ◄─────────── │ │
└─────────────────┘ pay link │ ┌──────────┐ ┌─────────────────┐ │
│ │ Groq │ │ Financial Core │ │
│ │ LLM Agent│──►│ (guardrails) │ │
│ │ (router) │ └────────┬────────┘ │
│ └──────────┘ │ │
│ ▼ │
│ ┌──────────┐ ┌─────────────────┐ │
│ │ Supabase │◄──│ Razorpay API │ │
│ │ (DB+Audit│──►│ (Payment link) │ │
│ └──────────┘ └─────────────────┘ │
└──────────────────────────────────────┘
Key Features:
- Zero LLM Math: The LLM only emits JSON tool-calls. It never calculates prices or generates links.
- Razorpay Webhooks: Automatically catches
payment.capturedevents to close the payment loop. - Inventory Control: Deducts stock on successful payment and prevents the AI from selling out-of-stock items (Graceful Failure).
- Competitor Scraper Recovery: If the external DuckDuckGo price scraper fails, the backend catches the timeout and instructs the LLM to gracefully pivot the conversation without crashing.
- Admin Dashboard: Brutalist admin portal to monitor live revenue, sessions, and insert new inventory.
- Go to your Supabase project's SQL Editor.
- Run the
sql/create_tables.sqlscript to create the schema. - Run the
sql/seed_data.sqlscript to populate the catalog with test products.
Open a terminal and navigate to the project root:
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Fill in your keys (Supabase, Groq, Razorpay) in the .env file
# Run the backend
uvicorn backend.main:app --port 8000Open a second terminal and navigate to the web folder:
cd web
npm install
npm run dev- Storefront: Go to
http://localhost:5173to interact with the AI, negotiate a price, and buy a product. - Admin Dashboard: Go to
http://localhost:5173/admin(Passcode:smartcart2026) to view live revenue, audit logs, and add new inventory.
- Chat with the agent on the Storefront and ask for a 4K Monitor.
- Negotiate a discount.
- Click the generated Razorpay link and pay (using test cards).
- Go to the Admin Dashboard to watch your revenue increase.
- Go back to the chat and ask to buy the same monitor again. The AI will gracefully inform you it is out of stock!