- Create a project at supabase.com.
- Copy Project URL and anon public key into
.env.local:NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Configure Admin access in
.env.local:- Set
NEXT_PUBLIC_ADMIN_EMAILSto your email (e.g.NEXT_PUBLIC_ADMIN_EMAILS=admin@example.com). Multiple emails can be comma-separated. AuthContextreads this variable viaisAdminEmail(lib/env.ts), andcomponents/AdminGuard.jsxuses it to gate all/adminroutes. If left unset,isAdmindefaults tofalseand authenticated users will be blocked with an "Access Denied" error when attempting to reach the admin catalog panel.
- Set
- In the SQL editor, run
schema.sql. - Auth → Providers: enable Email (and Google if you want OAuth).
- Auth → URL Configuration: add
http://localhost:3000/**(and your production URL). - Restart
npm run dev.
Products live in the products table; images in the public products storage bucket.