Claude Templates / S-tier · Foundation

Foundation

The Auth & Onboarding Playbook

Supabase auth, the signup → onboarding wizard, and edge-level account gating.

AUTH-ONBOARDING-PLAYBOOK.md · 10 sections · 1,204 words · 10 KB · markdown

Everything between "stranger hits your site" and "activated user inside the product." Covers Supabase auth wiring, the auto-profile trigger that prevents orphaned accounts, a multi-step onboarding wizard, and the proxy-level auth gate that default-denies your API surface.

What's inside

When to use it

Week 1, right after infrastructure.

Build these first

App Infrastructure

Straight from the file

If you keep confirmation disabled, the DB trigger from §4 handles everything. Simpler. Recommended for B2B/SaaS where the cold-email-list signal is the primary conversion event.

Table of contents

  1. 0. Use this spec
  2. 1. Architecture
  3. 2. Schema (Supabase)
  4. 3. proxy.ts (Edge auth)
  5. 4. Auto-create profile on signup
  6. 5. Onboarding wizard pattern
  7. 6. Account status enforcement
  8. 7. Email confirmation gotcha (read before configuring)
  9. 8. Common pitfalls
  10. 9. Kickoff prompt

How to run it

Drop AUTH-ONBOARDING-PLAYBOOK.md into your repo, then tell Claude Code: “Read AUTH-ONBOARDING-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

More foundation playbooks

← All 28 Claude templates