A RESTful API that uses MSC architecture to manage a Store's sales and products. Developed at Trybe's Back-end Module, Node.js architectures.
- Welcome to Store Manager project!
- Summary
- Context
- Technologies, tools and architectures used
- Installing and running the app
- Notes
This project is a CRUD Store API that connects with a MySQL database to manage sales and products from a store. The user is allowed to:
- Create new Products and Sales | Both have validations for user input and Sales has a validation that checks if the product sold exists in the database.
- Read all Products and Sales or search by Id.
- Update a Product or Sale | Both have validation to check if said item exists in the database.
- Delete a Product or Sale Id.
This project used the following technologies and tools:
- Node.js, Express, Nodemon, Joi | Create a HTTP API, API routing, error handling, improve API development, data validation.
- Mocha, Chai, Sinon | TDD and unit testing for Node.js.
- MySQL | Creating and managing databases.
- MSC | Improve code organization, maintenance and scalability.
- REST | Simple architecture and highly popular.
Store Manager MSC architecture diagram.
cd store-manager
npm install
Don't forget to create and setup an .env
file to connect to your local MySQL.
cd store-manager
npm run debug
cd store-manager
docker-compose up -d
docker exec -it store_manager bash
npm install
npm run debug
npm run test:mocha
npm run lint
API's documentation can be found here.
To enforce Clean Code and good practices, the following standards and resources were used in this project:
- TDD | Using Test Driven Development with a high coverage to guarantee good architecture and expected behaviors.
- Linter | Developed following the Clean Code standards specified by Trybe's ESLint.
- SonarCloud | Passing SonarCloud's quality standards and analysis. Check the evaluation here.
Commited using the Conventional Commits specification with some types from Angular convention.