Back to sign in
CONNECT YOUR EXISTING PROJECT

Set up Supabase

Moblox uses Supabase Auth for grown-up accounts and a private Postgres table for each family’s creature shelf.

01

Open your existing Supabase project

In the Supabase dashboard, choose the project you want Moblox to use. You do not need to create another project.

02

Create the Moblox table

Open SQL Editor → New query. Copy supabase/schema.sql from this repository, paste it, then click Run. This creates a separate moblox_creatures table and row security rules for each signed-in account.

03

Copy the project URL and publishable key

In Project Settings → API Keys, copy the Project URL and the publishable key (it starts with sb_publishable_). The legacy anon key also works. Never use a secret or service_role key in this website.

04

Add local environment values

Copy .env.example to .env.local in the project root and replace the two example values. Restart npm run dev after saving.

05

Enable email sign-in

In Authentication → Sign In / Providers, enable Email. Keep email confirmation enabled if you want verification. Add your local and deployed site URLs to Authentication → URL Configuration; include http://localhost:3000/auth/callback and your eventual Vercel callback URL.

06

Try it

Run npm install and npm run dev, open /login, create a grown-up account, then make a creature. Its shelf syncs to the moblox_creatures table for that signed-in account.

The browser only needs your project URL and publishable key. The database policies ensure accounts can only read and change their own rows.
Supabase’s official Next.js guide