@next-friday/create-app 2.1.1 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,9 +30,9 @@ Every stack is built from [`templates/base`](templates/base), which holds the sh
30
30
 
31
31
  - **Code quality:** TypeScript, ESLint and Prettier with the Next Friday configs, Vitest with coverage, fast-check, Knip, dependency-cruiser, editorconfig-checker, and sort-package-json.
32
32
  - **Git hooks:** Husky runs gitleaks and lint-staged before each commit, commitlint on each message, and `pnpm check` before each push. Commits and pushes to `main` are blocked after the first one.
33
- - **CI:** GitHub Actions run the static checks, tests with patch coverage, the build, end-to-end tests for Next.js and Payload, a container build and vulnerability scan, Semgrep, OSV-Scanner, gitleaks, TruffleHog, zizmor, and pull request title validation. Dependabot keeps dependencies current.
33
+ - **CI:** GitHub Actions run the static checks, tests with patch coverage, the build, end-to-end tests for Next.js and Payload, a container build and vulnerability scan, Semgrep, OSV-Scanner, CodeQL, dependency review, OpenSSF Scorecard, gitleaks, TruffleHog, zizmor, and pull request title validation. Dependabot keeps dependencies current.
34
34
  - **Deployment:** a `Dockerfile` that runs as the `node` user, and a Railway workflow that promotes one commit through `dev`, `uat`, and `prod`.
35
- - **Agent rules:** shared rules in `.agents/rules`, with hooks that enforce them in Claude Code and Cursor, and a Cursor Bugbot configuration.
35
+ - **Agent rules:** `CLAUDE.md` imports `AGENTS.md`. Shared rules live in `.agents/rules`, with hooks that enforce them in Claude Code and Cursor, and a Cursor Bugbot configuration.
36
36
 
37
37
  ## Requirements
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-friday/create-app",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Create a Next Friday project from a template.",
5
5
  "keywords": [
6
6
  "create",
@@ -48,7 +48,7 @@
48
48
  "jiti": "2.7.0",
49
49
  "knip": "6.43.0",
50
50
  "lint-staged": "17.6.0",
51
- "pkg-pr-new": "0.0.91",
51
+ "pkg-pr-new": "0.0.92",
52
52
  "prettier": "3.9.10",
53
53
  "publint": "0.3.25",
54
54
  "sort-package-json": "4.1.0",
@@ -7,6 +7,7 @@ heavy:
7
7
  - "!.github/pull_request_template.md"
8
8
  - "!.github/dependabot.yml"
9
9
  - "!AGENTS.md"
10
+ - "!CLAUDE.md"
10
11
 
11
12
  ci_policy:
12
13
  - ".github/file-filters.yml"
@@ -18,8 +18,8 @@ ci:
18
18
  dependencies:
19
19
  - changed-files:
20
20
  - any-glob-to-any-file:
21
- - "package.json"
22
- - "pnpm-lock.yaml"
21
+ - "**/package.json"
22
+ - "**/pnpm-lock.yaml"
23
23
  - "pnpm-workspace.yaml"
24
- - "Dockerfile"
24
+ - "**/Dockerfile"
25
25
  - ".github/requirements/**"
@@ -0,0 +1,47 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - main
8
+ schedule:
9
+ - cron: "18 4 * * 1"
10
+
11
+ permissions: {} # No token beyond the job grants below.
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ analyze:
19
+ name: Analyze (${{ matrix.language }})
20
+ if: github.event.repository.visibility == 'public' || vars.CODE_SCANNING == 'true'
21
+ runs-on: ubuntu-latest
22
+ timeout-minutes: 30
23
+ permissions:
24
+ actions: read # Needed to fetch CodeQL packs used by this workflow.
25
+ contents: read # Needed to check out the repository.
26
+ packages: read # Needed to fetch internal or private CodeQL packs.
27
+ security-events: write # Needed to upload SARIF results to GitHub code scanning.
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ language:
32
+ - actions
33
+ - javascript-typescript
34
+ steps:
35
+ - name: Checkout repository
36
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
37
+ with:
38
+ persist-credentials: false
39
+ - name: Initialize CodeQL
40
+ uses: github/codeql-action/init@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
41
+ with:
42
+ languages: ${{ matrix.language }}
43
+ build-mode: none
44
+ - name: Perform CodeQL analysis
45
+ uses: github/codeql-action/analyze@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
46
+ with:
47
+ category: "/language:${{ matrix.language }}"
@@ -0,0 +1,25 @@
1
+ name: Dependency Review
2
+
3
+ on:
4
+ pull_request: {}
5
+
6
+ permissions: {} # No token beyond the job grants below.
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ dependency-review:
14
+ name: Dependency Review
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 10
17
+ permissions:
18
+ contents: read # Needed to check out the repository.
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
22
+ with:
23
+ persist-credentials: false
24
+ - name: Review dependency changes
25
+ uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
@@ -0,0 +1,42 @@
1
+ name: Scorecard
2
+
3
+ on:
4
+ branch_protection_rule: {}
5
+ push:
6
+ branches:
7
+ - main
8
+ schedule:
9
+ - cron: "27 4 * * 1"
10
+
11
+ permissions: {} # No token beyond the job grants below.
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.run_id }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ analysis:
19
+ name: Scorecard analysis
20
+ if: (github.event.repository.visibility == 'public' || vars.CODE_SCANNING == 'true') && (github.event.repository.default_branch == github.ref_name || github.event_name == 'branch_protection_rule')
21
+ runs-on: ubuntu-latest
22
+ timeout-minutes: 15
23
+ permissions:
24
+ actions: read # Needed to inspect workflow history for Scorecard checks.
25
+ contents: read # Needed to check out the repository.
26
+ id-token: write # Needed to publish Scorecard results with OIDC.
27
+ security-events: write # Needed to upload SARIF results to GitHub code scanning.
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
31
+ with:
32
+ persist-credentials: false
33
+ - name: Run analysis
34
+ uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
35
+ with:
36
+ results_file: results.sarif
37
+ results_format: sarif
38
+ publish_results: true
39
+ - name: Upload to code scanning
40
+ uses: github/codeql-action/upload-sarif@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
41
+ with:
42
+ sarif_file: results.sarif
@@ -31,7 +31,7 @@ jobs:
31
31
  fetch-depth: 0
32
32
  persist-credentials: false
33
33
  - name: Scan commits for secrets
34
- uses: trufflesecurity/trufflehog@e76dff8a7e57d6df0c60ad8cbf5d5cba505a8fc9 # v3.99.2
34
+ uses: trufflesecurity/trufflehog@31ce31ee1abbcc7dc8eee5764c17121c3044c8b2 # v3.99.7
35
35
  with:
36
36
  extra_args: --results=verified,unknown
37
37
  - name: Install verified gitleaks
@@ -11,7 +11,7 @@ on:
11
11
  paths:
12
12
  - ".github/**"
13
13
 
14
- permissions: {}
14
+ permissions: {} # No token beyond the job grants below.
15
15
 
16
16
  concurrency:
17
17
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -23,17 +23,16 @@ jobs:
23
23
  runs-on: ubuntu-latest
24
24
  timeout-minutes: 10
25
25
  permissions:
26
- contents: read
26
+ contents: read # Needed to check out the repository.
27
27
  steps:
28
28
  - name: Checkout repository
29
29
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
30
30
  with:
31
31
  persist-credentials: false
32
32
  - name: Analyze GitHub Actions security
33
- uses: zizmorcore/zizmor-action@85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e # v0.7.1
33
+ uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
34
34
  with:
35
35
  inputs: .github
36
- version: 1.30.1
37
36
  persona: pedantic
38
37
  advanced-security: false
39
38
 
@@ -42,7 +41,7 @@ jobs:
42
41
  runs-on: ubuntu-latest
43
42
  timeout-minutes: 10
44
43
  permissions:
45
- contents: read
44
+ contents: read # Needed to check out the repository.
46
45
  env:
47
46
  ACTIONLINT_VERSION: 1.7.12
48
47
  ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -7,7 +7,7 @@ Use this guide to prepare changes to this repository.
7
7
  - Use the Node.js version declared by `.nvmrc` and `package.json#engines`.
8
8
  - Change the Node.js version in `.nvmrc` and the `Dockerfile` together. Dependabot updates only the `Dockerfile`.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
- - Use Claude Code v2.1.295 or later. It reads `AGENTS.md` directly and supports the `onFailure` field the agent hooks use.
10
+ - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
11
  - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
@@ -28,14 +28,14 @@ pnpm install
28
28
 
29
29
  Run the narrowest check that covers the change while you work. Git hooks run these checks:
30
30
 
31
- | Hook | Checks |
32
- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
- | `commit-msg` | commitlint |
35
- | `pre-merge-commit` | blocks merge commits on `main` |
36
- | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks and the unit tests related to your changes |
31
+ | Hook | Checks |
32
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
+ | `commit-msg` | commitlint |
35
+ | `pre-merge-commit` | blocks merge commits on `main` |
36
+ | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
37
37
 
38
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, and OSV scans. Dependabot and OSV-Scanner report vulnerable dependencies.
38
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
39
39
  - **End-to-end tests:** run `pnpm test:e2e` when you change endpoints. CI runs it on every pull request that is ready for review and changes code.
40
40
  - **Coverage:** CI requires 95% line coverage on changed lines in `src/`, except `main.ts` and `*.module.ts`, which hold only wiring. Keep logic out of them, as `src/port.ts` does for `main.ts`. CI does not gate branch coverage, because NestJS decorators emit metadata branches that never run.
41
41
 
@@ -33,19 +33,19 @@ The server listens on the port set by `PORT` in `.env`, which the CLI created fr
33
33
 
34
34
  ## Scripts
35
35
 
36
- | Script | Purpose |
37
- | :----------------- | :------------------------------------------------------------------------------ |
38
- | `pnpm start` | Start once, without watch mode; loads `.env` when present |
39
- | `pnpm start:dev` | Start in watch mode; loads `.env` when present |
40
- | `pnpm start:debug` | Start in watch mode with the Node.js inspector; loads `.env` when present |
41
- | `pnpm build` | Compile to `dist/` |
42
- | `pnpm start:prod` | Run `dist/main.js`; the environment sets `PORT` |
43
- | `pnpm test` | Run unit tests (`src/**/*.test.ts`) |
44
- | `pnpm test:e2e` | Run end-to-end tests (`test/**/*.e2e.test.ts`) |
45
- | `pnpm check` | Run the static checks and the unit tests for changed code (the `pre-push` hook) |
46
- | `pnpm verify` | Run the static checks and all unit tests with coverage |
47
-
48
- CI also runs the build, the end-to-end tests, the container image scan, and the security scans.
36
+ | Script | Purpose |
37
+ | :----------------- | :----------------------------------------------------------------------------------------------------- |
38
+ | `pnpm start` | Start once, without watch mode; loads `.env` when present |
39
+ | `pnpm start:dev` | Start in watch mode; loads `.env` when present |
40
+ | `pnpm start:debug` | Start in watch mode with the Node.js inspector; loads `.env` when present |
41
+ | `pnpm build` | Compile to `dist/` |
42
+ | `pnpm start:prod` | Run `dist/main.js`; the environment sets `PORT` |
43
+ | `pnpm test` | Run unit tests (`src/**/*.test.ts`) |
44
+ | `pnpm test:e2e` | Run end-to-end tests (`test/**/*.e2e.test.ts`) |
45
+ | `pnpm check` | Run the static checks, the unit tests for changed code, and the production build (the `pre-push` hook) |
46
+ | `pnpm verify` | Run the static checks, all unit tests with coverage, and the production build |
47
+
48
+ CI also runs the build, the end-to-end tests, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
49
49
 
50
50
  ## Container
51
51
 
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "scripts": {
14
14
  "build": "tsc -p tsconfig.build.json",
15
- "check": "pnpm verify:static && pnpm test:changed",
15
+ "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
16
  "clean": "rm -rf dist coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
17
  "debug:build": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
18
18
  "debug:serve": "node --env-file-if-exists=.env --inspect --watch dist/main",
@@ -42,7 +42,7 @@
42
42
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
43
43
  "test:watch": "vitest",
44
44
  "typecheck": "tsc --noEmit -p tsconfig.json",
45
- "verify": "pnpm verify:static && pnpm test:coverage",
45
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
46
46
  "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
47
47
  },
48
48
  "dependencies": {
@@ -7,7 +7,7 @@ Use this guide to prepare changes to this repository.
7
7
  - Use the Node.js version declared by `.nvmrc` and `package.json#engines`.
8
8
  - Change the Node.js version in `.nvmrc` and the `Dockerfile` together. Dependabot updates only the `Dockerfile`.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
- - Use Claude Code v2.1.295 or later. It reads `AGENTS.md` directly and supports the `onFailure` field the agent hooks use.
10
+ - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
11
  - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
@@ -28,14 +28,14 @@ pnpm install
28
28
 
29
29
  Run the narrowest check that covers the change while you work. Git hooks run these checks:
30
30
 
31
- | Hook | Checks |
32
- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
- | `commit-msg` | commitlint |
35
- | `pre-merge-commit` | blocks merge commits on `main` |
36
- | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks and the unit tests related to your changes |
31
+ | Hook | Checks |
32
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
+ | `commit-msg` | commitlint |
35
+ | `pre-merge-commit` | blocks merge commits on `main` |
36
+ | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
37
37
 
38
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, and OSV scans. Dependabot and OSV-Scanner report vulnerable dependencies.
38
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
39
39
  - **End-to-end tests:** run `pnpm test:e2e` when you change pages. It starts the development server unless one is already running. Run `pnpm exec playwright install chromium` once before the first run. CI runs it against the production build on every pull request that is ready for review and changes code.
40
40
  - **Coverage:** CI requires 95% branch coverage on changed lines in `app/`, except `layout.tsx`.
41
41
 
@@ -38,10 +38,10 @@ pnpm dev
38
38
  | `pnpm start` | Serve the standalone production build after `pnpm build`. The build copies `.env`, so rebuild after you change it |
39
39
  | `pnpm test` | Run unit tests |
40
40
  | `pnpm test:e2e` | Run Playwright end-to-end tests (`test/**/*.e2e.test.ts`) |
41
- | `pnpm check` | Run the static checks and the unit tests for changed code (the `pre-push` hook) |
42
- | `pnpm verify` | Run the static checks and all unit tests with coverage |
41
+ | `pnpm check` | Run the static checks, the unit tests for changed code, and the production build (the `pre-push` hook) |
42
+ | `pnpm verify` | Run the static checks, all unit tests with coverage, and the production build |
43
43
 
44
- CI also runs the build, the end-to-end tests, the container image scan, and the security scans.
44
+ CI also runs the build, the end-to-end tests, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
45
45
 
46
46
  ## Container
47
47
 
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "scripts": {
14
14
  "build": "next build",
15
- "check": "pnpm verify:static && pnpm test:changed",
15
+ "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
16
  "clean": "rm -rf .next coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
17
  "depcruise": "depcruise --config .dependency-cruiser.json app test eslint.config.ts next.config.ts playwright.config.ts postcss.config.mjs vitest.config.ts",
18
18
  "dev": "next dev",
@@ -36,7 +36,7 @@
36
36
  "test:e2e": "playwright test",
37
37
  "test:watch": "vitest",
38
38
  "typecheck": "next typegen && tsc --noEmit -p tsconfig.json",
39
- "verify": "pnpm verify:static && pnpm test:coverage",
39
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
40
40
  "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
41
41
  },
42
42
  "dependencies": {
@@ -7,7 +7,7 @@ Use this guide to prepare changes to this repository.
7
7
  - Use the Node.js version declared by `.nvmrc` and `package.json#engines`.
8
8
  - Change the Node.js version in `.nvmrc` and the `Dockerfile` together. Dependabot updates only the `Dockerfile`.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
- - Use Claude Code v2.1.295 or later. It reads `AGENTS.md` directly and supports the `onFailure` field the agent hooks use.
10
+ - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
11
  - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
@@ -28,14 +28,14 @@ pnpm install
28
28
 
29
29
  Run the narrowest check that covers the change while you work. Git hooks run these checks:
30
30
 
31
- | Hook | Checks |
32
- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
- | `commit-msg` | commitlint |
35
- | `pre-merge-commit` | blocks merge commits on `main` |
36
- | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks and the unit tests related to your changes |
31
+ | Hook | Checks |
32
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
34
+ | `commit-msg` | commitlint |
35
+ | `pre-merge-commit` | blocks merge commits on `main` |
36
+ | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
37
37
 
38
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, and OSV scans. Dependabot and OSV-Scanner report vulnerable dependencies.
38
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
39
39
  - **Coverage:** CI requires 95% line coverage on changed lines in `src/`, except `main.ts`, which holds only wiring. Keep logic out of it, as `src/port.ts` and `src/server.ts` do.
40
40
 
41
41
  Run `pnpm verify` for repository changes.
@@ -33,17 +33,17 @@ The server listens on the port set by `PORT` in `.env`, which the CLI created fr
33
33
 
34
34
  ## Scripts
35
35
 
36
- | Script | Purpose |
37
- | :---------------- | :------------------------------------------------------------------------- |
38
- | `pnpm start:dev` | Start in watch mode from `src/main.ts`; loads `.env` when present |
39
- | `pnpm build` | Compile to `dist/` |
40
- | `pnpm start` | Run `dist/main.js`; loads `.env` when present |
41
- | `pnpm start:prod` | Run `dist/main.js`; the environment sets `PORT` |
42
- | `pnpm test` | Run tests (`src/**/*.test.ts`) |
43
- | `pnpm check` | Run the static checks and the tests for changed code (the `pre-push` hook) |
44
- | `pnpm verify` | Run the static checks and all tests with coverage |
45
-
46
- CI also runs the build, the container image scan, and the security scans.
36
+ | Script | Purpose |
37
+ | :---------------- | :------------------------------------------------------------------------------------------------ |
38
+ | `pnpm start:dev` | Start in watch mode from `src/main.ts`; loads `.env` when present |
39
+ | `pnpm build` | Compile to `dist/` |
40
+ | `pnpm start` | Run `dist/main.js`; loads `.env` when present |
41
+ | `pnpm start:prod` | Run `dist/main.js`; the environment sets `PORT` |
42
+ | `pnpm test` | Run tests (`src/**/*.test.ts`) |
43
+ | `pnpm check` | Run the static checks, the tests for changed code, and the production build (the `pre-push` hook) |
44
+ | `pnpm verify` | Run the static checks, all tests with coverage, and the production build |
45
+
46
+ CI also runs the build, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
47
47
 
48
48
  ## Container
49
49
 
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "scripts": {
14
14
  "build": "tsc -p tsconfig.build.json",
15
- "check": "pnpm verify:static && pnpm test:changed",
15
+ "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
16
  "clean": "rm -rf dist coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
17
  "depcruise": "depcruise --config .dependency-cruiser.json src eslint.config.ts vitest.config.ts",
18
18
  "format": "prettier --write --cache .",
@@ -36,7 +36,7 @@
36
36
  "test:coverage": "vitest run --coverage --passWithNoTests",
37
37
  "test:watch": "vitest",
38
38
  "typecheck": "tsc --noEmit -p tsconfig.json",
39
- "verify": "pnpm verify:static && pnpm test:coverage",
39
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
40
40
  "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
41
41
  },
42
42
  "devDependencies": {
@@ -7,7 +7,7 @@ Use this guide to prepare changes to this repository.
7
7
  - Use the Node.js version declared by `.nvmrc` and `package.json#engines`.
8
8
  - Change the Node.js version in `.nvmrc` and the `Dockerfile` together. Dependabot updates only the `Dockerfile`.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
- - Use Claude Code v2.1.295 or later. It reads `AGENTS.md` directly and supports the `onFailure` field the agent hooks use.
10
+ - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
11
  - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
@@ -29,14 +29,14 @@ pnpm install
29
29
 
30
30
  Run the narrowest check that covers the change while you work. Git hooks run these checks:
31
31
 
32
- | Hook | Checks |
33
- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
34
- | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
35
- | `commit-msg` | commitlint |
36
- | `pre-merge-commit` | blocks merge commits on `main` |
37
- | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks and the unit tests related to your changes |
32
+ | Hook | Checks |
33
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
35
+ | `commit-msg` | commitlint |
36
+ | `pre-merge-commit` | blocks merge commits on `main` |
37
+ | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
38
38
 
39
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, and OSV scans. Dependabot and OSV-Scanner report vulnerable dependencies.
39
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
40
40
  - **End-to-end tests:** run `pnpm test:e2e` when you change pages or the admin panel. It starts the development server unless one is already running, and needs `DATABASE_URL` and `PAYLOAD_SECRET` from `.env`. Run `pnpm exec playwright install chromium` once before the first run. CI runs it against the production build and a PostgreSQL service on every pull request that is ready for review and changes code.
41
41
  - **Coverage:** CI requires 95% branch coverage on changed lines in `src/`, except layouts, the Payload config, and generated files.
42
42
 
@@ -54,10 +54,10 @@ In development, Payload applies collection changes to the database directly. In
54
54
  | `pnpm generate:importmap` | Regenerate the admin import map after adding a custom component |
55
55
  | `pnpm migrate:create` | Create a migration from collection changes, for example `pnpm migrate:create add-posts` |
56
56
  | `pnpm migrate` | Apply pending migrations to the database in `DATABASE_URL` |
57
- | `pnpm check` | Run the static checks and the unit tests for changed code (the `pre-push` hook) |
58
- | `pnpm verify` | Run the static checks and all unit tests with coverage |
57
+ | `pnpm check` | Run the static checks, the unit tests for changed code, and the production build (the `pre-push` hook) |
58
+ | `pnpm verify` | Run the static checks, all unit tests with coverage, and the production build |
59
59
 
60
- CI also runs the build, the end-to-end tests, the container image scan, and the security scans.
60
+ CI also runs the build, the end-to-end tests, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
61
61
 
62
62
  ## Container
63
63
 
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "scripts": {
14
14
  "build": "next build",
15
- "check": "pnpm verify:static && pnpm test:changed",
15
+ "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
16
  "clean": "rm -rf .next coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
17
  "depcruise": "depcruise --config .dependency-cruiser.json src test eslint.config.ts next.config.ts playwright.config.ts vitest.config.ts",
18
18
  "dev": "next dev",
@@ -41,7 +41,7 @@
41
41
  "test:e2e": "playwright test",
42
42
  "test:watch": "vitest",
43
43
  "typecheck": "next typegen && tsc --noEmit -p tsconfig.json",
44
- "verify": "pnpm verify:static && pnpm test:coverage",
44
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
45
45
  "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
46
46
  },
47
47
  "dependencies": {
@@ -7,7 +7,7 @@ Use this guide to prepare changes to this repository.
7
7
  - Use the Node.js version declared by `.nvmrc` and `package.json#engines`.
8
8
  - Change the Node.js version in `.nvmrc` and both Dockerfiles together. Dependabot updates only the Dockerfiles.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
- - Use Claude Code v2.1.295 or later. It reads `AGENTS.md` directly and supports the `onFailure` field the agent hooks use.
10
+ - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
11
  - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
@@ -29,14 +29,14 @@ pnpm install
29
29
 
30
30
  Run the narrowest check that covers the change while you work. Git hooks run these checks:
31
31
 
32
- | Hook | Checks |
33
- | :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
34
- | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
35
- | `commit-msg` | commitlint |
36
- | `pre-merge-commit` | blocks merge commits on `main` |
37
- | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks and the unit tests related to your changes |
32
+ | Hook | Checks |
33
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | `pre-commit` | blocks commits on `main` except the first commit of a new repository, gitleaks on staged changes, `pnpm rules:check`, and lint-staged on staged files |
35
+ | `commit-msg` | commitlint |
36
+ | `pre-merge-commit` | blocks merge commits on `main` |
37
+ | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
38
38
 
39
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, and OSV scans. Dependabot and OSV-Scanner report vulnerable dependencies.
39
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
40
40
  - **End-to-end tests:** run `pnpm test:e2e` when you change pages or the admin panel. It starts both development servers unless they are already running, and the backoffice needs `DATABASE_URL` and `PAYLOAD_SECRET` from `.env`. Run `pnpm --filter ./apps/app exec playwright install chromium` once before the first run. CI runs it against the production build and a PostgreSQL service on every pull request that is ready for review and changes code.
41
41
  - **Coverage:** CI requires 95% branch coverage on changed lines in `apps/app/app/` and `apps/backoffice/src/`, except layouts, the Payload config, and generated files.
42
42
 
@@ -43,21 +43,21 @@ In development, Payload applies collection changes to the database directly. In
43
43
 
44
44
  ## Scripts
45
45
 
46
- | Script | Purpose |
47
- | :------------------------ | :----------------------------------------------------------------------------------------------- |
48
- | `pnpm dev` | Start the Next.js app on port 3000 and the Payload backoffice on port 3001 |
49
- | `pnpm build` | Build both apps for production |
50
- | `pnpm start` | Serve both standalone production builds after `pnpm build` |
51
- | `pnpm test` | Run unit tests in both apps |
52
- | `pnpm test:e2e` | Run Playwright end-to-end tests in both apps. The backoffice uses the database in `DATABASE_URL` |
53
- | `pnpm generate:types` | Regenerate `apps/backoffice/src/payload-types.ts` after a collection change |
54
- | `pnpm generate:importmap` | Regenerate the admin import map after adding a custom component |
55
- | `pnpm migrate:create` | Create a migration from collection changes, for example `pnpm migrate:create add-posts` |
56
- | `pnpm migrate` | Apply pending migrations to the database in `DATABASE_URL` |
57
- | `pnpm check` | Run the static checks and the unit tests for changed code (the `pre-push` hook) |
58
- | `pnpm verify` | Run the static checks and all unit tests with coverage |
59
-
60
- CI also runs the build, the end-to-end tests, the container image scans, and the security scans. Pull requests run Turborepo with `--affected` against the base branch, so only packages that changed are typed, tested, built, and scanned. Pushes to `main` and the weekly schedule still run every app. Patch coverage runs only for apps that produced a coverage file.
46
+ | Script | Purpose |
47
+ | :------------------------ | :----------------------------------------------------------------------------------------------------- |
48
+ | `pnpm dev` | Start the Next.js app on port 3000 and the Payload backoffice on port 3001 |
49
+ | `pnpm build` | Build both apps for production |
50
+ | `pnpm start` | Serve both standalone production builds after `pnpm build` |
51
+ | `pnpm test` | Run unit tests in both apps |
52
+ | `pnpm test:e2e` | Run Playwright end-to-end tests in both apps. The backoffice uses the database in `DATABASE_URL` |
53
+ | `pnpm generate:types` | Regenerate `apps/backoffice/src/payload-types.ts` after a collection change |
54
+ | `pnpm generate:importmap` | Regenerate the admin import map after adding a custom component |
55
+ | `pnpm migrate:create` | Create a migration from collection changes, for example `pnpm migrate:create add-posts` |
56
+ | `pnpm migrate` | Apply pending migrations to the database in `DATABASE_URL` |
57
+ | `pnpm check` | Run the static checks, the unit tests for changed code, and the production build (the `pre-push` hook) |
58
+ | `pnpm verify` | Run the static checks, all unit tests with coverage, and the production build |
59
+
60
+ CI also runs the build, the end-to-end tests, the container image scans, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`. Pull requests run Turborepo with `--affected` against the base branch, so only packages that changed are typed, tested, built, and scanned. Pushes to `main` and the weekly schedule still run every app. Patch coverage runs only for apps that produced a coverage file.
61
61
 
62
62
  To reuse task output across CI runs, create a Vercel team, add the repository variable `TURBO_TEAM`, and follow [Turborepo on GitHub Actions](https://turborepo.dev/docs/guides/ci-vendors/github-actions) to allow OIDC. The workflow exchanges GitHub OIDC for a short-lived Remote Cache token. If OIDC is unavailable, set the `TURBO_TOKEN` secret instead. Leave both unset to run without a Remote Cache.
63
63
 
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "scripts": {
14
14
  "build": "turbo run build ${TURBO_FILTER:-\"--filter=./apps/*\"}",
15
- "check": "pnpm verify:static && pnpm test:changed",
15
+ "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
16
  "clean": "rm -rf apps/app/.next apps/app/coverage apps/backoffice/.next apps/backoffice/coverage .turbo coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
17
  "depcruise": "turbo run depcruise ${TURBO_FILTER:-\"--filter=./apps/*\"}",
18
18
  "dev": "turbo run dev --filter=./apps/*",
@@ -40,7 +40,7 @@
40
40
  "test:e2e": "turbo run test:e2e ${TURBO_FILTER:-\"--filter=./apps/*\"}",
41
41
  "test:watch": "turbo run test:watch --filter=./apps/*",
42
42
  "typecheck": "tsc --noEmit -p tsconfig.json && turbo run typecheck ${TURBO_FILTER:-\"--filter=./apps/*\"}",
43
- "verify": "pnpm verify:static && pnpm test:coverage",
43
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
44
44
  "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
45
45
  },
46
46
  "devDependencies": {
@@ -1,25 +0,0 @@
1
- documentation:
2
- - changed-files:
3
- - any-glob-to-any-file:
4
- - "**/*.md"
5
-
6
- ci:
7
- - changed-files:
8
- - any-glob-to-any-file:
9
- - ".github/workflows/**"
10
- - ".github/file-filters.yml"
11
- - ".github/dependabot.yml"
12
- - ".github/labeler.yml"
13
- - ".github/zizmor.yml"
14
- - ".github/requirements/**"
15
- - ".github/CODEOWNERS"
16
- - ".husky/**"
17
-
18
- dependencies:
19
- - changed-files:
20
- - any-glob-to-any-file:
21
- - "**/package.json"
22
- - "**/pnpm-lock.yaml"
23
- - "pnpm-workspace.yaml"
24
- - "**/Dockerfile"
25
- - ".github/requirements/**"