Supabase
Setup Launch Leopard with Supabase
Follow this guide together with the guide on Supabase to setup Launch Leopard with Supabase. https://supabase.com/docs/guides/auth/server-side/sveltekit
Make sure to follow Step 8 as well in the Supabase guide to setup the email auth template correctly.
Setting up the Supabase boilerplate
- Go to Supabase and create an account.
- Once you have created an account, create a new project.
- Once you have created a project, go to the project settings and go to
Project Settings > API
and copy theURL
,anon public
API key to your.env
file. - Then go to
Project Settings > Database
and copy theNodejs Connection string
to your.env
file (make sure to replace [YOUR-PASSWORD] with your password).
The PRIVATE_SUPABASE_SERVICE_ROLE_API_KEY
is used to bypass the Row Level Security policies. This is used for Stripe webhooks, since they don’t have a user context. Make sure to keep this key secret, and don’t share it with anyone.
Setting up the database
Add a profile table to your database with the following SQL:
This will also create a trigger that will automatically create a profile for every new user.
Already have users but didn’t setup a profiles table? Run this SQL to create profiles for them: