This workbook is ready to host with private, per-person accounts. Three short steps and you're live.
1. Create a free project at supabase.com. Under Project Settings → API, copy your Project URL and anon public key.
2. Open this file in any text editor and paste them near the top (search for BACKEND CONFIG):
const SUPABASE_URL = "https://xxxx.supabase.co"; const SUPABASE_ANON_KEY = "eyJhbGci...";
3. In Supabase → SQL Editor, paste and run this once:
-- each person's private workbook
create table workbooks (
user_id uuid primary key
references auth.users on delete cascade,
email text,
data jsonb not null default '{}',
updated_at timestamptz default now()
);
alter table workbooks enable row level security;
-- mentees: only their own row
create policy "own row read" on workbooks for select using (auth.uid() = user_id);
create policy "own row insert" on workbooks for insert with check (auth.uid() = user_id);
create policy "own row update" on workbooks for update using (auth.uid() = user_id) with check (auth.uid() = user_id);
-- mentor (admin) list + read-only access to everyone
create table admins ( user_id uuid primary key references auth.users on delete cascade );
alter table admins enable row level security;
create or replace function public.is_admin() returns boolean
language sql security definer stable set search_path = public
as $$ select exists(select 1 from admins where user_id = auth.uid()); $$;
create policy "admin read all" on workbooks for select using (public.is_admin());
4. Make yourself the mentor: sign in once through the live page, then in Supabase → Authentication → Users copy your user’s UID and run:
insert into admins (user_id) values ('PASTE-YOUR-UID-HERE');
Then host the file on any static host (Netlify, Vercel, Cloudflare Pages). Share the link - everyone who signs up gets their own private workbook, and a Mentor view button appears only for you. Tip: in Supabase → Authentication you can turn email confirmation on or off depending on how frictionless you want sign-up to be.
Sign in to pick up where you left off. Your workbook is private to your account - no one else can see or change it.