Skip to main content

Project Setup

  1. Create project at supabase.com
  2. Copy project credentials
  3. Add to .env.local:
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGci...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGci...

Database Schema

Key tables:
  • stores - Store information
  • products - Product catalog
  • orders - Order data
  • users - Authentication

Row-Level Security

All tables use RLS policies for multi-tenant isolation.

Storage

Buckets:
  • product-images - Product photos
  • payment-proofs - UPI screenshots
  • store-logos - Brand logos

Local Setup

Run Supabase locally for development