Firebase vs Supabase: Which one you should prefer and why?

Narottam Bisht
5 min readJul 29, 2021

--

Although there has been a compelling debate on this topic, but in my opinion there are pros and cons to both, and that is what I am going to highlight in this story, bear with me, please..

Services offered by Firebase

Firebase: Pros

  1. Its cheaper than Supabase, per GB price of Firebase Database (Firestore) is $0.108 vs $0.125/GB for Supabase.
  2. Firebase Authentication has tons of authentication methods, Facebook, Google, Twitter, Github, Yahoo, Microsoft, Apple, Email/Password and its entirely free there is no number of users cap but just one - Phone Authentication, its free for first 10000 users and after that $0.01/verification(for U.S., Canada and India) and $0.06/verification(for rest of the countries) vs for Supabase Phone Authentication is not yet available, rest of the Authentication methods are Google, Facebook, GitHub, Azure, Gitlab, Twitter, Discord, and Bitbucket and that too with only 10000 users/month free cap.
  3. Apart from the free tier, Pay as you go plans for Supabase has $25 additional opt-in fee, where as there is no additional fee for Firebase, just pay for what you use.
  4. Firebase is an one stop shop for everything, it truly replaces the need for backend or server, it has the database, hosting, storage, it even lets you send emails from your application using extension, what else anyone would need vs Supabase doesn’t has hosting service so you would require an additional tool/service for hosting your frontend application.
  5. Firebase has vast array of other tools which do not exist with Supabase like Dynamic links, Remote Config, In-App messaging, Cloud Messaging, Performance Monitoring, Machine Learning, Big Data, Crashlytics, Adsense and many more, which definitely makes it a perfect choice for the users.
  6. Good market, documentation and support is already available for Firebase, since it exists in the market from way longer than Supabase. The community is very strong.
  7. Firebase is backed by leading company in IT, Google. So the services are more reliable, cheap and highly unlikely to vanish in the near future.

Firebase: Cons

  1. If you have data which is highly relational in nature or it need to abide by ACID properties, and you are in dire need for interlinking that data using joins and foreign keys. Then Firebase Firestore won’t be a right choice for you. I wish in the future Firebase provides us with a Relational database as well.
  2. Sometimes it becomes difficult to reference a document inside another document and deep nested references and fetching the data for these references becomes a pain to handle.
Supabase-Pricing
$25/project /month + usage costs
Services offered by Supabase

Supabase: Pros

  1. Supabase presents us with world renowned database Postgres with all its glory and sweetness. It claims and I quote — “100% portable. Bring your existing Postgres database, or migrate away at any time.” and I agree with it.
  2. Realtime functionality exists with the Supabase version of Postgres, all the goodies of Postgres + events to make it realtime, it can’t get any better than that.

Although if you set out to use Supabase, drooling with Postgres in mind, thinking that you don’t need additional features with your application, let me remind you — you might not think about it right now, but in the future from scalability point of view its always wise to choose a system, which has multiple tools to pick from . Because the need for Crashlytics, Monitoring performance, Admob, Remote Config and Analytics arises much later after being in production and then you tend to search for ways to do these things. Where as with Firebase you can do all these things from one Firebase Console and manage your all platforms web, android and iOS.

Firebase has all the handy-dandy tools you need at one place enhance your application at any point, with the possibility in mind, that yes we can do it if needed.

Before I conclude this topic, I want to mention that the article you just read, I wrote it with extensive research and prior experience with both the tools. I have a portfolio which I have created using React and Firebase, and I’ve used, Firestore, Remote Config and Cloud Storage, these Firebase tools in my portfolio. Its deployed on github pages and you can see it for yourself at narottambisht.github.io

Also, I created a dummy project using Supabase as well, which didn’t made it to deployment stage. The reason being I couldn’t achieve what I set out to do with just Supabase and integrating both Supabase and Firebase to achieve what I intended to do didn’t sit well with me.

Conclusion:

  1. If cost/budget is an issue go with Firebase.
  2. If you have application for android/iOS you have to go for Firebase, because of Firebase cloud messaging, Admob integration, In-App messaging with these feature you can do so many things, which you can’t if you decide to go the other way.
  3. If you have data which is highly relational in nature and has to maintain relationships between data go for Supabase.
  4. If you can want to have Phone authentication, you have to go for Firebase.
  5. If you don’t want to have any limit to number of users authenticating with you application and you can foresee more than 10k users per month then go for Firebase.
  6. If you have relationship data and want it to be realtime, go for Supabase.

Reading the above mentioned points you might think that I am biased and I favor Firebase, but its not the case. Firebase has its fair share of cons which we have talked about but its just that Supabase is quite new in the market and has a long way ahead of it. Where as Firebase has sustained in the market for a long time and has attracted users, developers, developed its community, gained popularity, has a bundle of tools to offer, and it did all of that when it didn’t had any competitor. But now its good to see a platform which is or can be an alternative to Firebase. But it has to provide lot more services than just Postgres database to entice the market.

Thank you for investing your time to read this article. I hope you found it useful.

--

--

Narottam Bisht

A Fullstack Software Engineer, forte is Javascript, a wannabe Digital Nomad, a tech enthusiast and really fond of gadgets.