Supabase Platform
Overview
Supabase is an open-source Firebase alternative built on PostgreSQL. This skill covers RLS security, Edge Functions (Deno), Realtime (Broadcast + Postgres Changes), Storage, schema design conventions, and common anti-patterns.
Quick Reference
Core Concepts
| Area | Description |
|---|---|
| Database | PostgreSQL with UUID v4, snake_case, audit columns |
| RLS | Row Level Security — mandatory on all tables |
| Auth | auth.uid() in RLS policies, custom claims in JWT |
| Storage | Private buckets + signed URLs, RLS on storage.objects |
| Realtime | Broadcast (low-latency pub-sub) vs Postgres Changes (WAL-based) |
| Edge Functions | Deno runtime, Hono router, service role key |
Environment Variables
SUPABASE_URL— Supabase project URLSUPABASE_ANON_KEY— Public anon key for client-sideSUPABASE_SERVICE_ROLE_KEY— Server-side key (bypasses RLS)
References
- RLS Security — Row Level Security policies, null safety, indexes
- Edge Functions — Deno runtime, Hono router, setup
- Realtime Patterns — Broadcast vs Postgres Changes, channels
- Storage — Signed URLs, TUS uploads, bucket RLS
- Schema Design — PostgreSQL conventions, constraints, ENUMs
- Anti-Patterns — Common mistakes to avoid
- SQL Examples — RLS, schema, storage, triggers
- API Examples — Edge Functions, Realtime, client usage
- Quick Reference — Cheat sheet