Skip to content

build: migrate client and backend to pnpm workspace - #1214

Merged
goldflag merged 1 commit into
masterfrom
codex/pnpm-workspace
Sep 22, 2026
Merged

goldflag merged 1 commit into
masterfrom
codex/pnpm-workspace

Conversation

@goldflag

@goldflag goldflag commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Client, backend, and shared code currently use separate npm installs and lockfiles. This moves them into one pnpm workspace with shared dependency resolution and root commands for development, builds, tests, and typechecking.

The docs app and React Native SDK remain independent. Docs only gains explicit Next.js roots so the new parent workspace does not change its build boundaries.

Changes

  • Pin pnpm 10.33.0, add a root lockfile, use workspace:* for shared code, and replace the three npm lockfiles. Preserve existing resolved package versions and declare dependencies previously accessed through npm hoisting.
  • Update CI, translation extraction, Dependabot, and contributor instructions for the workspace. Root tests run packages sequentially with four workers to bound memory usage.
  • Build Docker images from the root workspace using cached frozen installs. Keep Next.js standalone assets at the correct paths and deploy a portable backend production dependency tree.
  • Include Drizzle Kit and pino-pretty in backend runtime dependencies, preserve the image's existing NODE_ENV default, and exclude local environment files from Docker contexts. Docker builds require BuildKit.

Validation

  • Clean/frozen pnpm install; every resolved package version exists in the previous npm lockfiles.
  • App builds and typechecks passed.
  • Client: 523 tests passed. Backend: 2,128 passed, 16 skipped.
  • Client translation extraction and independent docs production build passed.
  • Client and backend Docker builds and smoke checks passed, including client login/static assets, backend logging across unset/development/production/test environments, email rendering, Chromium PDF generation, and native zstd compression.
  • Normal npm commands still work in docs and React Native with Corepack enabled.

Client lint still fails because of the pre-existing commented-out ESLint configuration. Database migrations were not run during validation.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive local-development guidance for the client, server, shared workspace, required tooling, environment setup, and common commands.
    • Updated project and package documentation to reflect the streamlined workspace setup and development workflow.
  • Maintenance

    • Improved automated build, test, translation, and deployment workflows for more consistent project validation.
    • Updated container builds to support the unified workspace configuration.
    • Added safeguards to prevent environment files from being included in container images.

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rybbit Error Error Sep 22, 2026 12:42am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4d0af51f-09d5-471e-9c21-6bdb8e5a75c9

📥 Commits

Reviewing files that changed from the base of the PR and between 8e627f1 and d49f8e6.

⛔ Files ignored due to path filters (4)
  • client/package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • server/package-lock.json is excluded by !**/package-lock.json
  • shared/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (26)
  • .dockerignore
  • .github/dependabot.yml
  • .github/workflows/test.yml
  • .github/workflows/translate.yml
  • .nvmrc
  • CLAUDE.md
  • CONTRIBUTE.md
  • README.md
  • client/.npmrc
  • client/AGENTS.md
  • client/CLAUDE.md
  • client/Dockerfile
  • client/README.md
  • client/next.config.ts
  • client/package.json
  • docs/next.config.mjs
  • package.json
  • pnpm-workspace.yaml
  • server/.npmrc
  • server/AGENTS.md
  • server/Dockerfile
  • server/README.md
  • server/docker-entrypoint.sh
  • server/package.json
  • server/public/script-full.js
  • shared/package.json
💤 Files with no reviewable changes (2)
  • server/.npmrc
  • client/.npmrc

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The repository now uses a root pnpm workspace for client, server, and shared packages. CI workflows, development guidance, package manifests, and Dockerfiles use pnpm. Node.js 24 configuration and workspace-aware client and server container builds were added.

Changes

pnpm workspace migration

Layer / File(s) Summary
Workspace and package contracts
package.json, pnpm-workspace.yaml, client/package.json, server/package.json, shared/package.json, client/next.config.ts, docs/next.config.mjs, .nvmrc, .npmrc files
The repository defines a pnpm workspace with shared dependency overrides and build permissions. Package manifests use workspace dependencies, updated scripts, and adjusted runtime dependencies.
Automation and development guidance
.github/workflows/*, .github/dependabot.yml, CONTRIBUTE.md, README.md, CLAUDE.md, client/README.md, server/README.md, client/AGENTS.md, server/AGENTS.md
CI, Dependabot, documentation, and agent guidance use pnpm commands, filtered installs, the root lockfile, and Node.js 24.
Client container build
.dockerignore, client/Dockerfile
The client image uses a pnpm workspace build and Next.js standalone output. Docker contexts exclude .env files.
Server container packaging and startup
server/Dockerfile, server/docker-entrypoint.sh, server/public/script-full.js
The server image uses pnpm deploy --legacy --prod, copies the deployed tree into the runtime image, and invokes Drizzle Kit directly for migrations.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~30 minutes

Change: Other

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: migrating the client and backend to a pnpm workspace.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@goldflag
goldflag merged commit 8ea0b21 into master Sep 22, 2026
10 of 11 checks passed

This branch had an error being deployed

1 failed deployment
Preview d49f8e61 Deployed Sep 22, 2026 by vercel[bot]
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