Supabase Backend
Database & Schema
Initialize your database tables, triggers, and Row Level Security (RLS) policies.
Launch-Native comes with a ready-to-use SQL schema that creates all the necessary tables for a modern SaaS (Users, Subscriptions, etc.) and sets up the proper security rules.
1. Run the Initial Schema
Instead of creating tables manually, you will use the provided SQL file to bootstrap your database in one click.
- Open your code editor and find the
supabase/schema.sqlfile included in the boilerplate. - Copy the entire content of this file.
- Go to your Supabase Dashboard.
- Navigate to the SQL Editor (the terminal icon in the left sidebar).
- Click on New query.
- Paste the SQL code you copied.
- Click the Run button (or press
CMD + Enter).
If everything is successful, you will see a "Success" message.
2. What did this script create?
The script automatically sets up the following architecture:
profilestable: Stores public user data (name, avatar, etc.). It is automatically linked to the Supabase Auth system.subscriptionstable: Ready to receive webhook data from Polar.sh or RevenueCat.- Triggers: A Postgres trigger is created to automatically insert a new row in the
profilestable every time a user signs up. - Row Level Security (RLS): Policies are enforced so users can only read and update their own data.
3. Viewing your Tables
To verify that your tables were created correctly, go to the Table Editor (the table icon in the left sidebar). You should now see your profiles and subscriptions tables listed there.
