In the Store Manager project, we were asked to develop a CRUD (Create, Read, Update, Delete) API to manage a store's data regarding its products and sales. With this objective in mind, we structured this RESTful API according to the MSC (Models, Services and Controllers) architecture, linking it to the store's database with greater security and stability.
This project has several management routes made with Node.js and Express.js to handle one or more MySQL tables at the same time. In addition, we have high coverage of tests done with Mocha, Chai and Sinon to ensure code quality and functionality.
Node.js
Express.js
MySQL
Mocha, Chai and Sinon
After cloning the repository, you need to install the necessary dependencies with the npm install
command and start the project with the node index.js
command. After that, you can make requests using an HTTP client (Insomnia, Postman, HTTPie, etc.).
Endpoints for Products
- get('/');
- get('/search');
- get('/:id');
- post('/');
- put('/:id');
- delete('/:id');
Endpoints for Sales
- get('/');
- get('/:id');
- post('/');
- put('/:id');
- delete('/:id');
(You should use the npm run test:mocha
command to test the application)
You can check the entire commit history to see how the project was developed step by step. All commits were based on the Conventional Commits guide, keeping an organization and accurate description of what was done with each change.
You can get in touch with me at pedronerislc@gmail.com or by Linkedin.