Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.deploy.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
APP_URL=https://your-app.workers.dev
# Optional. Used for the standalone Twitch panel extension build.
VITE_TWITCH_EXTENSION_API_BASE_URL=
SENTRY_ENVIRONMENT=production
# Set this as a Cloudflare secret on both workers instead of committing it here.
Expand All @@ -19,4 +20,4 @@ TWITCH_EXTENSION_SECRET=
SESSION_SECRET=
ADMIN_TWITCH_USER_IDS=
TWITCH_BOT_USERNAME=requestbot
TWITCH_SCOPES=openid user:read:moderated_channels moderator:read:chatters channel:bot
TWITCH_SCOPES=openid user:read:moderated_channels moderator:read:chatters channel:bot channel:read:subscriptions bits:read channel:manage:redemptions
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: Lint
run: npm run lint

- name: i18n coverage
run: npm run check:i18n

- name: Typecheck
run: npm run typecheck

Expand All @@ -40,3 +43,8 @@ jobs:

- name: Build
run: npm run build

- name: Build panel artifact
env:
APP_URL: https://requestbot.radg.tv
run: npm run build:extension:panel
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ node_modules
.husky/_
.tanstack
.wrangler
dist
coverage
playwright-report
test-results
dist
output
coverage
playwright-report
test-results
routeTree.gen.ts
.env
.env.deploy
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.4.0] - 2026-04-12

### Added
- Random favorite requests on the web and Twitch panel, plus lyrics metadata and richer public played-history coverage. (#79, #80, #81, #82)
- German locale support and a full translation sweep across the web app, Twitch panel, and bot replies. (#82)

### Changed
- Channel settings now use a sidebar-tab layout with a shared save flow, clearer moderation sections, integrated overlay editing, and more consistent field grouping. (#70, #82)
- VIP token pricing now uses one additive model across chat, web, and panel for duration rules, request modifiers, manager adds, and refunds. (#82)
- Channel search now uses versioned shared caching, normalized tuning IDs, and aligned tuning filters across settings, search, and displayed results. (#66, #78, #82)
- Public and admin playlist views now show richer song metadata, smoother pagination, stronger VIP styling, sorted public rules lists, and clearer version-level blacklist handling. (#73, #78, #82)

### Fixed
- Twitch auth and token handling now follow the latest security remediation pass. (#71)
- Viewer and moderator request surfaces now show correct VIP-token costs and insufficient-balance states before submit. (#67, #82)
- Documentation now reflects the current app flow, current deploy workflow, and the active docs set instead of older feature plans. (#82)

## [0.3.1] - 2026-04-01

### Added
Expand Down
189 changes: 93 additions & 96 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,95 @@
# Contributing

## Workflow

1. Create a branch from `main`.
2. Install dependencies and bootstrap the local database:

```bash
npm install
npm run db:bootstrap:local
```

3. Make changes locally.
4. Commit normally. Husky runs the routine local checks for you:

- on commit: block commits on `main` with a friendly branch-switch reminder
- on commit: staged-file Biome fixes/checks
- on push: generated-file verification, typecheck, and tests

5. If you want to run the same push-time validation manually before pushing, use:

```bash
npm run check:prepush
```

6. Only run extra checks when the change needs them:

- run `npm run build` if the change affects deployment/build behavior or you want an extra production sanity check
- run `npm run test:e2e` if you changed user-facing flows or browser interactions
- run `npm run lint` manually if you want the compact full-repo Biome pass outside the staged-file hook
- run `npm run lint:full` if you want Biome's detailed inline diagnostics and formatter diffs

7. Open a pull request.
8. Wait for CI to pass.
9. Review the preview deployment if one is enabled for the repository.
10. Merge to `main`.

Merges to `main` are intended to trigger a production deploy.

## Day-to-day local checks

Most contributors should not need to run `format`, `lint`, `test`, and `typecheck` manually before every commit.

Use this default path instead:

```bash
git add <files>
git commit
git push
```

If a hook fails:

- fix the reported issue and retry
- or run `npm run check:prepush` yourself 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

## Releases

- Keep [CHANGELOG.md](CHANGELOG.md) and [package.json](package.json) in sync when preparing a release PR.
- Use `0.x.x` for 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.

## Local development

Start here:

# Contributing

## Workflow

1. Branch from `main`.
2. Install dependencies and bootstrap local data:

```bash
npm install
npm run db:bootstrap:local
```

3. Make the change.
4. Commit and push normally:

```bash
git add <files>
git commit
git push
```

The repo hooks handle the default checks:

- `pre-commit`: blocks commits on `main` and runs staged-file Biome fixes/checks
- `pre-push`: runs generated-file checks, typecheck, and tests

If you want the push-time gate before pushing, run:

```bash
npm run check:prepush
```

Run extra checks only when the change needs them:

- `npm run build` for deployment-sensitive changes
- `npm run test:e2e` for browser flows
- `npm run lint` or `npm run lint:full` for a full-repo Biome pass
- `npm run check:ship` for the full pre-PR ship flow
- `npm run build:extension:package` when the change affects the standalone Twitch panel artifact

## Codex Ship Flow

Use this trigger when you want Codex to run the full branch shipping workflow:

```text
Use $request-bot-ship to ship this branch.
```

That flow runs the repo ship checks, packages the Twitch panel artifact when the changed files affect it, stages and commits the branch, pushes it, opens the PR, waits for checks, and merges only after checks pass.

## Commit Messages

Use this format:

- imperative present tense
- one short subject line
- no trailing period
- summarize the primary outcome

Examples:

- `Refine ship workflow and docs`
- `Add panel packaging and release checks`

## Pull Requests

- Keep the scope focused.
- Add or update tests when behavior changes.
- Update docs in the same PR when the workflow, setup, deploy path, or product behavior changes.
- Call out migrations, Twitch auth changes, EventSub changes, queue mutations, or Cloudflare binding changes in the PR description.

## Database Changes

- Update [schema.ts](src/lib/db/schema.ts)
- Add the matching SQL migration under [drizzle](drizzle)
- Run:

```bash
npm run db:migrate
```

Do not leave code that expects a schema change without a checked-in migration.

## Releases

- Keep [CHANGELOG.md](CHANGELOG.md) and [package.json](package.json) aligned when preparing a release.
- Use `0.x.x` while the app is still pre-`1.0`.
- Use a patch release for routine shipped work.
- Use a minor release when the shipped product scope expands materially.

## Start Here

- [README.md](README.md)
- [docs/local-development.md](docs/local-development.md)

## Database changes

- Put schema changes in [src/lib/db/schema.ts](src/lib/db/schema.ts)
- Generate or add the matching SQL migration in [drizzle](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.

## Pull request expectations

- 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:prepush` manually 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.

## Before enabling open contributions

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`
- [docs/deployment-workflow.md](docs/deployment-workflow.md)
Loading
Loading