Kent C. Dodds shares his experience migrating kentcdodds.com from an informal multi-package repo to a proper npm workspaces monorepo with Nx. The repo already had multiple deployable services (a React Router site, OAuth worker, audio worker, and Docker container), but each had its own lockfile and no shared workspace structure. The migration moved all services under services/*, consolidated lockfiles, and added minimal Nx config for caching. Three notable breakages emerged: Node rejecting package import aliases that pointed outside the new package boundary, production going down because hardcoded GitHub API content paths didn't reflect the new directory structure, and Docker stages missing Prisma schema files. CI was also restructured to install only per-service dependencies. The key takeaway: structural refactors expose hidden assumptions, and AI coding agents should be made to prove correctness rather than just claim confidence.
Table of contents
What we changedHow Nx fits inWhat the services/* constraint exposedCI got restructured around the actual workloadWhat I'd take away from thisSort: