Click New Project. Pick any name (e.g. armani-invoices) and a strong database password.
Choose the region closest to you (e.g. South America (São Paulo) for Guyana).
Wait about 1 minute for the project to spin up.
2
Create the database tables
In your Supabase dashboard, click SQL Editor → New Query → paste the code below → Run.
create table if not exists public.invoices (
id text primary key,
invoice_no text, date date, booking_ref text,
guest_name text, guest_address text, guest_contact text,
check_in date, check_out date, nights integer default 0,
items jsonb default '[]'::jsonb,
tax_rate numeric default 0, amount_paid numeric default 0,
status text default 'unpaid',
created_at timestamptz default now(),
updated_at timestamptz default now()
);
create index if not exists invoices_created_at_idx on public.invoices (created_at desc);
create table if not exists public.settings (
id integer primary key default 1,
account_name text default '', bank_name text default '', account_no text default '',
default_tax numeric default 0, default_cleaning numeric default 0,
default_service numeric default 0, default_rate numeric default 0,
terms text default '', next_invoice_num integer default 1,
updated_at timestamptz default now(),
constraint settings_singleton check (id = 1)
);
alter table public.invoices enable row level security;
alter table public.settings enable row level security;
drop policy if exists "Allow anon read invoices" on public.invoices;
drop policy if exists "Allow anon insert invoices" on public.invoices;
drop policy if exists "Allow anon update invoices" on public.invoices;
drop policy if exists "Allow anon delete invoices" on public.invoices;
drop policy if exists "Allow anon read settings" on public.settings;
drop policy if exists "Allow anon insert settings" on public.settings;
drop policy if exists "Allow anon update settings" on public.settings;
create policy "Allow anon read invoices" on public.invoices for select using (true);
create policy "Allow anon insert invoices" on public.invoices for insert with check (true);
create policy "Allow anon update invoices" on public.invoices for update using (true) with check (true);
create policy "Allow anon delete invoices" on public.invoices for delete using (true);
create policy "Allow anon read settings" on public.settings for select using (true);
create policy "Allow anon insert settings" on public.settings for insert with check (true);
create policy "Allow anon update settings" on public.settings for update using (true) with check (true);
3
Connect this app
In Supabase, click the gear icon (Project Settings) → API. Copy your Project URL and your anon / publishable key, then paste them below:
The publishable / anon key is safe to use in the app — it's designed to be public. Your data is protected by the RLS policies in step 2.