Monorepo Infrastructure
This article describes the migration from a single Next.js app to a pnpm workspace monorepo.
Why separate apps?
- Frontend stays a static export deployable to GitHub Pages.
- Backend runs independently on Node.js + json-server for fast mocking.
- Each app owns its Dockerfile, dependencies and AGENTS.md.
What changed
apps/frontendholds the Next.js app withoutput: "export".apps/backendexposesdata/db.jsonvia json-server on port 4000.- Root
pnpm-workspace.yamldefinespackages: ["apps/*"].
API base for the next stage:
/api/v1— routes are designed by a dedicated agent.





