Full-stack .NET developer
Skilled full-stack developer unafraid of any technology. He began with C# backend and is now a TypeScript and serverless enthusiast. After work, he plays football and works out in a gym. His biggest dream is to own a vineyard.
On 10th May, 2022 Supabase announced that it raised $80 million funding for further growth. Such an event is a great opportunity to take a quick glance at “an open-source Firebase alternative”. Supabase is an open-source backend as a service provider that allows developers to outsource server-side features and focus on the frontend. In this post I want to tell you more about what BaaS exactly is, overview currently available features in Supabase and give you some ideas when Supabase can be used. In the next blog post I will do a technical dive-in and present how you can implement and use Supabase features. Let’s start with the ultimate question:
BaaS stands for Backend as a Service and it is a model for providing backend services to frontend applications. BaaS can ensure access not only to a database via API but may also provide services like: push notifications, user authentication, file storage, automated testing solutions, analytics and more. BaaS vendors use cloud and serverless solutions to ensure scalability and security. Using BaaS allows developers to focus on the product and on providing the best user interface and experience, at the same time outsourcing all backend code to a BaaS vendor. It speeds up development process tremendously and allows the end users to use it as soon as possible. Such approach gives app owners quick market verification, scalability and security.
The most common use cases of BaaS are mobile applications, mobile games and web MVPs. The list below presents a few BaaS vendors:
In the introduction I cited the Supabase website that Supabase is “an open-source alternative to Firebase”. That is a great marketing catch-phrase, however Supabase is still a young project that is currently in beta phase and still lacks many features and is not quite yet production-ready. Supabase Inc. that owns the platform has already raised $116 million and is backed by Mozilla, YC and Coatue.
Supabase is not only an open-source project but also utilises free open-source tools like PostgreSQL, GoTrue or Realtime. If there is no open-source tool available, Supabase team develops such tool by themselves. Supabase is a hosted platform, so to use it you don’t need to install anything. To develop your own project with Supabase you only need an account on the platform (Supabase). There is an option to deploy and host your own Supabase instance but it stands in opposition to BaaS approach. However, it is still nice that you can do that. The diagram below presents Supabase’s architecture (as mentioned before all of these technologies are open-source). More detailed description of these tools you can find here: https://github.com/supabase/supabase#how-it-works
Supabase platform architecture (source: https://github.com/supabase/supabase)
Supabase is still a young project that lacks many features that are provided by the competition, but there is a bare minimum that allows you to develop satisfying projects at ease. I will talk more about how you can utilise these features in my next blog post. Please treat this section only as a trailer of what possibilities Supabase gives you. Also I want to make it clear that all BaaS providers have such features, so if you want to use BaaS for your production app, then don’t hesitate to choose a different provider.
The core of almost all applications is storing data and allowing users to get it whenever they want and as fast as possible. Under the hood, Supabase uses PostgreSQL which is an open-source, relational database. PostgreSQL thanks to being a relational database ensures security and reliability in the same time providing great performance. PostgreSQL is a state-of-art solution that was released back in 1995 that has been supported since then.
Table view in Supabase (source: https://supabase.com)
Straight away you get an authentication API that allows you to register user accounts and then authenticate them in your application. Supabase allows you to integrate with all major social apps. If you don’t fancy using external auth providers you are able to use good old email - password authentication.
Supabase takes care of authorization as well. Combining authentication API and PostgreSQL database you are able to define rules and manage access for your users.
Storage is file store optimised to keep asset data remotely. It is a great suit for storing user avatars, documents etc. Supabase platform allows admins to search, upload, view and delete files straight from a browser. Supabase storage integrates with PostgreSQL and provides simple JS api to use.
Sometimes you need to do some operations asynchronously or run an operation on the backend. For such use cases there are edge functions. You can easily deploy them and, what is more, Supabase distributes deployed functions globally, so all users get a similar experience with respect to speed. Until the 1st of August 2022 edge functions are in experimental phase, so there will be some breaking changes.
Functions view in Supabase (source: https://supabase.com)
Supabase as a BaaS platform shares their features and use cases. The biggest difference between other solutions available on the market is the fact that Supabase is still in beta phase. It means that Supabse is NOT suitable for production solutions yet.
When you want to test if your idea works and you don’t want to bother building a fully fledged solution then Supabase is a great suit. It provides all necessary tools to quickly build a web app and see if your idea works. What is more, if your idea clicks and you want to move away from BaaS and put it into your own server then thanks to the fact that Supabase uses PostgreSQL you can easily migrate all data.
If you like to be your own software house and develop your own apps, instead of looking for them in Google Play, then Supabase will help you. You can concentrate on pure features development, and it is completely free. The only drawback is the fact that Supase does not have built-in hosting, so you either need your own server or use a different provider (like Vercel).
When you want to learn a new frontend technology and you prefer to learn by practice, then it is a waste of time to build a complete API. Using Supabase allows you to quickly dive into frontend development. In my opinion, counterintuitively, Supabase’s lack of features is an advantage. Thanks to that, you can fully concentrate on learning features of technology you are using, instead of going through hundreds of doc pages to find a way to configure features that may be required but not needed for you.
During hackatons, time is your most precious resource that you just can’t waste. Using Supabase allows you to squeeze some more features in the limited time. I wish I knew such technologies existed back when I used to participate in hackatons. I would be able to put all my energy into features.
Supabase is still a young project that is being developed quickly. It may not be ready for a production application for millions of users, but it still is an interesting option to start learning JS and frontend. What is more, Supabase already provides core functionalities that allows developers to dive into BaaS world. Personally I use Supabase for all my side projects, which I do not want to bother creating API with. In the next blog post I will show you how you can use Supabase features in practice.