Commit 0687232
docs: rewrite new-dev setup guide (env, seed, tests, gotchas) (#529)
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.
Claude-Session: https://claude.ai/code/session_01853LDokPbhv9Kg9Ctz9DB5
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent dbbfd9c commit 0687232
2 files changed
Lines changed: 321 additions & 286 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
41 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
| |||
47 | 70 | | |
48 | 71 | | |
49 | 72 | | |
50 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
51 | 76 | | |
52 | 77 | | |
| 78 | + | |
53 | 79 | | |
54 | 80 | | |
55 | 81 | | |
56 | 82 | | |
57 | | - | |
| 83 | + | |
58 | 84 | | |
59 | 85 | | |
60 | 86 | | |
| |||
0 commit comments