Skip to content
Mert Yılmaz
CVTürkçeContact
All posts

Firebase, Supabase or your own backend? When to choose which

Published

Short answer

If you need a fast MVP, a small team, mostly CRUD and real-time sync, Firebase or Supabase is a good start. If you need complex business rules, ERP and payment integrations, long-running jobs or predictable cost, write your own backend. The rule: hand solved problems like authentication, payments and email delivery to ready-made services, and write the core logic of your business yourself.

Firebase: when it's good

Firebase is Google's platform offering Firestore (a NoSQL document database), authentication, storage, hosting and real-time sync. It's very good for mobile apps, real-time data and fast MVPs.

  • Strengths: fast start, mobile SDKs, real-time sync, automatic scaling.
  • Weaknesses: it takes a NoSQL data-modeling mindset, complex relational queries are hard, pricing depends on the number of reads and writes so a badly designed query can inflate the bill, and lock-in to the platform is high.

Supabase: when it's good

Supabase is a platform that adds authentication, storage, real-time features and edge functions on top of Postgres. It is open source and you can host it yourself.

  • Strengths: real SQL and relational data, row-level security (RLS), open source and portability.
  • Weaknesses: writing RLS rules correctly takes learning, a wrong rule can leak data, and Postgres mostly scales vertically.

Your own backend: when you need it

  • Complex business rules: calculations, state machines, approval flows.
  • Third-party integrations: ERP, payment providers, SMS and similar services.
  • Long-running or scheduled jobs.
  • Regulatory or data-location requirements.
  • Predictable cost at large scale.

In return, authentication, authorization, backups and deployment are yours. So don't rewrite the solved parts yourself.

What to hand to a service and what to build

  • Hand to a service: authentication, payments (such as Stripe), email delivery, file storage and CDN, monitoring.
  • Build yourself: the core logic of your business, meaning the business rules and data model that set you apart from competitors.

Writing authentication and payments from scratch are the jobs where a mistake has the most expensive consequences.

The hybrid approach

Combining the two is common: use a managed Postgres (Supabase or Neon) for the database and authentication, and write the business logic in your own API (for example with NestJS). You start fast, then grow without depending on the platform.

Questions

Should I pick Firebase or Supabase?
Firebase for real-time sync and a mobile-focused fast MVP. Supabase if you want relational data, SQL and portability. Neither may be enough on its own for complex business logic.
Should I write authentication myself?
Usually no. The cost of a mistake is high, and a managed authentication service is safer.
Can I move to my own backend after Supabase?
Yes, because there is standard Postgres underneath. Moving the data and taking the business logic into your own API is generally easier than leaving Firestore.

Written by Mert Yılmaz, freelance fullstack developer.