Skip to content

Latest commit

 

History

History
216 lines (194 loc) · 6.91 KB

README.md

File metadata and controls

216 lines (194 loc) · 6.91 KB

Auto Shop 🏎️

Project Context 💡

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.

Acquired Knowledge 📖

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.

Main Technologies 🧰

Development

TypeScript Express Mongoose Node.JS MongoDB Docker Insomnia
typescript express mongoose nodejs mongodb docker insomnia

Test

Mocha Chai Sinon
mocha-js chai-js sinon-js

Running the application ⚙️

  1. Clone the repository and enter it
git clone [email protected]:ImVictorM/Auto-Shop.git && cd Auto-Shop

Methods

🐋 Running with docker (recommended)

You must have docker and docker-compose installed

  1. Get the containers running
docker-compose up -d

🖥️ Running locally

You must have node on version 16 and MongoDB installed

  1. Install the dependencies
npm install
  1. Rename the file .env.example to .env

  2. Start the server

npm run dev

Testing 🛠️

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

Endpoints 🌐

Click here to export automatically:

Run in Insomnia}

Or just import the file insomniaRoutes.json inside your environment: https://docs.insomnia.rest/insomnia/import-export-data