Database Tables & Storage Setup
Setting up your database and storage is essential for getting started with NativeLaunch. This guide explains how to configure your Supabase project using ready-to-apply migrations — so you don’t have to manually recreate tables, buckets, or SQL policies.
How It Works
NativeLaunch uses Supabase as the backend. Instead of writing SQL or configuring Storage manually in the dashboard, you apply a set of predefined migrations included in the template.
These migrations automatically create and configure everything required by the app:
- Database tables and relations
- Row Level Security (RLS) policies
- Auth triggers
- Storage buckets for user-generated files
All schema changes are applied in a single step using the Supabase CLI.
NativeLaunch includes pre-built profile and notes features that rely on this setup to work out of the box.
What Gets Created
After applying the migrations, your Supabase project will include:
Database tables
auth.users— managed by Supabase Authprofiles— linked toauth.users, automatically created on sign-upnotes— demo table used by the Notes feature
Storage buckets
avatars— public bucket for user profile imagesnotes-images— private bucket for note attachments (user-scoped)
Security & automation
- Row Level Security (RLS) policies for all user data
- Storage access rules to ensure users can only access their own files
on_auth_user_createdtrigger to automatically create a profile record
You don’t need to manually configure any of this.
Use Supabase Migrations
- Install Supabase CLI
brew install supabase/tap/supabaseAfter installation, verify it:
supabase --versionYou can also run Supabase CLI without installing it globally:
npx supabase@latest --helpUseful for quick commands like supabase init or supabase db push.
- Login to Supabase
supabase login- Link your Supabase project
Go to your Supabase Dashboard, find your project, and copy the Project ID (ref).
supabase link --project-ref your-project-idSupabase CLI will prompt you for your database password.
You can find it in Project Settings → Database → Connection string.
- Apply the migrations
From the root of the NativeLaunch repository, run:
supabase db pushThis single command applies all database migrations and creates the required tables, storage buckets, policies, and triggers automatically.
In earlier versions of NativeLaunch, some setup steps (like auth triggers or storage) were done manually. These are now fully handled by migrations — no dashboard configuration required.

Notes on Storage Buckets
- The
avatarsbucket is public and used for profile images. - The
notes-imagesbucket is private and scoped per user. - Access is enforced via storage policies — users can only read or write their own files.
You do not need to create or configure buckets manually in the Supabase dashboard.