This repository includes the code demonstrating the implementation of a straightforward Role-Based Access Control system in Supabase.
- ๐ RBAC schema
- ๐ RLS policies
- ๐งช Testing seeder
- ๐ Insomnia file to test endpoints
To run this application locally, you need to be able to run Supabase on your machine and clone this repository.
Install the CLI with Homebrew:
brew install supabase/tap/supabase
The Supabase CLI uses Docker containers to manage the local development stack. To get started,
git clone git@github.com:devsjors/rbac-supabase.git
Now, to start the application, run:
supabase start
To facilitate database querying and testing, I've assembled an Insomnia Collection containing all the necessary endpoints. You can access this collection in the insomnia-endpoints-collection.json
file.
Running commands with supabase supabase [command]
Command | Description |
---|---|
start |
Start containers for Supabase local development |
status |
Show status of local Supabase containers |
stop |
Stop all local Supabase containers |
db reset |
Resets the local database to current migrations |