⚠️ Demo mode is active. Data resets on page refresh. Follow these steps to go live.
1
Create a Supabase project
Go to supabase.com → New project → name it silentsupport → choose region West EU (closest to Nigeria) → Create project.
2
Create your database tables
In Supabase → SQL Editor → New query → paste and run:
create table users (id uuid primary key, name text, email text, role text default 'seeker', created_at timestamptz default now());
create table cases (id uuid primary key default gen_random_uuid(), uid uuid references users(id), title text, desc text, need numeric, raised numeric default 0, cat text, urg text, status text default 'pending', vs text default 'pending', priv text, date date, bank text, docs text[], updates jsonb default '[]', created_at timestamptz default now());
create table donations (id uuid primary key default gen_random_uuid(), cid uuid references cases(id), did uuid references users(id), amt numeric, ref text, date date, created_at timestamptz default now());
3
Enable Row Level Security
In SQL Editor, run:
alter table users enable row level security; alter table cases enable row level security; alter table donations enable row level security;
create policy "Users can read own profile" on users for select using (auth.uid() = id); create policy "Users can update own profile" on users for update using (auth.uid() = id); create policy "Users can insert own profile" on users for insert with check (auth.uid() = id);
create policy "Anyone can read approved cases" on cases for select using (status = 'approved' or auth.uid() = uid); create policy "Auth users can insert cases" on cases for insert with check (auth.uid() = uid); create policy "Case owners can update" on cases for update using (auth.uid() = uid);
create policy "Auth users can read donations" on donations for select using (auth.uid() = did); create policy "Auth users can insert donations" on donations for insert with check (auth.uid() = did);
4
Paste your Supabase config
In your Supabase project → Settings → API → copy the Project URL and anon public key.
🔒 The anon key is safe to use in the browser. It only has access to what your Row Level Security rules allow. Never paste your service_role key here.
5
Add Paystack public key
dashboard.paystack.com → Settings → API Keys. Use your live public key (pk_live_...) for real payments.