Add and price your vehicle types. The daily rate will be auto-filled when selected.
🌿 Park Library
Define parks with seasonal rates. Leave date range blank for a fixed rate year-round.
🏕️ Lodge Library
Define lodges / camps with seasonal rates. Leave date range blank for a fixed rate.
🎯 Activity Library
Define your standard activities and costs. When adding activities to a park, select from this library to auto-fill the name and price.
🗄️ Connect to Supabase Database
Step 1 — Create your free Supabase project
Go to supabase.com → click Start your project → sign in with GitHub
Click New Project, name it safari-calculator, set a password, choose region nearest to you (e.g. Frankfurt)
Wait ~2 minutes for it to set up
Step 2 — Create your database tables
In your Supabase dashboard, go to SQL Editor → click New Query, paste the SQL below and click Run:
CREATE TABLE quotes (
id bigserial PRIMARY KEY,
created_at timestamptz DEFAULT now(),
client text,
destination text,
guests int,
days int,
currency text,
total_label text,
total_raw numeric,
guest_mode text,
breakdown jsonb
);
CREATE TABLE vehicle_library (
id bigserial PRIMARY KEY,
name text NOT NULL,
rate numeric NOT NULL DEFAULT 0
);
CREATE TABLE park_library (
id bigserial PRIMARY KEY,
name text NOT NULL,
location text,
seasons jsonb NOT NULL DEFAULT ‘[]’,
website text DEFAULT ”,
image_url text DEFAULT ”,
description text DEFAULT ”
);
CREATE TABLE accom_library (
id bigserial PRIMARY KEY,
name text NOT NULL,
location text,
seasons jsonb NOT NULL DEFAULT ‘[]’,
website text DEFAULT ”,
image_url text DEFAULT ”,
description text DEFAULT ”
);
CREATE TABLE activity_library (
id bigserial PRIMARY KEY,
name text NOT NULL,
category text NOT NULL DEFAULT ‘Other’,
cost numeric NOT NULL DEFAULT 0
);
— Allow public read/write (fine for private use)
ALTER TABLE quotes ENABLE ROW LEVEL SECURITY;
ALTER TABLE vehicle_library ENABLE ROW LEVEL SECURITY;
ALTER TABLE park_library ENABLE ROW LEVEL SECURITY;
ALTER TABLE accom_library ENABLE ROW LEVEL SECURITY;
ALTER TABLE activity_library ENABLE ROW LEVEL SECURITY;
CREATE POLICY “Allow all” ON quotes FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY “Allow all” ON vehicle_library FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY “Allow all” ON park_library FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY “Allow all” ON accom_library FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY “Allow all” ON activity_library FOR ALL USING (true) WITH CHECK (true);
— Storage bucket for lodge & park photos
INSERT INTO storage.buckets (id, name, public)
VALUES (‘safari-photos’, ‘safari-photos’, true)
ON CONFLICT DO NOTHING;
CREATE POLICY “Allow all safari-photos”
ON storage.objects FOR ALL
USING (bucket_id = ‘safari-photos’)
WITH CHECK (bucket_id = ‘safari-photos’);
Step 3 — Get your API keys
In Supabase dashboard → Project Settings → API — copy your Project URL and anon public key below:
⚠️ The anon key is safe to use here — it only has the permissions you set in the SQL above. Never paste your service_role key.