Nx Ng Starter
Nx + Angular + NestJS mono-repository starter with workflow automation.
Workflows
Requirements
In order to run own copy of the project one must fulfill the following requirements.
Supported operating systems
🏆 Debian based Linux -
recommendedcheck out this dev setup instructions to facilitate setting up the dev environment;
given that the dev environment is set up, the command
yarn install:all:linuxshould install everything needed to work with the project;
🆗 OSX -
should work due to the similarities with Linuxone will have to figure out oneself how to set up the dev environment;
given that the dev environment is set up, the command
yarn install:all:osxshould install everything needed to work with the project;the automation scripts support the OS with relatively high probability, but it has not been tested;
🚫 Windows -
not recommendedone will have to figure out oneself how to set up the dev environment;
one will have to figure out oneself how to install required dependencies like
protolintandshellchecksystem wide;the automation scripts support the OS with relatively low probability, but it has not been tested.
Core dependencies
Preferred package manager
Yarn - preferred package manager for dependencies installation in the project root.
npm - preferred package manager for dependencies installation in the
functionsfolder.
Package scripts reference
The project has lots of package scripts, check it in the package.json located in the project root, or use the following command (see terminal output for usage tips)
yarn workspace:helpCommitting changes to repo
Using commitizen cli is mandatory.
Provided all dependencies are installed, and commitizen cli is installed as a global dependency, this command must be used.
git czGitBook documentation
The GitBook documentation is generated based on this GitHub repo.
Firebase deployments
Application deployments and autogenerated engineering documentation.
Workspace generators
Generate a library
feature library
feature libraryyarn workspace:schematic client-feature client-<feature-name> --tags=scope:client-<feature-name>,type:featureui library
ui libraryyarn workspace:schematic client-ui client-ui-<feature-name> --tags=scope:client-ui-<feature-name>,type:uidata-access library
data-access libraryyarn workspace:schematic client-store client-store-<feature-name> --tags=scope:client-store-<feature-name>,type:data-accessutil library
util libraryyarn workspace:schematic client-util client-util-<feature-name> --tags=scope:client-util-<feature-name>,type:utilGeneral Tooling
This project was generated using Nx.

🔎 Nx is a set of Angular CLI power-ups for modern development.
Quick Start & Documentation
Adding capabilities to the workspace
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
These capabilities include generating applications, libraries, .etc as well as the devtools to test, and build projects as well.
Below are some plugins which can be added to the workspace:
Generating an application
To generate an application run:
ng g @nrwl/angular:app my-appYou can use any of the plugins above to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.
Generating a library
To generate a library run:
ng g @nrwl/angular:lib my-libYou can also use any of the plugins above to generate libraries as well.
Libraries are sharable across libraries and applications.
It can be imported from @nx-ng-starter/mylib.
Running a development server
To start a dev server run:
ng serve my-appNavigate to http://localhost:4200/.
The app will automatically reload if you change any of the source files.
Code scaffolding
To generate a new component run:
ng g component my-component --project=my-appBuilding applications
To build the project run:
ng build my-appThe build artifacts will be stored in the dist/ directory.
Use the --prod flag for a production build.
Unit testing with Jest
To execute the unit tests run:
ng test my-appTo execute the unit tests affected by a change run:
npm run affected:testEnd-to-end testing with Cypress
To execute the end-to-end tests run:
ng e2e my-appTo execute the end-to-end tests affected by a change run:
npm run affected:e2eUnderstanding the workspace
To see a diagram of the dependencies of the projects run:
npm run dep-graphGenerating a storybook for a feature or ui library
npx nx g @nrwl/angular:storybook-configuration project-nameTools help
ng run tools:helpFurther help
Visit the Nx Documentation to learn more.
Technologies Reference
Workspace
Client
Server
Testing
Documentation
CI
Development methodology
Last updated
Was this helpful?