Supabase and Firebase are two backend-as-a-service platforms. Firebase is the market leader, while Supabase is taunted as its alternative. Both are scalable and serverless, but which has a better database?
If you ask any software developer what makes for a good production-grade application, you will probably get a different answer from each one. They will mention some aspects more often than others, but at the top of that list you’ll likely find: a database, file storage, scalability, authentication, backend infrastructure, frontend, cache, or analytics. As you might have already noticed, that list can be as long as one’s arm.
It’s no surprise then that the software developers’ laziness (aka ingenuity) pushes them to search for tools that will speed up their job. One category of such tools are backend as a service (BaaS) platforms. In this article I’ll discuss two of them – Supabase and Firebase.
Firebase is one of Google services and one of the first backend services of this kind to the market. It is serverless and offers both a free tier and a “pay-as-you-grow” scheme. Aside from that, Firebase has much more to offer, too.
Today I am going to focus on four universal components that you need to build an efficient production-grade application: authentication, storage, database, and backend services (or serverless functions).
Let’s start with the authentication. Firebase offers a fully featured authentication service that aims to improve end-user sign-in and onboarding. To that end, it provides an end-to-end identity solution, including email and password accounts, phone authentication, and social integrations.
Firebase’s Cloud Storage is intended to help you store and serve user-generated content, such as photos and videos. The SDK will also automatically pause and resume transfers as the app loses and regains mobile connectivity which saves your users time and bandwidth.
Firebase offers a document database called Firestore. It scales well and can be used by both mobile and web developers, but there are some problems with it. In my opinion, the developer experience (DX) could be better. The things that I find rough are:
The other aspect I’m not a fan of are serverless functions powered by Node.js. They are enough for simple tasks. However, more complex tasks – like scheduled or long-running ones – are hard to implement and require subscribing to a paid plan.
Seeing only the imperfections in Firebase, I started looking for an alternative. The joy of a successful discovery was massive! Let me introduce to Supabase – an open-source Firebase alternative.
The company raised over $116 million in funding. Some of the world’s leading investors decided to back it, including the Y Combinator, Coatue, Mozilla Corporation, and Felicis. Then there are tens of individual investors as well. Supabase community grows by the day, reaching over 450 000 registered developers and over 58 000 starts on GitHub as of January 2025.
Supabase is one of the only companies offering a PostgreSQL relational database with PgBouncer integrated for free. Postgres is one of the world’s most scalable databases, trusted by millions of developers.
Built-in Postgres mechanism called Row Level Security is used for access limitation as well as for connecting to an authentication system provided by Supabase.
Supabase also provides data-change listeners over WebSockets to enable real-time subscriptions.
What’s more, Supabase supports a handful of Postgres extensions, some of the most noticeable being:
Every Supabase project comes with a complete user management system that works without any additional tools. User data is stored in your database in a separate schema, so you never have to worry about third-party privacy issues. Supabase also allows social logins and has a ready React component library for building user authentication interfaces.
Users nowadays are much more aware of cybersecurity issues and often decide whether to use a product or not based on support for multifactor authentication. Supabase Authentication supports MFA via two methods: App Authenticator, which makes use of a Time-Based One-Time Password (TOTP), and phone messaging, which utilizes a code generated by Supabase Auth.
Supabase offers production-grade cloud data storage that scales to infinity and ensures seamless integration with the rest of the ecosystem.
Another Supabase feature are serverless edge functions that scale automatically. Supabase now has nodes in many regions worldwide to execute functions closer to the users. Functions runner was created using Deno, a JavaScript runtime, allowing developers to use JavaScript, TypeScript, and WebAssembly.
The newest addition to the Supabase toolbox is Supabase Cron which is a Postgres Module that uses the pg_cron database extension to manage recurring Jobs.
Cron Jobs can be created using SQL or the Cron interface within the Supabase Dashboard, with execution frequencies ranging from every second to once a year, depending on a specific use case.
Each Job can execute SQL database functions or snippets with zero network latency, or it can easily make an HTTP request, such as invoking a Supabase Edge Function.
Supabase comes with a command line interface (CLI) that uses Docker under the hood to bring the same experience that you get from their web platform to your local dev environment. The CLI is still under development but it contains all the functionalities needed to work with your Supabase projects and the Supabase platform.
My favourite feature of the CLI is generating TypeScript types for the whole database with just one command:
supabase gen types typescript --local > lib/database.types.ts
The TypeScript/JavaScript SDK was recently updated to v2, making development easier by providing better APIs and typings. You can use the supabase-js library to:
As you can see, both Firebase and Supabase are examples of BaaS (backend as a service) platforms. The most notable difference is how they manage data, with Firebase using real-time NoSQL document data store and Supabase using PostgreSQL relational database.
Apart from the features I listed above, an important thing to consider is also that Supabase is not a proprietary piece of software like Firebase. Since it’s an open-source project that uses an open-source database (PostgreSQL), using it won’t lock you in with one particular vendor (such as Google).
Finally, there’s always the question of price. While currently both Supabase and Firebase offer a free plan for experimentation, they differ quite significantly in their pricing models. Firebase charges for requests (read, write, delete), meanwhile its competitor charges for data storage while offering unlimited API requests.
Backend as a service platforms make software developers’ lives easier, the whole development process faster, and they are a great way to build proofs of concept (PoCs), minimum viable products (MVPs), and fully-featured products. While my personal preference is for Supabase, it’s true that both platforms are scalable, serverless, and come with fair pricing. BaaS platforms like Supabase and Firebase will never replace bespoke software, but for sure they have their place and can be used in some less demanding products.
This article was updated in January 2025 to reflect advancements in both tools over the years.
Have a project in mind?
Let’s meet - book a free consultation and we’ll get back to you within 24 hrs.
Dominik is the Chief Innovation Officer at Gorrion and a full-stack software developer by both heart and trade. He is passionate about new technologies, teaching, and open-source. Sharing knowledge is what truly drives him, so you’ll often find him speaking at conferences and meet-ups. After work, he tends to work even more, but he also likes boxing, cycling, and bartending.
Other worthy reads