This repository is intended to be a starter project for your assignment.
Please review ./Requirements.md
for more detailed instructions about this assignment.
You can build the project using the Nx command line tools
🔎 Nx is a set of Extensible Dev Tools for Monorepos.
Using:
- Node.js v14.15.0
- npm v6.14.8
- Angular v10
- NESTJS v7
- Web App:
apps/suite-portal
- API Server:
apps/api
- Shared Library:
libs/api-interfaces
(NOTE: This library can be imported in all the apps by importing from@suiteportal/api-interfaces
)
- Change directory to the root of the monorepo
npm install
to install the dependencies- Start the API server
npx nx serve api
- Open new terminal
- Start the Web App dev server
npx nx serve suite-portal
- Go to http://localhost:4200/
Run npx nx serve suite-portal
for the web app dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run npx nx serve api
for the API dev server. The service is listening on http://localhost:3333/api
Run npx nx g @nrwl/react:component my-component --project=suite-portal
to generate a new component.
Run npx nx build suite-portal
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run npx nx test suite-portal
to execute the unit tests for the web app via Jest.
Run npx nx test api
to execute the unit tests for the API via Jest.
Run npx nx affected:test
to execute the unit tests affected by a change.
Run ng e2e suite-portal
to execute the end-to-end tests via Cypress.
Run npx nx affected:e2e
to execute the end-to-end tests affected by a change.
Run npx nx dep-graph
to see a diagram of the dependencies of your projects.
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 our core plugins:
- React
npm install --save-dev @nrwl/react
- Web (no framework frontends)
npm install --save-dev @nrwl/web
- Angular
npm install --save-dev @nrwl/angular
- Nest
npm install --save-dev @nrwl/nest
- Express
npm install --save-dev @nrwl/express
- Node
npm install --save-dev @nrwl/node
There are also many community plugins you could add.
Run npx nx g @nrwl/react:app suite-portal
to generate an application.
You 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.
Run npx nx g @nrwl/react:lib my-lib
to generate a library.
You can also use any of the plugins above to generate libraries as well.
Libraries are sharable across libraries and applications. They can be imported from @suite-portal/mylib
.
Visit the Nx Documentation to learn more.