Engineering
Firebase vs Supabase in 2026: I built the same app on both
Four years of Firebase in production. Two months of Supabase on the same product. The decision framework, the real trade-offs, and when I'd pick each.
By Mr. Gill ·
Every few months a client asks me the same question. "We're going to build a new app. Should we use Firebase or Supabase?"
I've been running Firebase in production for four years. I rebuilt a small client app on Supabase this January to have a real answer. Not a benchmark. Real week-by-week shipping on both stacks for the same product. This is what I learned.
The honest answer is both are fine. But they're fine in different ways, and picking the wrong one for your app costs you months.
The shape of each platform
Firebase is Google's opinionated managed stack. Firestore (document DB), Authentication, Cloud Storage, Cloud Functions, Hosting (which I don't use), Analytics. Each piece is genuinely good. They're designed to work together, and deeply integrated with the Google Cloud ecosystem underneath.
Supabase is an open-source Postgres-based alternative. You get Postgres (with row-level security as the auth model), Auth built on top of it, Storage, Edge Functions (Deno-based), and a Realtime layer that streams Postgres changes. The pitch: it's Firebase but on SQL, and you can self-host it if you outgrow the managed version.
The code you actually write
Reading a product on Firebase:
import { getDoc, doc } from "firebase/firestore";
const snap = await getDoc(doc(db, "products", productId));
const product = snap.exists() ? { id: snap.id, ...snap.data() } : null;
Same read on Supabase:
const { data: product, error } = await supabase
.from("products")
.select("*")
.eq("id", productId)
.single();
Both are short. The Firebase version shapes slightly more naturally around "this is a document, fetch it." The Supabase version shapes around "I'm querying a table with a filter." Neither is better — they're just different mental models. Pick the one that matches how you think about your data.
Where the mental models diverge
Firestore is a document database. Hierarchical structure. Subcollections. No JOINs, ever. If you need "give me this order, its customer, and the customer's recent orders," you're doing three reads and composing the result in code. This forces you to shape your data around your reads up front. Some people find this liberating. Others find it exhausting.
Supabase is Postgres with a pleasant client SDK. You can JOIN. You can use CTEs. You can write actual SQL views. If your data has real relationships — an e-commerce store's products, orders, customers, line items — Supabase will feel obviously correct and Firestore will feel like you're fighting the tool.
Authentication and security rules
Firebase Auth is smoother out of the box. Phone, email, Google, Apple, all with two lines of config and a drop-in UI component. For a mobile app where auth flows are critical, this saves you a genuine week of work.
Supabase Auth is also good, but you're closer to the bones. You configure providers in the dashboard, but the UI you wire yourself. For a web app this is often what you want — more control, no surprise UI rendering — but it's more upfront work.
Realtime: a close call
Firestore has realtime built into the query API. You call onSnapshot instead of getDoc and you get live updates. It's magical. It's also the feature I'd give up last on any mobile app.
Supabase Realtime streams Postgres changes over WebSockets. It works. It's slightly more manual to subscribe to exactly what you want (you're filtering by table + row + event). For dashboards and collaborative UIs, it's fine. For "every user sees every change the moment it happens," I still give Firestore the edge by a little.
Functions: the dark horse
Node runtime, cold starts of 2-4 seconds on v1 (worse on Node 22), decent on v2. Deploys take a while. Costs add up on busy endpoints. Comfortable if you've lived in Node forever.
Deno runtime, runs on Deno Deploy's edge network. Near-zero cold start. Fast deploys. Different mental model — no npm (mostly), standard browser APIs, URL-based imports. Pleasant once you adjust, initially weird.
For me, this is actually one of the bigger day-to-day quality-of-life wins on Supabase. Cold starts on Firebase Functions have been a low-grade frustration for years. Edge Functions solve that at the platform level.
The cost question
Both have generous free tiers. Both get expensive at scale. The shape of "expensive" differs.
Firebase charges per read/write/delete on Firestore, plus storage, plus function invocations, plus function compute time, plus bandwidth. It's granular. On a read-heavy app with millions of document reads a day, Firestore can get unexpectedly pricey fast — I've seen a startup accidentally spend $800 on a Monday because a client loop had no caching.
Supabase charges mostly around database size, compute (you pick a tier), and bandwidth. Predictable. Less granular. You know what you'll pay before the month starts. For many teams this alone is the deciding factor.
When I'd pick each
Pick Firebase when: you're building a mobile-first app, you need realtime everywhere, your data is naturally document-shaped, your team is tiny and you want to minimize backend code, you're deep in Google's ecosystem already.
Pick Supabase when: your data has real relationships, you want SQL's expressive power, you care about an eventual self-host option, your team already knows Postgres, predictable pricing matters.
Stay on Firebase when: you're already there, it's working, and the things you're frustrated with are the things every alternative also has. Migration for migration's sake is a career-limiting move.
- Document model vs relational model is the real decision. Everything else follows.
- Firebase wins on mobile + realtime + onboarding speed. Supabase wins on SQL + edge functions + predictable costs.
- Both scale. Pick the one whose mental model matches your data, not the one whose landing page is prettier.
- Don't migrate away from a working Firebase app just to chase Supabase. That's how months disappear.