docs: rewrite new-dev setup guide (env, seed, tests, gotchas) - #529
Merged
Conversation
Rewrites docs/GETTING_STARTED.md as the canonical "how to run this project" guide and fixes the README quick start. Corrections to what was there: - README told devs to open localhost:3000 — tenant resolution reads the subdomain, so localhost bounces every authenticated page to /join-school. Both docs now say lvh.me:3000 and explain why. - Guide recommended cloud Supabase first and `db push` for local setup; local flow is `supabase start` + `npm run db:reset`. - Guide said to confirm signup email via Mailpit — email confirmations are disabled locally (config.toml enable_confirmations = false). Adds what new devs were missing: - Copy-paste .env.local block with the local Supabase keys. - Seed-account table annotated with which subdomain to log in on. - Full seed inventory (tenants free vs enterprise and why, courses, products, plans, alice's pre-seeded subscription) and why the seed hand-writes auth.users — handle_new_user() doesn't fire on SQL insert. - Migration workflow, unit + E2E test rules (dev server first, lvh.me, workers=1), Stripe CLI's two distinct webhook secrets, cron secret, mcp-server's port-3000 clash with next dev. - Troubleshooting: join-school bounce, port clash + the site_url=localhost:3005 in config.toml, stale JWT after role change, the tables with no tenant_id that error the whole query. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01853LDokPbhv9Kg9Ctz9DB5
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rewrites
docs/GETTING_STARTED.mdas the canonical "how to run this project" guide for new devs, and fixes the README quick start.Why
The existing instructions had three things that actively break a first run:
localhost:3000. Tenant resolution reads the subdomain, so onlocalhostno tenant resolves and every authenticated page bounces to/join-school. Both docs now saylvh.me:3000and explain why.supabase db pushfor local setup. Local flow issupabase start+npm run db:reset.config.toml→enable_confirmations = false), so signup logs straight in.What's new
.env.localblock, with the keys sourced fromsupabase status(not hardcoded — GitHub push protection flags the localsb_secret_…literal).auth.users/identities/profiles:handle_new_user()doesn't fire on direct SQL inserts.webServerin the Playwright config),lvh.menotlocalhost,workers: 1locally or GoTrue rate-limits the sign-ins.CRON_SECRETfor/api/cron/*, and mcp-server defaulting to port 3000 where it fightsnext dev./join-schoolbounce, port clash + thesite_url = localhost:3005committed inconfig.toml, stale JWT after a role change, and the tables with notenant_idwhere adding the filter errors the whole query.Test plan
Docs only — no code paths touched.
CLAUDE.md,DATABASE_SCHEMA,AUTH,MONETIZATION,DEVELOPMENT_WORKFLOW,MIGRATIONS,I18N_GUIDE,MCP_SETUP,TROUBLESHOOTING,PROJECT_OVERVIEW).tenants,courses,products,plans,tenant_users), not against the seed file's comments.supabase statusandsupabase/config.toml.package.json.🤖 Generated with Claude Code
https://claude.ai/code/session_01853LDokPbhv9Kg9Ctz9DB5