Coder Social home page Coder Social logo

bamazon's Introduction

bamazon

Overview:

Using MySQL & Node.js, bamazon is an Amazon-like CLI app that takes orders from customers and depletes stock from the store's inventory as valid.


Details:

  1. Running node bamazonCustomer.js in the terminal will first display all of the items available for sale, including ids, names, and prices.

  2. The app then prompts users with two messages:

    • The first asks them the ID of the product they would like to buy.
    • The second message asks how many units of the product they would like to buy.
  3. Once the customer has placed the order, the app will check for a valid product ID and if the store has enough of the product to meet the customer's request.

    • If the product ID does not exist or if there is not enough quantity of a product, the app prevents the order from going through and prompts the customer to try again.
  4. If an order is successful, the customer receives a receipt for the item and quantity purchased and the total cost.

  5. the storefront will reflect the updated remaining quantity upon the next potential purchase.


Demo:

Successful Purchase

Purchase

Invalid Product ID

Invalid ProductID

Insufficient quantity

Insufficient quantity


Built with:

  • JavaScript - High-level programming language.
  • MAMP - Local server environment.
  • MySQL Workbench - Visual database design tool that integrates SQL development, administration, database design, creation and maintenance into a single integrated development environment for the MySQL database system.
  • Node.js - Open-source run-time environment that executes JS code outside of a browser.
  • Visual Studio Code - Source code editor developed by Microsoft.

npm packages used:


Author:

bamazon's People

Contributors

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