Store setup
Enable accounts and the dashboard in clear steps
Supabase setup guide
Pages are ready in code — Supabase must be connected first
- 1
Fill in .env.local
Copy keys from Project Settings > API: URL, anon key, and service_role key
.env.local- 3
Run SQL files
In SQL Editor, run in order:
- supabase/seeds/reset-fresh.sql
- supabase/schema/schema-v2.sql
- supabase/seeds/seed.sql
- supabase/schema/storage.sql
- 4
Enable authentication
URL Configuration + Google + Authentica for phone. Skip OAuth Apps page.
1) Supabase URL Configuration
Authentication > URL Configuration — set Site URL and add Redirect URLs below.
Open URL ConfigurationSite URL (production)
https://www.rawad-ads.comRedirect URLs (copy all)
http://localhost:3000/auth/callbackhttp://localhost:3000/**http://localhost:3001/auth/callbackhttp://localhost:3001/**http://localhost:3002/auth/callbackhttp://localhost:3002/**http://127.0.0.1:3000/auth/callbackhttp://127.0.0.1:3000/**http://127.0.0.1:3001/auth/callbackhttp://127.0.0.1:3001/**https://www.rawad-ads.com/auth/callbackhttps://www.rawad-ads.com/**https://rawad-ads.com/auth/callbackhttps://rawad-ads.com/**https://onlyforyou.rawad-ads.com/auth/callbackhttps://onlyforyou.rawad-ads.com/**https://solutions.rawad-ads.com/auth/callbackhttps://solutions.rawad-ads.com/**https://signage.rawad-ads.com/auth/callbackhttps://signage.rawad-ads.com/**https://health.rawad-ads.com/auth/callbackhttps://health.rawad-ads.com/**https://tech.rawad-ads.com/auth/callbackhttps://tech.rawad-ads.com/**https://only-for-you-navy.vercel.app/auth/callbackhttps://only-for-you-navy.vercel.app/**https://*-zxc50zxc.vercel.app/auth/callback
App callback URL
https://only-for-you-navy.vercel.app/auth/callback2) Google Provider
Authentication > Providers > Google — enable and paste Client ID/Secret from Google Cloud.
Open Google settings in SupabaseAuthorized redirect URI in Google Cloud (not your app URL)
https://xeoqxeqiaheapziosvzk.supabase.co/auth/v1/callbackAuthorized JavaScript origins in Google Cloud
http://localhost:3000http://localhost:3001http://localhost:3002http://127.0.0.1:3000http://127.0.0.1:3001https://www.rawad-ads.comhttps://rawad-ads.comhttps://onlyforyou.rawad-ads.comhttps://solutions.rawad-ads.comhttps://signage.rawad-ads.comhttps://health.rawad-ads.comhttps://tech.rawad-ads.comhttps://only-for-you-navy.vercel.app
Skip Authentication > OAuth Apps — not needed for the Rowad platform.
Verify staff table
select id, email, full_name from public.staff;Link owner account in staff table
insert into public.staff (id, email, full_name) select id, email, coalesce(raw_user_meta_data->>'full_name', split_part(email, '@', 1)) from auth.users where email = 'zxc50zxcc@gmail.com' on conflict (id) do update set email = excluded.email, full_name = coalesce(excluded.full_name, public.staff.full_name);Enable Authentica (customer phone login)
The customer portal requires Authentica — without the API key, OTP will not send.
- Create a free account (100 free verifications)
- Create an application and copy your API Key
- Add the key to .env.local and Vercel, then Redeploy
- Try /en/login or npm run verify:portal
OTP guide — AuthenticaAUTHENTICA_API_KEY=<your_key_from_portal> - 5
Link your account in staff
Sign in at /en/admin/login then run in SQL Editor:
insert into public.staff (id, email, full_name) select id, email, coalesce(raw_user_meta_data->>'full_name', split_part(email, '@', 1)) from auth.users where email = 'zxc50zxcc@gmail.com' on conflict (id) do update set email = excluded.email, full_name = coalesce(excluded.full_name, public.staff.full_name); Restart the site
npm run dev or Redeploy on Vercel, then try /en/login
Checklist
- .env.local filled with real keys
- Run schema-v2 (customers + staff)
- NEXT_PUBLIC_SITE_URL = production URL on Vercel
- AUTHENTICA_API_KEY set for phone OTP
- At least one row in staff table
After setup, these pages will work:
/ar/login— Customer sign-in (phone)/ar/account— Customer account and orders/ar/admin/login— Staff sign-in/ar/admin— Dashboard (admin only)/ar/admin/brands/only-for-you/products/new— Add products and upload images/videos