supabase
Use when working with Supabase — database queries, authentication, storage, real-time subscriptions, Edge Functions, or Row Level Security. Also use when setting up Supabase in a new project or migrating from Firebase.
| Model | Source |
|---|---|
| sonnet | pack: database |
Full Reference
┏━ 🔧 supabase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Supabase — database quer… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Supabase
Section titled “Supabase”Open-source Firebase alternative built on Postgres — database, auth, storage, realtime, and Edge Functions (Deno runtime) in one platform. SDK: @supabase/supabase-js v2.x + @supabase/ssr for server-side rendering.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Dashboard | https://supabase.com/dashboard |
| New project | https://database.new |
| Install | npm install @supabase/supabase-js @supabase/ssr |
| Env var (URL) | NEXT_PUBLIC_SUPABASE_URL |
| Env var (key) | NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY (or legacy anon key) |
| Type gen | npx supabase gen types typescript --project-id <ref> > database.types.ts |
| Fastest start | npx create-next-app -e with-supabase |
Reference Index
Section titled “Reference Index”| File | Covers |
|---|---|
reference/setup.md | Install, env vars, Next.js App Router clients, middleware, React/Vite, standalone Node |
reference/database.md | Select, insert, update, upsert, delete, RPC, count, transactions, filter operators, error codes |
reference/auth.md | Email+password, OAuth, magic link/OTP, getUser vs getSession, page protection, anonymous sign-in |
reference/rls.md | Enable RLS, policy anatomy, own-data patterns, multi-tenant org patterns, JWT claims, helper functions, performance, testing |
reference/storage.md | Buckets, upload, public/signed URLs, download, list/delete, image transforms, storage RLS policies |
reference/realtime.md | Postgres changes, broadcast, presence, channel cleanup |
reference/edge-functions.md | Create, local dev, secrets, deploy, invoke from client, built-in env vars |
reference/typescript.md | Type generation CLI, using generated types, type helpers, CI auto-generation |
reference/branching.md | Preview branches, lifecycle, enable, workflow, costs, migrations CLI, local dev stack |
reference/pricing.md | Plans, free tier limits, Pro overage rates, PostgREST v14 |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.