Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.

Why Nx?

At Nrwl we help the Fortune 500 build Angular applications.

These companies don’t build small apps. They have multiple teams building multiple apps using multiple shared libs. It’s many to many to many. Organizing this dev workflow is challenging.

They have multiple teams building multiple apps using multiple shared libs. It’s many to many to many. Organizing this dev workflow is challenging. They care about consistency. If every team uses their own unique way of building software, the code is harder to reuse and integrate.

If every team uses their own unique way of building software, the code is harder to reuse and integrate. They have legacy AngularJS apps they need to upgrade. NgUpgrade is great, but it is easy to misconfigure.

NgUpgrade is great, but it is easy to misconfigure. They want to write robust, proven code: error handling, race conditions, etc.

To address these we developed a set recommendations for our clients. Some of them are based on our experience on the Angular team at Google, others are based on our experience in the industry in general. After implementing them over and over again, we saw that many can be automated, and that’s what Nx is.

Nx is a set of Angular CLI generators, linters, and runtime libraries eliminating a lot of the speed bumps teams face when building ambitious Angular applications.

Design Principles

At Nrwl we strongly believe that any software has to adhere to a small core of values and design principles. These are the values and the design principles of Nx.

Values

Productivity Nx should help you develop new features and refactor with ease, even when the code base grows in size.

Nx should help you develop new features and refactor with ease, even when the code base grows in size. Consistency : Nx should help you separate what is unique to your application from what is not, and only spend time on the former. The Angular CLI has great starting conventions, which we take further by focusing only on one subset of Angular apps: complex enterprise applications.

: Nx should help you separate what is unique to your application from what is not, and only spend time on the former. The Angular CLI has great starting conventions, which we take further by focusing only on one subset of Angular apps: complex enterprise applications. Safety: Nx should help you avoid costly mistakes.

Our Design Principle

Your tech stack is already complex (rxjs, angular, typescript, webpack, …). There is a lot to master. We don’t want to make it even more complex — we want to provide a lot of value with as few lines of code as possible.

For instance, every single application we look at has a lot of race conditions. After helping client after client to fix them, we asked ourselves: “Can we build a small tool to get rid of them?”. We built a 50-line service that integrates with NgRx effects and gets rid of a lot of race conditions seen in a typical web application. It’s so small that you can read through it and understand what it does in minutes.

This is the design principle of Nx: everything should be dead simple to understand.