Table of Contents[Hide][Show]
Backend-as-a-Service (BaaS) is a service paradigm in which developers outsource the behind-the-scenes components of web or mobile development so that they may focus on building and maintaining the frontend on a plug-and-play basis and escape the burden of writing server-side code.
Software supporting server-side tasks such as authentication, database administration, real-time updating, storage, hosting, and push alerts is provided by BaaS platforms (for mobile apps).
Even though various backend services fundamentally provide the same solution, they use distinct backend technologies. This is a decisive factor for many developers when choosing the best service for a certain project.
In this article, we’ll deep dive into Supabase.
What is Supabase?
Supabase is an open-source Firebase alternative that offers Backend as a Service to a variety of applications. It is really simple to set up and operates swiftly with a variety of frameworks. Supabase bills itself as an open-source replacement for Firebase.
It intends to benefit developers in quickly setting up their backend. “Build in a weekend, grow to millions,” says Supabase.
Supabase products include a Postgres database and authentication service, with storage and serverless services (for backend logic) still in the works. All of its tools are mostly free and open-source. The Postgres database includes database-related tools, such as real-time monitoring of database modifications and a management interface.
Furthermore, it provides quick APIs and syntax that are comparable to Firebase’s. This allows you to handle CRUD tasks in a consistent fashion, allowing you to focus on creating rather than rewriting repeating CRUD code.
The Postgres database is a table that allows you to store organized and connected data in the same way that you would in a spreadsheet. Surprisingly, when you create a project, you may use an existing spreadsheet as your Postgres database.
How does Supabase work?
Supabase is a collection of free source technologies. They are creating Firebase features with enterprise-grade, open-source solutions. If the tools and communities are available under an MIT, Apache 2, or comparable open license, they will use and support them.
If the tool does not already exist, they create it and make it available as open-source. Supabase is not a 1:1 mapping of Firebase. Their goal is to provide developers with a Firebase-like development experience using open source technologies.
Supabase is a platform that is hosted. You may sign up and start using it without having to install anything. You may also self-host and build on your own server.
- PostgreSQL has a great reputation for stability, feature robustness, and speed; After more than 30 years of active development,
- Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using WebSockets. Supabase listens for replication requests from Postgres, converts the replication byte stream to JSON, and then broadcasts the JSON through WebSockets.
- PostgREST is a web server that converts your PostgreSQL database into a RESTful API.
- Storage provides a RESTful interface for managing files stored in S3, with Postgres as the rights manager.
- Postgres-meta is a RESTful API for administering Postgres that allows you to download tables, assign responsibilities, and conduct queries, among other things.
- GoTrue is an SWT-based API that allows you to manage users and issue SWT tokens.
- Kong is an API gateway that runs on the cloud.
In Supabase, a project is a container for all of your databases, authentication users, rules, tables, and file storage.
There are several places from which to host your project, and Supabase administrators are constantly adding new sites to decrease latency. A project takes around 2 minutes to create, so get a coffee, sit back, and relax.
2. Project Dashboard
When your project is finished, you’ll be presented with a dashboard similar to the one shown below. This dashboard shows you all you need to know about your project, including database connections, authentication requests, storage capacity, client library implementation, and more.
3. Table Creator and Editor
Supabase’s database is a relational PostgreSQL with real-time capabilities and policy access control using Postgres RLS (Row Level Security). Developers may use Supabase’s dashboard to construct a Table and add columns and properties. Developers may modify data straight from the dashboard with Supabase.
Google, GitHub, Facebook, Twitter, GitLab, and more Authentication Providers are available on Supabase. These may be turned on using the Authentication Panel. It also supports Phone OTP and Magic Link Authentication.
Supabase is an open-source object storage system that can handle any file type and has built-in scalability. It has an easy-to-use API that enables custom rules and permissions. CDN integration, as well as auto-transformation and optimization (resizing and compressing your material), will be available shortly. Supabase storage will be a formidable rival to Firebase storage with the inclusion of these capabilities.
What can you build with Supabase? (Some examples)
1. Subscription payment with Supabase + Stripe + Next.js.
The complete starter set for high-performance SaaS apps.
- Supabase provides secure user administration and authentication.
- Stripe Checkout and the Stripe customer portal integration.
- Supabase provides powerful data access and management tools on top of PostgreSQL.
- Stripe webhooks enable automatic synchronization of price plans and subscription statuses.
2. KeepLink: Simple bookmark service with tags and archive
KeepLink is a basic bookmark service with tags and an archive built with Supabase and Next.js. It doesn’t have any social sharing features, but you may host your own instance.
- Tag new bookmarks automatically based on existing tags.
- Fulltext search for URLs, Titles, Descriptions, Tags, and Archive Content thanks to the Supabase stack, tagging aliases for admin databases, and restful API access is now possible.
- With metascraper, you can automatically gather titles and descriptions for your pages. You can also archive your pages with SinglePage and Headless Chrome.
3. Real-time chat app with Supabase + React
- For real-time messaging, Supabase (on top of PostgreSQL) is used.
- Front-end uses React (CRA) + Vite
- The UI library used is Chakra UI.
Here are some of the features of Supabase:
- A dashboard/user interface for setting up and administering your database in less than a minute.
- To sign up users and update access restrictions in your database, apply user authentication.
- Database listeners in real-time.
Supabase distinguishes itself for the following reasons:
- In contrast to Firebase, you may run complicated queries or text searches.
- Supabase takes care of the scaling for you (even though it uses an SQL database)
- Data migration is simple with Supabase since it leverages PostgreSQL, and you may import data using a.sql file.
There are some disadvantages of adopting Supabase. They are as follows:
- To receive real-time changes, you must activate the replication functionality for a table.
- When real-time updates are enabled, Supabase’s security policies do not apply.
- Features are limited.
1. Free Tier
- Database with 500 MB of storage space and unlimited API calls
- Authentication – Up to 10,000 Users
- File Storage – Up to 1 GB of storage, with monthly transfer limitations of up to 2 GB.
2. Pay as you go
- Database – $0.125 per GB of storage, with no limits on API calls
- Auth – Unlimited
- File Storage – Data stored $0.021 per GB with Data transfer of $0.07/GB
For more pricing information, you can check out their website.
Supabase is the best open-source alternative to Google’s Firebase. Because of PostgreSQL’s power, it offers various remarkable features and does not have any data type limitations like other real-time database systems.
You can create a variety of apps using Supabase and its excellent features. Give it a try today!