Flutter Firebase vs Supabase: Which Backend

· 5 min read

Most Flutter apps need the same backend basics: sign-in, a database, file storage and a little server code. Firebase and Supabase both cover all four, and both have official Flutter packages. The real difference is the database underneath, and that shapes everything else.

This post compares them for a small team or solo developer. It is part of our guide to building a Flutter app with Claude Code.

The core difference: documents vs tables

Firebase uses Cloud Firestore. Google describes it as “a flexible, scalable database for mobile, web, and server development,” and its model is simple: “Store your data in documents, organized into collections.” Documents can hold nested objects and subcollections. There are no joins. You shape data around how screens read it, and you often duplicate fields.

Supabase is Postgres. In its own words: “Every Supabase project gets a full Postgres database, not a Postgres abstraction.” You get tables, foreign keys, joins, SQL views and Postgres extensions such as pgvector.

A rough guide:

  • If your data is mostly per-user documents (notes, settings, a feed), Firestore feels natural.
  • If your data is relational (users, teams, projects, invoices, reports), Postgres saves you from duplicating and syncing data by hand.

Security: rules vs row level security

Both let the app talk to the database directly, so access control is not optional.

Firestore uses Security Rules: “Protect access to your data in Cloud Firestore with Firebase Authentication and Cloud Firestore Security Rules.” Rules live in their own file and language.

Supabase uses Postgres Row Level Security. Supabase says RLS “is how Supabase makes the database safe to query directly from the client,” and it is direct about the risk: “A table in an exposed schema without RLS is readable and writable by any role with a grant on it.” A typical policy:

create policy "Individuals can view their own todos."
on todos for select
to authenticated
using ( (select auth.uid()) = user_id );

Once RLS is on, “no data is accessible through the API when using a publishable key, until you create policies.” That is the safe default. The classic mistake is creating a table and forgetting to enable RLS. Our post on vibe-coded app security mistakes covers this and the Firestore equivalent of open rules.

Offline and realtime

Firestore is strong here. It “offers offline support for mobile and web,” and realtime listeners send a snapshot whenever data changes, with only the changes sent. For an app that must work on a train or in a basement, this is a big point in Firebase’s favor.

Supabase builds Realtime on the database, and its Flutter quickstart reads data with plain network queries. Offline caching is not part of what it describes, so if you need offline-first behavior on Supabase, plan a local cache yourself.

Flutter setup

Firebase uses the FlutterFire CLI:

firebase login
dart pub global activate flutterfire_cli
flutterfire configure
flutter pub add firebase_core

Then initialize before runApp:

WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
  options: DefaultFirebaseOptions.currentPlatform,
);

Re-run flutterfire configure whenever you add a platform or a Firebase service. More in Firebase and Flutter with Claude Code.

Supabase is one package and two values:

await Supabase.initialize(
  url: 'YOUR_SUPABASE_URL',
  publishableKey: 'YOUR_SUPABASE_PUBLISHABLE_KEY',
);

final rows = await Supabase.instance.client.from('instruments').select();

Supabase is quicker to wire up. Firebase generates per-platform config files, which is more setup but also brings Crashlytics, Analytics and Cloud Messaging into the same project.

The rest of the platform

Firebase Supabase
Database Firestore (NoSQL documents) Postgres (SQL)
Access control Security Rules Row Level Security policies
Auth Firebase Authentication Supabase Auth
Server code Cloud Functions (Blaze plan) Edge Functions
Files Cloud Storage Supabase Storage
Offline cache Built into Firestore SDK You build it
Push, crash reports, analytics Cloud Messaging, Crashlytics, Analytics Not included; pair with other tools

That last row matters for mobile. If you choose Supabase, you can still add Firebase only for push notifications and crash reporting. See Flutter push notifications with Firebase and Firebase Crashlytics in Flutter.

Free tiers

Check both pricing pages before you decide, because they change. When we read them:

Firebase Spark (no cost) needs no payment method. Firestore’s no-cost quota lists “1 GiB total” stored, “50K reads/day,” “20K writes/day” and “20K deletes/day.” Authentication lists “50K MAUs.” Cloud Functions are not available on Spark; the Blaze plan includes “No-cost up to 2M/month” invocations.

Supabase Free lists a 500 MB database per project, 50,000 monthly active users, 1 GB file storage and 5 GB egress. It also says “Free projects are paused after 1 week of inactivity” and sets a “Limit of 2 active projects.” The Pro plan starts at $25 per month.

The practical difference: Firebase bills per operation, so a chatty screen that re-reads lists can cost you. Supabase’s plans are framed around database size, users, storage and compute, and its free tier pause matters for side projects nobody opens for a week.

Which one to pick

Pick Firebase if:

  • offline support matters,
  • you want push, crash reporting and analytics in one console,
  • your data fits documents well.

Pick Supabase if:

  • your data is relational and you know SQL,
  • you want to avoid per-read billing surprises,
  • you may move the database later (it is standard Postgres).

For sign-in, both handle Google and Apple. See Flutter Supabase Google auth, Flutter Google sign-in and Sign in with Apple in Flutter with Firebase. Whichever you pick, remember that apps with account creation must also offer account deletion in the app; see the App Store account deletion requirement.

MobileKit’s skills lean on Firebase for the push and crash reporting reasons above, but either backend works well with Flutter.

Sources read on the day this post was written: Cloud Firestore, Firebase pricing, Add Firebase to your Flutter app, Supabase database overview, Supabase row level security, Supabase Flutter quickstart and Supabase pricing.

Questions

Is Supabase a relational database and Firebase not?

Yes. Supabase says every project gets a full Postgres database. Cloud Firestore is a NoSQL database that stores data in documents organized into collections.

Do free Supabase projects pause?

Supabase's pricing page says free projects are paused after 1 week of inactivity, with a limit of 2 active free projects.

Can I use Cloud Functions on Firebase's free plan?

No. Firebase's pricing table lists Cloud Functions as not applicable on the no-cost Spark plan. You need the pay-as-you-go Blaze plan, which includes a no-cost tier of invocations.

Try it on your next idea

One payment, every update to this major version, and a refund window if it is not for you. Refund policy.