[Episode 3] – Discovering Supabase

[Episode 3] – Discovering Supabase

Supabase is a new low code platform that helps speed the development and simplify the deployment in production. As soon as you sign up for an account and create a project, you already have an instance running available in an AWS data center, accessible wherever you are.

It is particularly suitable if you would like to create a proof or concept or if you would like your project to be soon in production.

As a backend developer, it reduces the tendency to add complexity to the back way too soon in the project, before having the user base that would justify more components in the architecture. On the other hand it may push people to add way too much logic in the frontend which leads to data integrity issues and security breach. The business rules go to the back otherwise someone else using your API may alter the data in an inappropriate way. In my opinion this is one of the limitation of supabase, even if you can ultimately write all the rules in the database or block the access to the database and force the user to call the edge functions.

Anyways, for the project I’m building, I’m sure that Supabase will do the job and we will se that it has many qualities.

Postgres as database

Postgres is a well known relational database that has proved its efficiency. Many features turn around postgres in Supabase. For instance, the user management is a schema generated by the platform. The rights are based on Row Level Security (RLS) that allows to define select, insert, update and delete rule that will be applied to each row.

Supabase provides a good user interface to edit the schema of your database. However if you are more comfortable with SQL, there is as well a web SQL editor to edit and execute your request.

Editing a table in Supabase

User management

The user management is one of the great features of such a low code platform. As developer we tend to write every time a new user management system for each new project. This is not only a waist of time but also a huge security risk as the good practices evolve continually to face the new threats.

It’s basically very simple to create a new user (sign up), authenticate (sign in), authorize with the RLS and manage the account.

Frontend libraries

Another strength of Supabase is the frontend libraries that are offered to facilitate the access to the backend. Among them: JavaScript, Angular, React, Vue, Next.js and obviously Flutter.

Supabase provides you a URL and an API key that you need to add to you frontend code. Then, the library you chose will take care of the connections and let you easily interact with the backend with rather easy to understand functions.

Bucket

Supabase does not only take care of your database but also the files that you may want to upload. For instance for a profile picture or any PDF documents. Once again, the API simplifies the management and allows you to quickly upload a file and store it in your bucket.

For the bucket, an authorization system is also provided to let you control the access to the content in your bucket.

Ready for prod

Another key element is the simplicity to go in production. For a new project that needs to convince new users to opt in it’s a vital part to be quick to show what’s your app is capable of. First you thing about having something to show that works and then if you project becomes successful you’ll figure out if you need to change something in your architecture. You even may decide to stay with Supabase until the retirement of your app.

Of course, with grate power comes great responsibilities. The temptation to just quickly change something in production is big. You’ve got to set your rules and keep them. Can you just update the prod ? Do you need stages before rolling out ? That’s up to you but I recommend you to apply the good practices.

With Supabase you almost don’t need to thing about scaling you have the time to see it comes. That’s a relief as you want to focus more on the features and user experience at the beginning rather than the scaling. First you need to grow you user base.

Log and monitoring

With Supbase you get access to good statistics and overview of your running app. You can read the logs in the web interface and track any suspicious activity. You can as well follow the performance and see if your platform is handling the workload or if you need to adjust something.

For the logs you can filter and query the logs to quickly find an error or something that is abnormal. The platform collects for you the logs that you need.

To monitor you app, you can create your own dashboard with a collection of widget. You can see right away if your instance is healthy and performing well.

Leave a Reply

Your email address will not be published. Required fields are marked *