Git Product home page Git Product logo

bamazon's Introduction

bamazon

An app that uses MySQL and node to create a Amazon-like storefront

Installation

  1. Clone this repository to your computer and install dependencies:

with SSH:

git clone [email protected]:tintdang/bamazon.git

go to the root of your bamazon folder

npm install
  1. Set up your MySQL credentials. Either open bamazon.sql in your sql editor, and run the script.

  2. Run the app with one of the following commands. Usage for each is documented below:

node bamazonCustomer.js
node bamazonManager.js
node bamazonSupervisor.js

Features

Customer

The bamazonCustomer.js is intended for your customers. Your customers will run node bamazonCustomer.js, the following will occur:

  1. A table of your current iventory will be printed, displaying product names, IDs, departments, prices, and stock.
  2. Customers will be prompted to enter the ID of the product they want to buy.
  3. Customers will be asked how many units they want to buy.
  4. Their total will be printed, and the inventory of the appropriate product will decrease. They may repeat this step until they complete their order. NOTE: if the customer wishes to buy more than what you have in stock, they will be alerted and taken back to the initial purchase prompt.

Customer demo:

Manager

The bamazonManager.js file provides an interface for store managers to view and modify inventory. The following commands are available:

  1. View Products For Sale: This command will print a table of your current inventory, allowing easy access to important information on your products.
  2. View Low Inventory: Print your current inventory that are low on stock that is lower than 5.
  3. Add To Inventory: Allows you to update your database when receiving more product.
  4. Add New Product: Allows you to add more products to your inventory.
  5. Quit: Will let you exit the application

Manager demo:

Libraries used:

bamazon's People

Contributors

tintdang avatar

Watchers

James Cloos 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.