dev3 ·
My co-founder and I have a Next.js web app, a small API and a shared types package, each in its own repo. Keeping versions in sync is annoying. Would a monorepo help, or is it overkill at our size?
0
DEV3 Developer Forum
Every post is reviewed first. Usually reviewed within 24 hours.
My co-founder and I have a Next.js web app, a small API and a shared types package, each in its own repo. Keeping versions in sync is annoying. Would a monorepo help, or is it overkill at our size?
Short answer: usually yes for a small team that shares code, as long as you keep the tooling light. The pain you describe (versions drifting between repos) is exactly what a monorepo removes.
repo/
apps/web
apps/api
packages/types
package.json # "workspaces": ["apps/*", "packages/*"]
Start with plain workspaces. Add a build-caching tool only when CI time hurts.
utils package that everything depends on.If the repos truly share nothing, splitting them is fine. If they share types or logic, merge them.