API that manages a vehicle concessionaire using the four basic CRUD operations. I designed the project architecture with a layered approach based on Domain-Driven Design (DDD), incorporating Object-Oriented Programming (OOP) and SOLID principles. To ensure correctness, I developed unit and integration tests to cover almost 99% of the project's functionalities.
In this project, I was able to:
- Create an API CRUD using OOP and SOLID principles;
- Use MongoDB;
- Use Mongoose ODM;
- Create unit tests;
- Create Integration tests.
TypeScript | Express | Mongoose | Node.JS | MongoDB | Docker | Insomnia |
---|---|---|---|---|---|---|
Mocha | Chai | Sinon |
---|---|---|
- Clone the repository and enter it
git clone [email protected]:ImVictorM/Auto-Shop.git && cd Auto-Shop
You must have docker and docker-compose installed
- Get the containers running
docker-compose up -d
You must have node on version 16 and MongoDB installed
- Install the dependencies
npm install
-
Rename the file
.env.example
to.env
-
Start the server
npm run dev
Note: if you're running the app using docker, you must use the following commands inside the car_shop container. To enter the container, type:
docker exec -it car_shop bash
Running all tests:
npm test
Running integration tests:
npm run test:integration
Running unit tests:
npm run test:unit
Run all tests and see its coverage:
npm run test:coverage
Click here to export automatically:
Or just import the file insomniaRoutes.json
inside your environment: https://docs.insomnia.rest/insomnia/import-export-data