- Create a branch from
main. - Install dependencies and bootstrap the local database:
npm install
npm run db:bootstrap:local- Make changes locally.
- Commit normally. Husky runs the routine local checks for you:
- on commit: block commits on
mainwith a friendly branch-switch reminder - on commit: staged-file Biome fixes/checks
- on push: generated-file verification, typecheck, and tests
- If you want to run the same push-time validation manually before pushing, use:
npm run check:prepush- Only run extra checks when the change needs them:
- run
npm run buildif the change affects deployment/build behavior or you want an extra production sanity check - run
npm run test:e2eif you changed user-facing flows or browser interactions - run
npm run lintmanually if you want the compact full-repo Biome pass outside the staged-file hook - run
npm run lint:fullif you want Biome's detailed inline diagnostics and formatter diffs
- Open a pull request.
- Wait for CI to pass.
- Review the preview deployment if one is enabled for the repository.
- Merge to
main.
Merges to main are intended to trigger a production deploy.
Most contributors should not need to run format, lint, test, and typecheck manually before every commit.
Use this default path instead:
git add <files>
git commit
git pushIf a hook fails:
- fix the reported issue and retry
- or run
npm run check:prepushyourself to reproduce the push-time gate before pushing again - if the branch guard blocks a commit on
main, switch to a feature branch before committing
- Keep CHANGELOG.md and package.json in sync when preparing a release PR.
- Use
0.x.xfor normal minor/patch releases while the project is still pre-1.0. - If the release is a major milestone or materially changes the product scope, bump the middle digit such as
0.2.0. - Otherwise, use a patch release such as
0.1.1. - Ask explicitly which release level is intended if it is not obvious from the scope of the work.
Start here:
- Put schema changes in src/lib/db/schema.ts
- Generate or add the matching SQL migration in drizzle
- Run
npm run db:migrate - Do not leave the code expecting a schema change that is not represented by a migration
The app checks the latest applied migration at runtime and fails early if the local database is behind.
- Keep changes focused.
- Include tests when you change behavior.
- Do not rely on CI as your first feedback loop. Use the commit/push hooks, or run
npm run check:prepushmanually before opening the PR. - If a change affects Twitch auth, EventSub, playlist mutations, or migrations, call that out in the PR description.
- If a change affects deployment or Cloudflare bindings, update the docs in the same PR.
Recommended repository settings:
- protect
main - require pull requests for merge
- require the CI workflow to pass
- require at least one review before merge
- restrict direct pushes to
main