This is a one-time setup — takes about 5 minutes. Your data will sync across all devices instantly once connected.
Go to supabase.com → Click "Start your project" → Sign in with Google (free, no credit card)
Click "New project" → Name: agel-website → Set a database password → Create project (wait ~1 minute)
Go to SQL Editor (left sidebar) → Click "New query" → Paste and run this SQL:
create table if not exists settings (
id text primary key,
data jsonb not null default '{}',
updated_at timestamptz default now()
);
create table if not exists gallery (
id uuid default gen_random_uuid() primary key,
title text not null,
cat text default 'other',
description text,
img text,
created_at timestamptz default now()
);
create table if not exists quotes (
id uuid default gen_random_uuid() primary key,
name text, email text, phone text, service text,
company text, location text, description text,
date_display text,
created_at timestamptz default now()
);
create table if not exists admins (
id text primary key,
password_hash text not null
);
-- Allow public read for settings and gallery
alter table settings enable row level security;
alter table gallery enable row level security;
alter table quotes enable row level security;
alter table admins enable row level security;
create policy "public read settings" on settings for select using (true);
create policy "public read gallery" on gallery for select using (true);
create policy "service all settings" on settings for all using (true) with check (true);
create policy "service all gallery" on gallery for all using (true) with check (true);
create policy "service all quotes" on quotes for all using (true) with check (true);
create policy "service all admins" on admins for all using (true) with check (true);
-- Insert default admin (password: admin123 — change after login)
insert into admins (id, password_hash) values ('main', 'admin123') on conflict do nothing;
Click Run — you should see "Success. No rows returned"
Go to Settings → API (left sidebar) → Copy your Project URL and anon/public key