Skip to content

Back-end. A CRUD Store Manager made with Node.js and Express following MSC architecture and TDD testing.

Notifications You must be signed in to change notification settings

ibrahimborba/store-manager

Repository files navigation

Welcome to Store Manager project!

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.

Summary

Context

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.

Technologies, tools and architectures used

This project used the following technologies and tools:

Store Manager MSC architecture diagram.

Store Manager architecture diagram

Installing and running the app

Install dependencies

cd store-manager
npm install

Run the application without Docker

Don't forget to create and setup an .env file to connect to your local MySQL.

cd store-manager
npm run debug

Run the application with Docker (compose configs were developed by Trybe's team)

cd store-manager
docker-compose up -d
docker exec -it store_manager bash
npm install
npm run debug

Run Tests

npm run test:mocha

Run Lint

npm run lint

Notes

Documentation

API's documentation can be found here.

Code quality

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.

Git, GitHub and Commits

Commited using the Conventional Commits specification with some types from Angular convention.