name: "integrating-supabase" description: "Supabase Flutter integration for PostgreSQL, Auth, Realtime subscriptions, Storage, Edge Functions, and Row Level Security. Use when building backend features with supabase_flutter or configuring database policies." metadata: last_modified: "2026-04-01 14:35:00 (GMT+8)"
Supabase Flutter Ecosystem (supabase_flutter)
Goal
Supabase is an open-source Firebase alternative built on PostgreSQL, supporting rich SQL queries, table joins, and a first-class Flutter SDK (supabase_flutter).
To ensure modularity and LLM readability, this skill is split into logical chapters. Before answering questions or writing code related to Supabase, you MUST read the relevant reference chapters.
Process/Workflow
- Identify the core Supabase service the user needs (Database, Auth, Storage, etc.).
- Read the corresponding chapter(s) from the
references/directory.- Example: If the user asks about deep linking Magic Links for login, read
01-setup.mdand02-auth.md.
- Example: If the user asks about deep linking Magic Links for login, read
- Synthesize the guidelines exactly as documented within the chapters. DO NOT hallucinate third-party packages or outdated practices.
- Maintain the Serverpod Mini BFF (Backend-For-Frontend) architecture whenever the user requires executing high-privilege operations that should bypass Row Level Security (RLS) entirely.
Reference Files
- Setup & Deep Links: Read 01-setup.md for core initialization and the
app_linksrequirement. - Authentication: Read 02-auth.md for Email/OTP, Apple/Google native sign-in, and listening to stream changes.
- Database (Postgres): Read 03-database.md for strongly-typed
Freezedmapping,.select(), and join strategies natively. - Realtime & Presence: Read 04-realtime.md for Postgres CDC subscriptions and User Presence management.
- Storage: Read 05-storage.md for cross-platform (Mobile vs Web) bucket manipulation.
- Edge Functions: Read 06-edge-functions.md for executing remote serverless workflows.
- Serverpod Mini (BFF): Read 07-serverpod-mini.md for leveraging the pure
supabaseDart library combined with theSERVICE_ROLE_KEYinside a secure backend.