Skip to content

erikarg/Project-Store-Manager

Repository files navigation

Project Store Manager 🏪

🇧🇷 Português

Descrição

Projeto desenvolvido durante o terceiro módulo (desenvolvimento back-end) do curso da Trybe.

Objetivo

Construir uma API para gerenciar o banco de dados de estoque e vendas no formato dropshipping em que é possível criar, visualizar, deletar e atualizar produtos e vendas. A API segue uma arquitetura RESTful, em camadas MSC e conta com testes de integração para cobrir o código.

Stacks utilizadas

  • Arquitetura: RESTful, MSC
  • Back-end: Express, JavaScript, MySQL, Node.js
  • Plataforma: Docker
  • Testes: Chai, Jest, Mocha, Sinon

Rodando localmente

  • Instale os containers docker:

npm run compose:up

  • Execute o terminal do container:

docker attach store_manager

  • Instale as dependências, crie e popule o banco de dados:

npm install && npm run migration && npm run seed

  • Inicialize a aplicação:

npm start

  • Execute os testes unitários:

npm run test:mocha

Rotas

Sales

Requisição URL
GET http://localhost:3000/sales
GET http://localhost:3000/sales/:id
POST http://localhost:3000/sales
PUT http://localhost:3000/sales/:id
DELETE http://localhost:3000/sales/:id

Products

Requisição URL
GET http://localhost:3000/products
GET http://localhost:3000/products/:id
GET http://localhost:3000/products/search
POST http://localhost:3000/products
PUT http://localhost:3000/products/:id
DELETE http://localhost:3000/products/:id
🇺🇸 English

Description

Project developed during the third module (back-end development) of the Trybe course.

Objective

Build an API to manage the stock and sales database in dropshipping format where you can create, view, delete and update products and sales. The API follows a RESTful layered MSC architecture and relies on integration tests to cover the code.

Stacks

  • Architecture: RESTful, MSC
  • Back-end: Express, JavaScript, MySQL, Node.js
  • Platform: Docker
  • Tests: Chai, Jest, Mocha, Sinon

Running the application locally

  • Install the docker containers:

npm run compose:up

  • Run the container terminal:

docker attach store_manager

  • Install dependencies, create and populate the database:

npm install && npm run migration && npm run seed

  • Start the application:

npm start

  • Run unit tests:

npm run test:mocha

Endpoints

Sales

Method URL
GET http://localhost:3000/sales
GET http://localhost:3000/sales/:id
POST http://localhost:3000/sales
PUT http://localhost:3000/sales/:id
DELETE http://localhost:3000/sales/:id

Products

Method URL
GET http://localhost:3000/products
GET http://localhost:3000/products/:id
GET http://localhost:3000/products/search
POST http://localhost:3000/products
PUT http://localhost:3000/products/:id
DELETE http://localhost:3000/products/:id

About

An API RESTful made with Node.js and MySQL to manage a store database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •