bamazon

Rhonda Johnson

Overview

Bamazon is an Amazon-like storefront. The app will take in orders from customers and deplete stock from the store’s inventory. The app will track product sales across the store’s departments and then provide a summary of the profits by department.

Link to deployed project

https://rmxjohnson.github.io/bamazon/

Built with:

Tables in bamazon database

products table:

departments table:

Synopsis of each Module

bamazonCustomer.js

  1. On entry, the app displays all items available for sale

  2. The app prompts users with two messages.
    • First mesage - asks them the ID of the product they would like to buy (validation of user input)
    • Second message - asks how many units of the product they would like to buy (validation of user input)
  3. Once the customer has placed the order, the app checks if the store has enough of the product to meet the customer’s request. If not, the user is notified and the order does not process.

  4. However, if your store has enough of the product, the customer’s order is fulfulled.
    • The products table is updated to reflect the modified stock_quantity and product_sales values
    • The customer is notified of the total cost of their purchase
    • The customer is prompted if they would like to make another purchase or exit the program

bamazonManager.js

  1. On entry, the user is given a set of menu options:

    • View Products for Sale
    • View Low Inventory
    • Add to Inventory
    • Add New Product
    • Exit Program
  1. After an option is completed, the manager is prompted whether they want to continue or exit the program

bamazonSupervisor.js

  1. On entry, the user is given a set of menu options:

    • View Product Sales by Department
    • Create New Department
  2. View Product Sales by Department - displays a summarized table - department_id, department_name, over_head_costs, product_sales, total_profit

  3. product_sales & total_profit columns are not stored in the database but are calulated when needed

  4. Create New Department - allows the user to add a new department to the store (validation of user input)

Screenshots

bamazonCustomer.js

  1. Product table displayed and user prompt customer1.png

  2. User prompts (with validation), total cost of purchase, continue prompt, exit message customer2.png

bamazonManager.js

  1. Product table displayed, user prompt, view low inventory (none < 5), continue prompt manager1.png

  2. Add inventory prompts (with validation), success message, continue prompt manager2.png

  3. Add new product prompts, success message, continue prompt, exit message manager3.png

bamazonSupervisor.js

  1. User prompts, View Sales by department (table displayed with correct values), continue prompt, menu options supervisor1.png

  2. Add new department, prompts (with validation), success message, continue prompt, exit message supervisor2.png