Writer’s Brief

The Hook

I built the entire backend for a live course portal - curriculum sync, progress tracking, admin panel with user invites - in a single afternoon, mostly by describing what I wanted in English.

Main Points to Cover

  1. The “single source of truth” pattern: edit one JSON file, everything updates (dashboard, week pages, Supabase database). One command to deploy.
  2. The debugging story: inline checkboxes wouldn’t load because let variables don’t go on window in JavaScript. Used Chrome browser automation from inside Claude Code to diagnose it live.
  3. The admin invite flow: “I want to add someone who doesn’t exist yet” - Claude built a Supabase admin API integration that pre-creates user accounts so they link up automatically when the person signs in with Google.

The Angle

Personal discovery. The backend grew organically from “I need to edit curriculum in one place” to “wait, why aren’t these synced?” to “I need to add people before they sign up.” Each step was a natural next question, not a planned architecture.

Target Reader

Creators running cohort courses who want a custom portal without hiring a developer. Also: anyone curious what “vibe coding” actually looks like when it’s real production infrastructure.

Tone Notes

Casual, show-don’t-tell. The interesting part is HOW the problems surfaced (through actual use, not spec docs) and how fast they got solved. Lean into the debugging moment - that’s where people learn.

Raw Material / Moments to Write From

These are notes for Alex to write from. Not prose.

  • The let vs var debugging session. window.currentUser was always undefined. Used Chrome browser automation from Claude Code to run JS in the actual live page and prove it. The fix was one line but the diagnosis took multiple rounds.
  • “this stinks lol” - first attempt at an editing view was too form-heavy. Second attempt still confusing. Third attempt: “just show me how the pages actually look and let me edit them.” The lesson: don’t build admin tools, build the thing itself but editable.
  • The organic progression: “where do I edit the homework?” led to “won’t every week be similar?” led to “why aren’t setup and dashboard synced?” led to “how do I add someone new?” Each question was the natural next one. Nobody planned this architecture.
  • The MutationObserver pattern for auth timing. Can’t just check if (currentUser) because auth is async. Can’t override revealContent() because auth.js redefines it. Ended up watching for a CSS class removal on <body>. Weird but bulletproof.
  • Three iterations on the setup page checkboxes: (1) separate checklist at bottom - “makes no sense”, (2) still not loading - auth timing bug, (3) loading but invisible - the let scoping bug. Each failure taught something.
  • The Supabase admin API trick for invites: POST /auth/v1/admin/users with email_confirm: true creates a user record. When they later sign in with Google using that email, Supabase auto-links the identities. No invite email needed. The account just… exists when they get there.