0. Create an empty Nx workspace
npx create-nx-workspace@latest
--name=your-org-name
--nxCloud=false
--preset=apps
0.1. Install angular plugin
cd your-org-name
npm i -D @nx/angular
npx nx g @nx/angular:host shell
--e2eTestRunner=none
--inlineStyle
--inlineTemplate
--prefix=ab
--skipTests
--standalone
--style=css
--unitTestRunner=none
npx nx g @nx/angular:remote app-one
--e2eTestRunner=none
--host=shell
--inlineStyle
--inlineTemplate
--prefix=ab
--skipTests
--standalone
--style=css
--unitTestRunner=none
3. Generate Feature Lib (auth for example)
npx nx g @nx/angular:library auth
--changeDetection=OnPush
--directory=routes
--flat
--importPath=@ab/auth
--inlineStyle
--inlineTemplate
--lazy
--parent=apps/shell/src/app/app.routes.ts
--prefix=ab
--routing
--simpleName
--skipTests
--standalone
--unitTestRunner=none
npx nx g @nx/angular:library shared/ui
--changeDetection=OnPush
--flat
--importPath=@ab/ui
--inlineStyle
--inlineTemplate
--prefix=ab
--simpleName
--skipTests
--standalone
--unitTestRunner=none
npx nx g @nx/angular:library shared/core
--flat
--importPath=@ab/core
--simpleName
--skipTests
--standalone
--unitTestRunner=none
5. Generate Domain Lib for any app or lib
npx nx g @nx/js:library domain
--bundler=esbuild
--directory=/apps/app-one
--importPath=@ab/app-one-domain
--minimal
--unitTestRunner=none
npm i -D @nx/cypress
npm i -D @nx/jest
6.1. Add e2e tests for applications
npx nx g @nx/cypress:cypress-e2e-configuration --bundler=webpack --project=shell
npx nx g @nx/cypress:cypress-e2e-configuration --bundler=webpack --project=app-one
6.2. Add component tests for ui or feature libraries
npx nx g @nx/angular:cypress-component-configuration
--project=ui
--buildTarget=shell:build
--generateTests
npx nx g @nx/angular:cypress-component-configuration
--project=auth
--buildTarget=shell:build
--generateTests
6.3. Add unit tests for any lib
npx nx g @nx/jest:jest-project --project=core
npx nx g @nx/jest:jest-project --project=app-one-domain