Skip to content

feat: add one-command dev setup scripts#10

Merged
nathanialhenniges merged 1 commit intomainfrom
claude/eager-khayyam-97609b
Apr 17, 2026
Merged

feat: add one-command dev setup scripts#10
nathanialhenniges merged 1 commit intomainfrom
claude/eager-khayyam-97609b

Conversation

@nathanialhenniges
Copy link
Copy Markdown
Member

@nathanialhenniges nathanialhenniges commented Apr 17, 2026

Summary

  • Add bun run dev:full — starts DB, waits for PostgreSQL to be ready, pushes schema, then starts the dev server in one command
  • Add bun run setup — first-time onboarding script that checks for bun/docker, copies .env.example.env, installs deps, starts DB, and pushes schema
  • Add scripts/dev.sh and scripts/setup.sh (both executable)

Why

Developers had to manually run bun db:start then bun dev in the right order, with no guard against the app starting before PostgreSQL was ready. New devs also had to manually wire up .env and run db:push before anything worked.

Reviewer Notes

  • bun run dev / bun run db:start are unchanged — no regressions
  • The DB wait loop polls pg_isready up to 30 seconds then exits with an error if Docker isn't up
  • db:push is idempotent so running it on every dev:full is safe
  • .env is not committed — the setup script copies from .env.example

Test plan

  • bun run setup on a fresh clone creates .env, installs deps, starts DB, pushes schema
  • bun run dev:full starts DB, waits until ready, syncs schema, boots web + docs
  • bun run dev still works independently
  • bun run db:start still works independently

🤖 Generated with Claude Code

Summary by CodeRabbit

Chores

  • Added setup npm script to automate development environment initialization, including tooling validation, dependency installation, and database preparation.
  • Added dev:full npm script to start the complete development environment with database and development server.

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

Two npm scripts and two bash scripts were added. The setup script bootstraps development by validating tools, configuring environment, installing dependencies, and initializing the database. The dev:full script starts the database and development server.

Changes

Cohort / File(s) Summary
Script Infrastructure
package.json, scripts/dev.sh, scripts/setup.sh
Added npm scripts and bash orchestration for development setup. dev.sh starts the database, applies migrations, and runs the dev server. setup.sh validates prerequisites, configures .env, installs dependencies, initializes the database, and prints next steps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Two scripts hop in, setup and dev,
Docker and database now all in the web,
PostgreSQL ready, the schema's applied,
Development's smooth—time to code with pride! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: adding two new npm scripts (dev:full and setup) that enable one-command development setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/eager-khayyam-97609b

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nathanialhenniges nathanialhenniges merged commit 08f705b into main Apr 17, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant