Nx Cookbook
Introduction
At Marmicode, we like to define Nx as a Progressive Build Companion. In fact, Nx is an extensible open-source build system that not only helps you create, organize, and maintain apps using modern JS tools (e.g. Angular, React, Nest.js, NextJS, Storybook, Playwright, Vitest, ...) and other tecnologies (e.g. Java & Rust), but it also provides a set of powerful features to handle and optimize monorepos and CI workflows.
Why this Cookbook?
When it comes to organizing a code workspace, lots of questions arise:
- Should you use Nx?
- Should you use a single repository (monorepo) or multiple repositories (polyrepo)?
- Should you split your code into apps and libraries?
- If so, how should you organize them?
- And how fine-grained the libraries should be?
We've asked ourselves these questions many times, and we've met many teams struggling with them too. We tried different approaches which made us realize that there are many options and no one-size-fits-all solution.
That is why we decided to write this Cookbook: to help you make the right choice based on your context because the best solution is the one that adapts to your needs.
Our Goals
Provide comprehensive guidance and recipes which:
- 🧭 are context-specific (from small to enterprise scale),
- 🎯 let you focus on business and features instead of tooling,
- 💎 enhance code maintainability with clear separation of concerns,
- ⚡️ speed up your development workflow,
- 🛠️ help you migrate progressively (100% big-bang-free 😉),
- 🤝 improve collaboration & collective ownership.
Learn More
📄️ Why Nx?
Nx is your Progressive Build Companion.
📄️ Monorepo vs. Polyrepo
A common misconception about Nx is that it will force us to regroup everything into a single monorepo.