Comments backend setup (Supabase)

The blog’s invite-only comments run on Supabase (free tier). The static site talks to it directly with the public anon key — all security is enforced by database Row-Level Security, so nothing secret lives in the repo.

One-time setup

  1. Create a project at https://supabase.com (free tier is fine).

  2. Run the schema. Dashboard → SQL Editor → paste the contents of supabase/schema.sqlRun. This creates the approved_emails, applications, and comments tables plus all the security rules.

  3. Enable email auth. Authentication → Providers → Email — make sure it’s enabled (magic link / OTP). No passwords are used.

  4. Set redirect URLs. Authentication → URL Configuration:
    • Site URL: https://sc103121.github.io
    • Redirect URLs: add both
      • http://localhost:4000/**
      • https://sc103121.github.io/**
  5. Copy your keys into _config.yml:
    • urlSettings → Data API (or the Connect button): https://YOUR-PROJECT.supabase.co
    • anon_keySettings → API Keys → the Publishable key (sb_publishable_…). This is the new name for the old “anon public” key and is browser-safe with RLS on. The Legacy tab’s anon key also works if you prefer it.
      supabase:
      url: "https://YOUR-PROJECT.supabase.co"
      anon_key: "sb_publishable_..."
      

      Both are safe to commit — they’re designed to be public. Never put the Secret key (sb_secret_…) / service_role key in the repo.

Day-to-day

Notes