Database
This project uses Supabase for the backend, which handles the database, authentication, etc.
Supabase (.env) Setup
Pre-Requirements: Have a Supabase account with a project. Otherwise, feel free to create a new project [here] before continuing.
In order for our boilerplate to have all the required environment variables, we need to set them up in the .env
file.
You need to get the following variables from Supabase: NEXT_PUBLIC_SUPABASE_URL
, NEXT_PUBLIC_SUPABASE_ANON_KEY
and DEFAULT_SUPABASE_SERVICE_ROLE_KEY
.
Supabase Table Setup
Let’s now create all the required tables for this boilerplate to handle things such as user data, subscriptions, free trials, etc. - using the Supabase SQL Editor:
Inside the codebase, go to create_tables.sql
and paste its data inside the Supabase SQL Editor which can be found in the dashboard.