For a while I have been on the fence whether to learn the BaaS (Backend-as-a-service) Supabase. Few reasons for this, the first reason is because I don’t want to feel like I’m restricted and trapped into a service, as we have seen many times that companies can hike up their prices when they have a big userbase (referred to as a rug-pull). The second reason is because I dreaded liking it too much and I would eventually forget how to build my own API’s.
Table of contents
Open Table of contents
Why use a BaaS
The biggest reason why anyone would use a BaaS is because it’s intended to save the developer a lot of time. When specifically talking about supabase you don’t need to create individual endpoints, authentication, email templates, storage features, real-time built in (websockets) and cron jobs. If you was to implement all of these features into your own backend then it would take a considerable amount of time.
Endpoints
When creating API’s a lot of the developers time will be creating the endpoints for users to connect to, when you use a BaaS like supabase you just create a fetch request using any HTTP method and it will work out of the box.
Authentication
Supabase has built in authentication that uses JWT tokens and has registration, login, OAuth providers support, forgotten password, session management, RLS (row-level security). If you were to create these features on your own this would take a good amount of time to implement.
Email templates
Most developers realise that creating email templates can be tedious, however Supabase have their own page where you can create and preview your templates for different emails such as confirm signup, invite user, magic link, change email address, reset password and reauthentication.
Storage features
Although some people would opt to use a different third-party storage, Supabase gives the developers the option to use their storage for files, images and videos. The documentation provides the developer with all the functions to be able to interact with the API.
Real-time
Websockets can be difficult to setup, but with Supabase you just need to enable them on the tables you require them. They’re also available on the generous free-plan.
Cron-jobs
When developers build their own backend they would need to use another service to ping their endpoints, but with Supabase they’re built in and just need to be enabled in the dashboard.
Conclusion
These BaaS providers such as Supabase are very powerful and can save the user a lot of time when developing, but there are many traps that developers can fall into such as relying on these tools too much and being locked into their service. I think it’s important to understand the pros and cons and make your own judgement whether it’s a good idea or not.