Series 5 — Part 1 of 1
Supabase in Flutter: Full CRUD, Authentication, and Riverpod State Management
A standalone post on integrating Supabase as an open-source Firebase alternative
After working with Firebase throughout the shopping app series, I was asked to explore Supabase — an open-source Firebase alternative built on PostgreSQL. The goal was to build a Flutter app with full CRUD, Supabase Auth, and Riverpod for state management.
Setting up Supabase
I created a Supabase project in the dashboard, generated the project URL and anon key, and added the supabase_flutter package to pubspec.yaml . Initialisation goes in main() :
await Supabase . initialize ( url: supabaseUrl , anonKey: supabaseKey , );
Enter fullscreen mode
Exit fullscreen mode
The Supabase client is then accessible globally via Supabase.instance.client .
Full CRUD implementation
Supabase exposes a Dart client that mirrors the PostgREST query builder. CRUD operations felt familiar:
// Create await supabase . from ( 'products' ) .…