Static site + Supabase (auth, Postgres, private Storage). Deployed on Render.
- Create a project at supabase.com.
- SQL Editor → paste and run
supabase.sql. - Authentication → Sign In / Providers (or Settings) → turn OFF "Allow new users to sign up". Invite-only from now on.
- Authentication → URL Configuration: set Site URL to your Render URL and add it under Redirect URLs (invite links land there).
- Invite people with
invite.ps1, not the dashboard's "Invite user" button. Without custom SMTP, Supabase's built-in email only reaches your own team's addresses, so dashboard invites never arrive for readers.invite.ps1makes the link and you send it yourself. Runtest-invite.ps1to check everything works. Invite your own email first. Open the link it gives you, set a password on the site, then run in the SQL editor:Log out/in: an upload form appears for you only. Invite everyone else the same way.insert into public.admins (user_id) select id from auth.users where email = 'you@example.com';
- Settings → API: copy the Project URL and the
anonpublic key.
- Push this folder to a GitHub repo.
- Render → New → Static Site (or Blueprint using
render.yaml). - Build command:
node build.js, publish directory:. - Environment variables:
SUPABASE_URL,SUPABASE_ANON_KEY.
invite.ps1makes one link per person and copies a ready-to-send message. Send each person only the newest link: making another link for the same email cancels the earlier one. Links last 24 hours and work once.- Someone who already has an account automatically gets a password-reset link instead.
node tests/ui/run.js: every screen and edge case in headless Chrome with a fake Supabase (no network).node tests/e2e/run-mock.js: the full reader journey (invite → password → gallery → reset → deleted account) with the real page and real supabase-js library, against a local stand-in for Supabase. No network or token needed.node tests/e2e/live.js: the live site against the real Supabase project; public checks only, touches no accounts.test-invite.ps1: Supabase settings, the invite/reset backend, and a full reader journey in a real browser on the live site with a throwaway account (deleted afterwards). Run this after any change.
- Only logged-in users can read the
comicstable and the privatecomicsbucket (images load via 6-hour signed URLs, cached in the browser and wiped on log out). - Only users listed in
adminscan insert/delete comics or files; enforced by Row Level Security, not the UI. - Never put the
service_rolekey in this site. Only the anon key. - Signups and anonymous sign-ins are disabled in Supabase, so only invited emails have accounts. To revoke access, delete the user under Authentication → Users.
- The Supabase library is served from
vendor/(verified against npm's published hash), not a CDN. A Content-Security-Policy only allows scripts from this site and connections to Supabase.
- Supabase pauses free projects after about 7 days with no activity. If the site stops logging people in, open the Supabase dashboard and click Restore.