📄️ Introduction
Supabase is an open-source Firebase alternative. We currently use Supabase as our postgres database and authentication provider. To use Supabase in the application, you need to create a new client instance with the createClient method. It will automatically use the environment variables to connect to the Supabase API. Each client uses the cookies of the user to authenticate.
📄️ Migrations
We do most changes to the database using Supabase Studio, which provides a nice UI for creating migrations. Additionally you can use the sql editor in Supabase to run arbitrary sql commands. In order to create a migration file with the changes you made in the sql editor, you can use the following command:
📄️ Row Level Security (RLS)
Row Level Security (RLS) is a feature of Supabase that allows you to restrict access to rows in a table based on the user's role. This is useful for implementing fine-grained access control in your application.