Skip to main content

Documentation Index

Fetch the complete documentation index at: https://grouple.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

What Supabase Handles

Supabase is the core backend for Grouple. It’s not just a database β€” it handles a significant portion of the business logic:
ResponsibilityHow
Primary databasePostgreSQL (20+ tables)
AuthenticationGoTrue (JWT-based)
Email sendingEdge Functions (send-lead-email, send-proposal-email, reservation-confirmation-emails)
Business logic automation14 Database Triggers
Complex queries40+ RPC Functions
File storage3 Storage buckets
Currency ratesEdge Function (update-exchange-rates)
AI proposal generationEdge Function (generate-proposal)
OCR processingEdge Function (mistral-ocr)

Project Details

FieldValue
ProjectProposal maker
Organisationgrouple.in Org
EnvironmentProduction (main branch)
RegionSupabase hosted
ConnectionVia connection pooler (pooled connections from ECS)

Authentication Flow

User signs up / logs in via Supabase Auth
        ↓
GoTrue issues JWT
        ↓
JWT used for:
  - Frontend direct Supabase CRUD (RLS enforced per user)
  - API requests to ECS backend (validated server-side)
        ↓
On new customer INSERT:
  DB Trigger: on_customer_created_link_enquiries
  β†’ Links any pre-existing enquiries (submitted before signup) to this customer

Row Level Security (RLS)

All tables have RLS enabled. Key patterns:
  • Merchants can only see/edit their own venues, leads, proposals
  • Customers can only see their own enquiries and proposals
  • Public can read venues and submit enquiries (anonymous)
  • Service role has full access (used by Edge Functions and workers)