Giter VIP home page Giter VIP logo

bamazon's Introduction

BAmazon

A sample command line store integrating mySQL and Node.js where customers can place orders, inventory is managed, and sales are tracked.

Getting Started

  • Clone repository
  • Run 'npm install' in Terminal
  • Run command for which mode you'd like to enter:
    • Customer: 'node BAmazonCustomer'
    • Manager: 'node BAmazonManager'
    • Supervisor: 'node bamazonSupervisor'

Prerequisites

npm packages:

inquirer
chalk
dotenv
sql
table

Functionality

Let's walk through each mode:

  1. BAmazonCustomer
  • run 'node BAmazonCustomer'
  • user prompted for the ID of the item they wish to purchase
  • user prompted for the Quantity they wish to purchase
  • database item quantities are checked against quantity user is requesting. If there is enough in stock, the users purchase goes through, the total is calculated and the quantity is updated in the database as well as the sales for the department.
  1. BAmazonManager
  • run 'node BAmazonManager'
  • user prompted with list of options: 'View Products for Sale','View Low Inventory', 'Add to Inventory', 'Add New Product', 'Exit'
  • 'View Products for Sale': shows full store items table from the database
  • 'View Low Inventory': shows user all products that have less than 5 in stock
  • 'Add to Inventory':
    • user prompted to select a product, then how much they would like to add to stock
    • after prompt, database is updated to show added stock
  • 'Add New Product':
    • user prompted for name, price, department name, and stock quanitity for new product
    • then database is updated to show new product in table with prompted information
  1. BAmazonSupervisor
  • run 'node BAmazonSupervisor'
  • user prompted with options: "View Product Sales by Department","Create New Department", "Quit"
  • "View Product Sales by Department": displays departments table from database with sales
  • "Create New Department": prompts user for department name and overhead costs for department, then updates database

Running Demos

Customer

Customer Demo Video

Manager

Manager Demo Video

Supervisor

Supervisor Demo Video

Deployment

Remember to create your own database in mySQL called 'BAmazon', and have it reference BAmazon.sql

Built With

Versioning

For the versions available, see the tags on this repository.

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

bamazon's People

Contributors

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