Category ➡️ Software
Subcategory ➡️ NestJS Backend Engineer
Difficulty ➡️ Medium
In the fast-paced world of modern technology, efficient management of resources and streamlined processes are key to success. Addressing this need, a dynamic tech startup has embarked on an ambitious project to create a comprehensive backend API focused on item and category management. This project, utilizing the robust and versatile NodeJS framework along with NestJS, aims to offer a sophisticated yet user-friendly interface for managing various categories and items in a database. The integration of MongoDB as the database solution underscores the project's commitment to scalability and performance. Through meticulously crafted testing suites for both categories and items, the team ensures reliability and functionality in every aspect of the API. This endeavor not only promises to enhance organizational efficiency but also sets a benchmark in creating effective, adaptable backend solutions in the ever-evolving digital landscape.
A repository tree is provided below and should not be modified. Everything you need to develop the challenge is already included.
discoduro-software-nestjs1/
├── nest-cli.json
├── nest.md
├── package.json
├── package-lock.json
├── README.md
├── src
│ ├── app.module.ts
│ ├── main.ts
│ └── modules
│ ├── categories
│ │ ├── categories.controller.spec.ts
│ │ ├── categories.controller.ts
│ │ ├── categories.module.ts
│ │ ├── categories.service.ts
│ │ ├── dto
│ │ │ ├── create-category.dto.ts
│ │ │ └── update-category.dto.ts
│ │ └── schemas
│ │ └── category.schema.ts
│ └── items
│ ├── dto
│ │ ├── create-item.dto.ts
│ │ └── update-item.dto.ts
│ ├── items.controller.spec.ts
│ ├── items.controller.ts
│ ├── items.module.ts
│ ├── items.service.ts
│ └── schemas
│ └── item.schema.ts
├── test
│ ├── app.e2e-spec.ts
│ └── jest-e2e.json
├── tsconfig.build.json
└── tsconfig.json
It is necessary to modify only the files proposed in the objectives.
This initiative focuses on constructing a robust backend API for managing items and categories, leveraging the power of NodeJS, NestJS, and MongoDB. The primary aim is to facilitate efficient CRUD operations and advanced functionalities for item and category handling. The final objective of the challenge is to pass the tests provided.
Task 1: Complete the categories.service.ts
file for the create and get tests.
Task 2: Complete the categories.service.ts
file for the update and remove tests.
Objective 3: Complete the items.service.ts
file for the create and get tests.
Objective 4: Complete the items.service.ts
file for the update, updateStatus and remove tests.
Recommended versions:
NodeJs: from version 20 or later
NestJs: from version 10 or later
Before you start, you must install the dependencies, open a terminal and run: npm i
To start the project, open a terminal and run: npm run start:dev
In order to test the application you must have a MongoDB instance deployed locally. It is recommended to use a Docker container: https://hub.docker.com/_/mongo
Open a terminal and run: docker pull mongo
. You will have mongo ready for testing.
More information about NestJS is available at Doc.
To learn in depth how NestJS works from scratch, we recommend completing the Disco Duro de Roer course on Udemy: https://www.udemy.com/course/aprende-nestjs-desde-0/
Solve the proposed objectives.
Push the changes you have made.
Click on Submit Challenge.
Wait for the results.
The final score will be given according to whether or not the objectives have been met.
In this case, the challenge will be evaluated on 900 points which are distributed as follows:
Task 1: 225 points
Task 2: 225 points
Task 3: 225 points
Task 4: 225 points
In this case, the tests to be performed are given, so no I/O example will be given. Based on these tests, you should be able to complete all objectives.
It is not allowed to modify the basic functionality of the tests provided. Complementary tests may be added, but these will not be evaluated.
Timeline
01
Start the challenge & clone the repository
02
Solve the challenge & submit your solution
Next action: