Giter VIP home page Giter VIP logo

bamazon's Introduction

Bamazon

Overview

A Node.js & MySQL digital storefront. This is a command line Node app that mimics an Amazon-like storefront.

Node.js

This JavaScript file runs the basics of placing an order:

  • bamazonCustomer.js (See example here)
    • Receives orders from customers via the command line and interfaces with mySQL to deplete stock from the store's inventory.

MySQL

The JavaScript file mentioned above query a MySQL database called bamazon Its locally hosted.

  • Please view the schema.sql file to see how the database was created using SQL queries.

  • If you want to run this app on your own computer, please use the following commands:

    1. Run CREATE DATABASE bamazon; in mySQL.
    2. Make sure to select the correct database by running the `USE bamazon;
    3. In schema.sql file refer to the SQL commands under the --Table comment to set up the products table.
    4. In schema.sql file refer to the SQL commands under the --Input of items to database comment to input the Data for the table.

Node Packages- npm

Please note that this repo has two npm dependencies. Before running the JavaScript file mentioned above, please run npm install in your terminal to download the prompt and mysql node packages.

Screenshots

Below are screenshots that capture the app functionality.

  • Run node BamazonCustomer.js in your terminal. This will pull data from MySQL and show all the products for sale.
    • The customer can then enter the product ID number of the item they wish to buy. Once the customer enters the ID they can then enter the qty they wish to buy. Customer Order
    • If the inventory has enough stock, the order will then be processed. Order Valid
    • If there's not enough invenotry to fufill their order, the customer will then see a message with the current stock and be notified that their order is now canceled. Order Invalid

Future Enhancements

  • BamazonManager.js

    • This will act as a warehouse management system. Which will allow a manager to view stock and adjust inventory in a few different ways.
  • BamazonExecutive.js

    • This will offer insight into profit and sales from the bamazon store.

bamazon's People

Contributors

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