Supabase vs Firebase for a small app: how to choose
Supabase vs Firebase compared for small teams: Postgres or documents, auth, access rules, realtime, functions, pricing shape and how hard it is to leave later.

The Supabase vs Firebase question usually arrives at the same moment: someone has a working prototype, a few real users are about to log in, and the team needs a backend that will not embarrass them in six months. Both services give you a database, authentication, file storage, server functions and live updates without running your own servers. They come at the problem from opposite ends, though, and the difference shows up in your data model long before it shows up on an invoice. I have shipped small apps on both, and this is the comparison I wish someone had handed me before the first one.
The short version
Supabase is a hosted Postgres database with services wrapped around it. Your data lives in tables with columns, foreign keys and SQL, and the extra pieces (auth, storage, realtime, functions) are built to work with that database. It is open source, so you can run the whole stack yourself if you ever need to.
Firebase is Google's app platform. Its main database, Cloud Firestore, is a document store: collections of JSON-like documents, queried through client SDKs rather than SQL. It sits inside Google Cloud and connects naturally to other Google services such as analytics, crash reporting, push messaging and hosting.
Neither is the better product in the abstract. One fits data that is shaped like a spreadsheet with relationships; the other fits data that is shaped like a feed of objects your app reads in one go.
Data model: tables or documents
This is the decision that matters most, so start here and treat everything else as detail.
Take a small booking app for a yoga studio. There are instructors, classes, class sessions on given dates, members and bookings. In Postgres that is five tables with foreign keys, and "how many bookings did each instructor have last month" is one query with two joins. You can add a unique constraint so the same member cannot book the same session twice, and the database refuses the duplicate even if your front end has a bug.
In Firestore you would think in reads, not relations. You might store each session as a document with the instructor name copied into it, and bookings as a subcollection under the session. Listing the bookings for one session is fast and cheap. The monthly report per instructor is where it gets awkward: you either keep running totals updated by a function, or you export the data somewhere else to analyse it. Firestore does support compound queries, aggregation counts and collection group queries, but it has no joins, and you design around that from day one.
A rough rule I use: if the first things you can name are nouns that refer to each other (customers, orders, invoices, line items), lean towards Supabase. If the first things you can name are screens that each show one self-contained chunk of data (a chat thread, a user profile, a game state), Firestore is comfortable.
Auth
Both give you email and password sign-in, magic links or email links, phone sign-in and the common social providers. Both hand your app a signed token that identifies the user, and both let you add custom claims or roles, although the mechanics differ.
The practical difference is where the user lives. In Supabase, users sit in an auth schema inside the same Postgres
database as your data, so a profiles table can reference auth.users with a foreign key and your access rules can
call auth.uid() directly. In Firebase, Authentication is a separate service; your Firestore documents store the user
ID as a plain field, and the link is a convention you maintain.
For a small team either works. Supabase is a little more natural if you want to query users alongside data; Firebase Auth has a long track record on mobile and pairs well with the rest of Google's mobile tooling.
Access rules: row level security vs security rules
Both products let the browser or phone talk to the database directly, which is the whole appeal. That only works if the database itself refuses requests it should not serve. This is where most of the security bugs I see come from.
Supabase relies on Postgres row level security. You switch it on per table and write policies in SQL. Here is the booking example, where a member can see and create only their own bookings:
alter table bookings enable row level security;
create policy "members read own bookings"
on bookings for select
using (auth.uid() = member_id);
create policy "members create own bookings"
on bookings for insert
with check (auth.uid() = member_id);
The using clause filters which rows a user can see; with check validates rows being written. A table with row
level security switched on and no policies returns nothing to normal users, which is a safe default. A table with it
switched off is open to anyone holding your public key, which is the classic mistake.
Firebase uses its own rules language, written in a rules file and deployed alongside your app. The same idea looks like this:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /bookings/{bookingId} {
allow read: if request.auth != null
&& request.auth.uid == resource.data.memberId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.memberId;
}
}
}
Firestore rules are evaluated per request and are not filters: if a query could return a document the user is not allowed to read, the whole query is rejected, so your queries must match your rules. Postgres policies quietly filter instead. Both have local emulators or test setups, and both deserve tests, because a rule that looks right and is wrong will not raise any error until someone reads data they should not.
Realtime
Firestore was built for live data. A client attaches a listener to a document or a query and receives updates as they happen, with offline caching on mobile and web. For chat, presence, collaborative lists or a live order board, this is Firebase's strongest point and it takes very little code.
Supabase Realtime can stream database changes to clients, and it also offers broadcast messages and presence for things that do not need to be stored. It works well for dashboards and notifications. Offline support is not part of the core client in the way it is with Firestore, so if your app must keep working on a phone in a basement and sync later, Firebase has the head start.
Functions and server code
Both let you run code on the server for the parts that must not live in the client: payment webhooks, sending email, calling a third-party API with a secret key.
Supabase Edge Functions are written in TypeScript and run on a Deno-based runtime. You can also do a lot inside the database itself with Postgres functions and triggers, which is often the simpler choice for things like keeping a counter updated.
Firebase uses Cloud Functions, written in JavaScript, TypeScript or Python, with triggers for database writes, auth events, storage uploads and schedules. Because they sit inside Google Cloud, they connect easily to queues, scheduled jobs and other Google services.
Pricing shape
I will not quote numbers, because both change their plans and you should read the current pricing pages before committing. The shapes are different, though, and the shape decides what surprises you.
Supabase has a free tier, then paid plans billed per organisation with a monthly base fee and usage on top (database size, storage, bandwidth, function calls). Free projects can be paused when idle. The bill is fairly predictable because a busy month mostly costs more compute and bandwidth, not more per query.
Firebase has a no-cost plan with daily quotas, then a pay-as-you-go plan billed on usage. Firestore charges by document reads, writes and deletes plus storage and network. That model is cheap for light apps and very fair at small scale, but it punishes chatty designs: a screen that reads 500 documents every time it opens, multiplied by active users, adds up in a way a Postgres query never would.
To make that concrete, here is an illustrative example, not real prices. Say your studio's timetable screen lists 40 sessions and each session document is read on every visit. With 300 members opening it four times a day, that is 48,000 document reads a day from one screen. In Postgres it is 1,200 queries, each cheap. Neither is necessarily expensive, but only one of them grows with the number of rows on screen. Set a budget alert on whichever you choose.
Lock-in and getting your data out
Supabase is the easier exit. Your data is in Postgres, so pg_dump gives you a standard backup you can restore on
any Postgres host. The platform's own pieces are open source and can be self-hosted, though running auth, storage and
realtime yourself is real work.
Firestore offers managed export to a Cloud Storage bucket, and you can read documents out through the SDKs. Moving to another database means writing a migration that turns documents into whatever shape the new system wants, and rewriting every query and rule. Your client code is also tied to the Firebase SDKs. None of that is a reason to avoid Firebase, but it is a reason to decide on purpose. Google has also added a Postgres-backed option to Firebase, which is worth reading about if you like the platform but want relational data; check how mature it is for your use case.
Decision table
| Need | Leans Supabase | Leans Firebase |
|---|---|---|
| Relational data, reports, joins | Yes | Possible with workarounds |
| Offline-first mobile app | Possible, more work | Yes |
| Live chat or presence | Works | Very strong |
| Team already knows SQL | Yes | Less relevant |
| Push messaging, crash reports, analytics in one place | Add separately | Yes |
| Easy exit to another host | Yes | Harder |
| Cost predictable with chatty screens | Yes | Watch read counts |
Who should pick which
Pick Supabase if your app is mostly records that refer to each other, if someone on the team is comfortable with SQL, or if a clean exit matters to you or a client. Internal tools, booking systems, small marketplaces and anything with reporting fit here. The backends section has more on the Postgres side of things.
Pick Firebase if you are building a mobile-first app with live, per-user data, offline use and push notifications, and your data reads naturally as documents. Chat apps, simple social features and field apps that sync later are its home ground.
If you are still unsure, spend an afternoon on a test: build the same two screens and one report on both, with access rules switched on, and write three tests that try to read another user's data. Whichever one makes those tests easier to write and reason about is probably your answer. Terms like row level security, document store and custom claims are in the glossary if a colleague needs a refresher before that afternoon.
Stacks: Backends & Data
More from this stack


No-Code & Low-Code
No code backend options: what you get and what you give up