Supabase is an OpenSource Firebase Alternative providing Backend as a Service to various applications. It is super easy to setup and runs quickly with multiple frameworks.
Supabase has the following highlighting features:
- PostgreSQL with RealTime Capabilities with PostgREST API
- Security and Access control managed by Postgres RLS(Row Level Security)
- Authentication with multiple services with support of Magic Link authentication
- File Storage
- Serverless Functions (Coming Soon)
At its core, Supabase is a suite of open source tools, stitched together to build a seamless developer experience:
A project in Supabase is a wrapper around all your databases, authentication users, policies, tables, file storage. There are multiple regions from which you can choose where to host your project and Supabase officials are continuously adding more locations to reduce latency.
A project creation takes around 2 minutes to complete so get a coffee, sit back and relax.
Once your project is created, you will be greeted with a similar dashboard shown below.
This dashboard contains all details about your project including your database connections, authentication requests, storage space, implementation using client libraries, and much more.
Supabase uses Relational PostgreSQL as database with RealTime Capabilities and Policy access control by Postgres RLS(Row Level Security).
Supabase allows developers to create a Table and add columns and attributes directly from dashboard.
Supabase allows developers to edit data directly from the dashboard.
Supabase has a wide range of Authentication Providers such as Google, GitHub, Facebook, Twitter, GitLab etc. These can be enabled through Authentication Panel. It also supports Phone OTP Authentication and also Magic Link Authentication.
Once a user authenticates through Supabase, it shows the users' email, last login time on the Auth Dashboard.
The magic link works seamlessly which allows users to login/register in your app without a password.
What I like most about the Supabase authentication service is the RLS Policies Feature. We can create policies to restrict access to users from making changes or viewing data from our tables in database.
Supabase provides some pre written templates for our policies as well. We may choose from them or write our own custom policies through the SQL editor as shown below.
create policy "Users can only update their own items." on items for update using ( auth.email() = email );
The above query sets the policy in such a way that only the user who's the owner of the item can update that specific item.
Supabase provides file storage feature with the option to add access control policies to the files as well.
It provides a publicly accessible file link so that it can be shared or embedded in Frontend Apps.
Supabases gives an online SQL Query CLI right out of the box so that we need not use the CLI to connect to the DBAAS to run our queries. It even saves your queries so that we can go back and check our previous run queries.
From the database tab you may edit your database schemas, add columns to your database, create new tables, delete tables, update database roles etc.
You can even modify the connection pooling of your database.
A few of the Database features are still in Alpha version.
- Database Triggers - trigger is a function invoked automatically whenever an event associated with a table occurs.
- Functions - set of SQL and procedural commands such as declarations, assignments, loops, flow-of-control etc.
- Function Hooks
Supabase also has the ability to generate custom reports for your projects. They give a high level overview of your network traffic, user actions, and infrastructure health.
Supabase has a wide range of APIs for user Authentication, databases, user management, storage management etc. These APIs are secured by an anonymous API Key.
Check out more on the API reference here.
Supabase currently supports 3 Client side languages:
The client side sdk has all the functions required for supabase operations to build a Full Stack Application.
Using Supabase you can even self host the BAAS on your own server. The self-hosted version of Supabase does not include a UI yet. It can be self hosted easily using the Supabase CLI. To get started install the CLI using:
npm install -g supabase
Read more about self-hosting Supabase here.
So the question you have been looking forward to is this and to this I would straightaway answer "NO!". Supabase is not a 1-to-1 mapping of Firebase. While they are building many of the features that Firebase offers, they are not going about it the same way.
The technological choices are quite different to Firebase. Everything Supabase uses is open source.
Most notably, Supabase uses Postgres rather than a NoSQL store. Currently no other database on the market offers the scalability and functionality required to legitimately compete with Firebase. This is a boon to all those developers who wanted a Backend-As-A-Service(BAAS) with a relational database like PostgreSQL.
But those who still prefer NoSQL structure can go for Firebase as it offers the flexibility of NoSQL store.
The most beautiful thing about Supabase is it's OpenSource and the code is available publicly on GitHub, so you can easily contribute to it and be a part of Supabase Community.