1
Create a Supabase project
- Go to supabase.com and sign in (or create a free account).
- Click New project from your organization dashboard.
- Give the project a name (e.g.
birthday-wall), choose a database password, and select the region closest to your users. - Click Create new project and wait for provisioning to finish — this typically takes about 30 seconds.
2
Run the database migration
All three required tables are created by a single SQL script. In your Supabase project:After the query succeeds you should see all four tables —
- Click SQL Editor in the left sidebar.
- Click New query.
- Paste the entire migration below and click Run.
messages, page_configs, users, and registration_codes — in the Table Editor.3
Retrieve your API credentials
Your Next.js app needs three values from Supabase. Navigate to Project Settings → API in the Supabase dashboard:
Copy all three values — you will need them in the next step.
4
Add credentials as environment variables
Add the three Supabase values to your environment. See the environment variables page for the full list of required variables and a ready-to-paste
.env.local template.Row Level Security
The migration SQL automatically enables Row Level Security (RLS) policies on all three tables. Here is what each policy enforces:
The
anon key, by contrast, is intentionally public. It is embedded in your frontend bundle via the NEXT_PUBLIC_ prefix and is safe to expose — RLS policies enforce what it can and cannot access.
Creating the first admin user
Once your tables exist you need a seed admin account to access/admin:
- In the Supabase dashboard, go to Authentication → Users → Add user.
- Enter an email and a strong password, then click Create user.
- Copy the UUID shown in the users list.
- Open the SQL Editor and run:
/admin/login UI using the registration code you seeded in the SQL above — any account created with a valid registration code is automatically assigned the admin role.