Code Monkey home page Code Monkey logo

store-manager's Introduction

Store Manager!

๐Ÿ‘จโ€๐Ÿ’ป What was developed

An API that uses the MSC (model-service-controller) architecture! Developed using TDD.

The built API is a sales management system in dropshipping format where it is possible to create, view, delete and update products and sales.

The MySQL database was used for data management. Also, the API is to be RESTful.


๐ŸŽฒ ER Diagram, Entities and Scripts

Entity-Relationship Diagram

To guide the manipulation of the tables, use the following DER:

DER


Tables

The database will have three tables:

  • The products table, with the id and name attributes;
  • The sales table, with the id and date attributes;
  • The sales_products table, with the sale_id, product_id and quantity attributes;
  • The database creation script can be seen here;
  • The script that populates the database can be seen here;

The products table has the following format: (The id will be generated automatically)

Tabela Produtos

The sales table has the following format: (The id and date are generated automatically)

Tabela Vendas

The sales_products table is the table that makes the N:N relationship between products and sales and has the following format: (The product and the sale are deleted automatically)

Tabela Vendas-Produtos


Ready-made script tips

  • Create the database and generate the tables:
  npm run migration
  • Clean and populate the database:
  npm run seed
  • Start the Node server:
  npm start
  • Start the Node server with nodemon:
  npm run debug
  • Run the unit tests:
  npm run test:mocha
  • Run the linter:
  npm run lint

store-manager's People

Contributors

felipehfernandes avatar guilherme-adesouza avatar henriquebaetaleite avatar trybe-tech-ops avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.