|
| 1 | +--- |
| 2 | +name: supabase |
| 3 | +description: Guides and best practices for working with Supabase. Covers getting started, Auth, Database, Storage, Edge Functions, Realtime, supabase-js SDK, CLI, and MCP integration. Use for any Supabase-related questions. |
| 4 | +license: MIT |
| 5 | +metadata: |
| 6 | + author: supabase |
| 7 | + version: '1.0.0' |
| 8 | + organization: Supabase |
| 9 | + date: January 2026 |
| 10 | + abstract: Comprehensive Supabase development guide for building applications with Supabase services. Contains guides covering Auth, Database, Storage, Edge Functions, Realtime, client libraries, CLI, and tooling. Each reference includes setup instructions, code examples, common mistakes, and integration patterns. |
| 11 | +--- |
| 12 | + |
| 13 | +# Supabase |
| 14 | + |
| 15 | +Supabase is an open source Firebase alternative that provides a Postgres database, authentication, instant APIs, edge functions, realtime subscriptions, and storage. It's fully compatible with Postgres and works with any language, framework, or ORM. |
| 16 | + |
| 17 | +## Supabase Documentation |
| 18 | + |
| 19 | +Always reference the Supabase documentation before making Supabase-related claims. The documentation is the source of truth for all Supabase-related information. |
| 20 | + |
| 21 | +You can use the `curl` commands to fetch the documentation page as markdown: |
| 22 | + |
| 23 | +**Documentation:** |
| 24 | + |
| 25 | +```bash |
| 26 | +# Fetch any doc page as markdown |
| 27 | +curl -H "Accept: text/markdown" https://supabase.com/docs/<path> |
| 28 | +``` |
| 29 | + |
| 30 | +## Overview of Resources |
| 31 | + |
| 32 | +Reference the appropriate resource file based on the user's needs: |
| 33 | + |
| 34 | +### Database |
| 35 | + |
| 36 | +| Area | Resource | When to Use | |
| 37 | +| ------------------ | ------------------------------- | ---------------------------------------------- | |
| 38 | +| RLS Security | `references/db-rls-*.md` | Row Level Security policies, common mistakes | |
| 39 | +| Connection Pooling | `references/db-conn-pooling.md` | Transaction vs Session mode, port 6543 vs 5432 | |
| 40 | +| Schema Design | `references/db-schema-*.md` | auth.users FKs, timestamps, JSONB, extensions | |
| 41 | +| Migrations | `references/db-migrations-*.md` | CLI workflows, idempotent patterns, db diff | |
| 42 | +| Performance | `references/db-perf-*.md` | Indexes (BRIN, GIN), query optimization | |
| 43 | +| Security | `references/db-security-*.md` | Service role key, security_definer functions | |
| 44 | + |
| 45 | +### Realtime |
| 46 | + |
| 47 | +| Area | Resource | When to Use | |
| 48 | +| ---------------- | ------------------------------------ | ----------------------------------------------- | |
| 49 | +| Channel Setup | `references/realtime-setup-*.md` | Creating channels, naming conventions, auth | |
| 50 | +| Broadcast | `references/realtime-broadcast-*.md` | Client messaging, database-triggered broadcasts | |
| 51 | +| Presence | `references/realtime-presence-*.md` | User online status, shared state tracking | |
| 52 | +| Postgres Changes | `references/realtime-postgres-*.md` | Database change listeners (prefer Broadcast) | |
| 53 | +| Patterns | `references/realtime-patterns-*.md` | Cleanup, error handling, React integration | |
| 54 | + |
| 55 | +**CLI Usage:** Always use `npx supabase` instead of `supabase` for version consistency across team members. |
0 commit comments