A project created using the Nest framework. This project was created as a backend coding challenge.
This project consists of the following modules:
- Actions module: Contains endpoints and logic directly related to actions.
- Core-data module: Contains classes that represent entities in the system.
- Core-utils module: Contains common helper functions used throughout the system.
- Database module: Contains database implementation and data-source files used to access different data in the system.
- Users module: Contains endpoints and logic directly related to the users.
- Install dependencies:
$ npm install
- Add a
.env
file to the project's root directroy with the following ENVs:
# Controls the type of database used. Only local is usable.
DATA_SOUCE_TYPE=local
# Control the solution for getting the referral index for users. Only graph is usable.
REFERRAL_DATA_SOURCE_TYPE=graph
# development
$ npm run start
# watch mode
$ npm run start:dev
# unit tests
$ npm run test
# unit tests coverage
$ npm run test:cov
# e2e tests
$ npm run test:e2e
# e2e tests coverage
$ npm run test:e2e:cov
You will find a postman collection inside the postman
folder which can be used to test the project's endpoints.