Code Monkey home page Code Monkey logo

whatever-coffee-shop's Introduction

Coffee shop database

A database for Database class.

  • Trần Tuấn Thịnh - 20020265
  • Quách Ngọc Minh - 20020261
  • Nguyễn Việt Hoàng - 20020196

Table of content

Prerequisites

  • npm and yarn 1.x

Database Design

Use PostgreSQL database with TypeORM for querying

coffee shop diagram.png

  • Customer Table is where we store customers' information. There are 5 different rows which are id, first name, last name, balance and phone number
  • Order Table is where we store orders' information. We can see each each orders' id, customerID, storeID, date, and total price of the order.
  • In OrderDetails, we include details for each order. For example, a customer has 1 order with 2 difference product, this table will dispay each item price.
  • Next is the Product Table, we have products' name, price for each of them, and the cost of each product. We also separate each product into it own category and keep track of their inventory.
  • In the Store Table, we include the location of each store, total revenue in each store and the cost it took to operate.
  • Go to the SupplierDetails Table, we have suppliers' information and their transaction with the shop.
  • Lastly, in the suppliers Table, we have the supplier basic information like name and the total amount of money paid for each supplier

Database Local

If you want to run this database locally then do the following

  • Clone this github repo to your local machine
  • Create an empty database name coffee in your PostgreSQL database
  • Open a terminal at api folder, run copy env.example .env and change corresponding variable to match your local database
  • Still at that terminal, run yarn to install all dependencies and yarn run migration:run to import data to your database
  • Run the server with yarn start:prod

Preview

whatever-coffee-shop's People

Contributors

hanzomaster 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.