GithubHelp home page GithubHelp logo

bamazon's Introduction

Bamazon

Overview

This activity is a command-line Amazon-like storefront using node and MySQL. This app will take in orders from customers and deplete stock from the store's inventory.

Node Packages

This app uses mysql, inquirer, and cli-table node packages (see package.JSON)

Instructions

Customer View

customer view

  • The user types node bamazonCustomer.js in the terminal/bash window to run the app.

  • The app will display the items for sale from the corresponding MySQL database (bamazon_db)

  • The app will prompt the user to input the ID of the product they would like to buy and how many units.

  • It will check how much of that product is in stock:

    • If there is enough to meet the user's request

      • the order will be fulfilled
      • the stock quantity in the database will be updated to reflect the remaining quantity
      • the user will be informed of the total cost.
    • If there is not enough of the product in stock

      • the user is informed that the order cannot be fulfilled.

Manager View

manager view

  • The user types node bamazonManager.js in the terminal/bash window to run the app.

  • Running this application will:

    • List a set of menu options:

      • View Products for Sale

      • View Low Inventory

      • Add to Inventory

      • Add New Product

      • Exit

    • If a manager selects View Products for Sale, the app will display a table of every available item: the item IDs, names, prices, and quantities.

    • If a manager selects View Low Inventory, then it will list all items with an inventory count less than or equal to five.

    • If a manager selects Add to Inventory, the app will display a set of prompts that will let the manager "add more" of any item currently in the store.

    • If a manager selects Add New Product, it will display a set of prompts to allow the manager to add a completely new product to the store.

  • If a manager selects Exit, it will end the connection to the database and stop running the app.


bamazon's People

Contributors

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