Back to changelog
Milestone

pnpm Monorepo: Separate Node/Workers Apps and D1/R2

Shared domain packages with full page copies: Postgres/S3 on Node and D1/R2/Cloudflare Email on Workers. Environment-only configuration, initialization CLI, layered tests, and release gates.

This entry records template main 85730ea as of October 12, 2026, covering the monorepo changes after September 30 without rewriting earlier release history.

Two Apps and Shared Packages

  • apps/web targets Vercel/Docker; apps/web-cloudflare targets Cloudflare Workers.
  • Database, auth, API, billing, mail, storage, config, i18n, UI, and pure helpers move to packages/*.
  • Apps retain full pages checked by pnpm apps:parity, while drivers, env, and deployment files remain platform-specific.
  • Messages live in packages/i18n, with default.json deep-merged with mvp.json. Each app owns its content/ MDX sources.

Native Workers Resources

  • Workers moves from Hyperdrive/Postgres to D1 DB, native R2 R2_BUCKET, and Cloudflare Email Sending in production.
  • Avatar/assets use session/ownership-checked same-origin /files/avatars/*; Node retains S3 presigned uploads.
  • D1 has separate schema, migrations, and SQL hash history. Remote migration backs up/rehearses on a clone; cf:deploy gates pending migrations.
  • Current main removes the experimental EdgeOne app. An attempted deployment target is not a stable template capability.

Configuration and Setup

  • Runtime admin settings are removed; payment, Node storage, captcha, and mail credentials use environment variables.
  • muse:init prepares app env files, signing secrets, and local migrations. muse:doctor checks the toolchain; local seed provides admin/user accounts.
  • Next.js dependencies move to the 16.4 series. OpenNext 1.20.9 retains its matching patch; the lockfile determines actual installed versions.

Verification and Upgrades

  • A testing package, coverage floors, app parity, and unit/API/Playwright delivery layers are added.
  • Database history becomes a fresh-install baseline. Existing production databases require designed incremental migrations, not replaying the new baseline.
  • External Node/Workers services still require real acceptance. Current Cloudflare Playwright startup does not replace Wrangler binding verification.

See Upgrade to the Current Monorepo and Release Checklist.