feat: add one-command dev setup scripts#10
Conversation
Add `bun run dev:full` for daily startup (DB start + health wait + schema push + dev server) and `bun run setup` for first-time onboarding (bun/docker checks, .env copy, install, DB start, schema push). Removes the manual two-step `db:start` + `dev` dance and guards against starting the app before PostgreSQL is ready. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review WalkthroughTwo npm scripts and two bash scripts were added. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
bun run dev:full— starts DB, waits for PostgreSQL to be ready, pushes schema, then starts the dev server in one commandbun run setup— first-time onboarding script that checks for bun/docker, copies.env.example→.env, installs deps, starts DB, and pushes schemascripts/dev.shandscripts/setup.sh(both executable)Why
Developers had to manually run
bun db:startthenbun devin the right order, with no guard against the app starting before PostgreSQL was ready. New devs also had to manually wire up.envand rundb:pushbefore anything worked.Reviewer Notes
bun run dev/bun run db:startare unchanged — no regressionspg_isreadyup to 30 seconds then exits with an error if Docker isn't updb:pushis idempotent so running it on everydev:fullis safe.envis not committed — the setup script copies from.env.exampleTest plan
bun run setupon a fresh clone creates.env, installs deps, starts DB, pushes schemabun run dev:fullstarts DB, waits until ready, syncs schema, boots web + docsbun run devstill works independentlybun run db:startstill works independently🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
setupnpm script to automate development environment initialization, including tooling validation, dependency installation, and database preparation.dev:fullnpm script to start the complete development environment with database and development server.