Making a case against moving to a monorepo using NX—especially when colleagues are advocating for it based on improved cross-discipline collaboration (e.g., frontend and backend working in the same repo)—requires a thoughtful, fact-based approach. As a .NET backend developer, your concerns likely include maintainability, build performance, deployment complexity, access control, and team autonomy. Here's how you can structure your argument:
🧭 1. Clarify Goals First: Are They Solving the Right Problem?
Before changing the entire repo structure, ask:
- What specific pain points are we trying to solve?
- Is repo separation truly the bottleneck?
- Would a better CI/CD pipeline, documentation, or internal tooling address the actual friction?
Often, collaboration issues can be improved without merging repos.
🗣️ "Before committing to a monorepo, let's understand what problems we're actually solving. Will a monorepo fundamentally resolve our current collaboration or productivity issues—or are we optimizing prematurely?"
⚙️ 2. Increased Complexity in Build and CI/CD Pipelines
Monorepos can significantly complicate:
- Build times: NX caching helps, but incremental builds across multiple unrelated projects in one repo can still degrade performance.
- Target confusion: One repo = many targets. You now have to configure and maintain complex build pipelines that must detect changes and only rebuild affected apps/libraries.
- Deployment granularity: In a microservices or modular backend world, you often want independent deployments. A monorepo can make this harder unless you invest heavily in build graph analysis and selective deploys.
🗣️ "Our backend services are deployed independently. A monorepo would force us to build and test everything—even unrelated services—on every commit, unless we build complex filtering logic. That undermines one of our key DevOps advantages."
🔐 3. Access Control and Security Concerns
With separate repos:
- You can enforce team-level access controls (e.g., frontend devs shouldn't see backend secrets or proprietary integrations).
- Monorepos make this much harder. GitHub/GitLab permissions apply to the whole repo—not folders.
🗣️ "Security boundaries become blurry in a monorepo. If frontend engineers have access to the whole repository, they might inadvertently—or intentionally—depend on internal backend logic or credentials."
📦 4. Versioning and Dependency Management Challenges
In a monorepo:
- All packages/libraries typically share the same version lifecycle.
- This can create coupling between unrelated components, forcing unnecessary coordinated releases.
🗣️ "We frequently update backend libraries independently of frontend ones. A monorepo assumes tight coupling across all codebases—which isn’t true for us. We’d lose the ability to version and release services independently."
🤝 5. Tooling Fit and Learning Curve
While NX offers great benefits for frontend monorepos (especially with Angular), its value for .NET is less proven:
- NX’s support for C#/.NET is not as mature or widely adopted.
- Backend devs may be forced to learn a new ecosystem with unclear ROI.
- Team members proficient in .NET CLI, MSBuild, and Paket/NuGet workflows could face steep learning curves.
🗣️ "Adopting NX means investing in tooling that doesn’t align naturally with .NET workflows. We’d be forcing backend devs into a frontend-centric ecosystem, slowing everyone down instead of helping."
🔄 6. Migration Cost and Technical Debt Risk
Migrating multiple projects to a monorepo is:
- Expensive in terms of time and effort.
- Likely to introduce bugs or regressions during migration.
- A barrier to onboarding new developers unfamiliar with the new layout.
🗣️ "The migration cost from multiple repos to a monorepo is non-trivial. We risk introducing instability during the transition—and for what gain? Our current structure scales well for isolated development."
✅ 7. Alternative Solutions That Don’t Require a Monorepo
Propose pragmatic middle-ground solutions:
- Use NuGet to share common libraries between frontend and backend (e.g., contracts, DTOs).
- Improve documentation and tooling to help frontend devs understand backend APIs.
- Set up shared design systems or API specs (e.g., OpenAPI) in standalone repos or portals.
- Introduce cross-functional pods or feature teams without changing repo structure.
🗣️ "Instead of merging everything into one repo, why not empower frontend devs to consume our APIs more effectively through better tooling and documentation? That achieves collaboration without the downside of a monorepo."
🧩 Summary Talking Points
| Concern | Why It Matters |
|---|
| Build & CI complexity | Slower feedback loops, harder maintenance |
| Access control | Harder to enforce security boundaries |
| Versioning & releases | Forces coupled releases; limits flexibility |
| Tooling mismatch | NX isn’t optimized for .NET backend work |
| Migration cost | Risky, costly, and offers unclear gains |
| Alternatives exist | Cross-team tooling and documentation can bridge gaps |
🗨️ Final Thought
"Monorepos work well for companies like Google or Facebook with thousands of engineers working on tightly coupled codebases. But we’re not operating at that scale, and our backend services thrive with independent ownership and deployment models. Let’s not fix what isn’t broken—and risk breaking what works well today."
Frame the discussion around trade-offs, not absolutes. Be open to experimentation—but advocate for caution and evidence-based decision-making.