Management software lives a long time: new features, new teams, new developers. An Nx monorepo keeps it tidy with one simple rule: apps are thin, logic lives in libraries.
The layout
apps/
web/ Angular: routing and composition only
api/ NestJS: bootstrap and modules only
libs/
shared/types types shared by frontend and backend
orders/data-access API calls and state
orders/feature pages and components for the orders domain
Why it works
- Shared types keep frontend and backend in sync.
- Nx dependency rules stop one feature from importing another.
nx affectedonly tests and builds what changed, so CI stays fast.
In a recent project for a physiotherapy clinic I applied this rule to a modular management system covering multi-site appointments, clinical records, stock, orders and accounting. The result is 18 domain libraries, one for each area of the work, while the apps remain a thin shell that puts them together. Since each business can switch on only the modules it needs, having those boundaries already drawn in the code makes that choice straightforward.
On every change, CI tests only the projects that were touched and the ones that depend on them: if stock management changes, the clinical records tests are not run again. With this many libraries, that is the difference between a quick check and one nobody wants to wait for.
