bamazon Node App
Built by Beau Simpson
This app was built using the following:
- JavaScript
- Node.js
- Node modules
- Inquirer
- MySql
- console.table
- MySql Database
To use the app the user must first:
-
Install the required Node packages:
npm install
-
Use MySql and the following files to create database
bamazonSchema.sql
bamazonSeeds.sql
-
Enter MySql user password in
bamazonCustomer.js
file so that connection can be made to MySql Server
Customer View
Enter node bamazonCustomer.js
to run program
Once entered, the screen will display:
Once Id has been selected, it will ask how many units to be purchased:
After number of units to purchase has been entered; the terminal will:
- Display how many units have been purchased
- Display how much the customer owes
- Ask if customer would like to continue, which resets or exits the program
If amount of units to be purchased that is more than what is in stock:
- It will display "Insufficient Quantity"
- Ask if customer would like to continue, which resets or exits the program
Manager View
Enter node bamazonManager.js
to run program
The Terminal will display and ask manager to:
-
Select from a list of menu options:
-
View Products for Sale
-
View Low Inventory
-
Add to Inventory
-
Add New Product
-
Example of terminal display:
View Products for Sale
- This option will list all the products available for sale
- Ask if manager would like to continue, which resets or exits the program
Example of View Products for Sale:
View Low Inventory
- If no products have low inventory, displays message "No Items with low inventory"
- This option will list all products with an inventory of less than 5 unites
- Ask if manager would like to continue, which resets or exits the program
Example of View Low Inventory - No items with low inventory:
Example of View Low Inventory - list of products with low inventory:
Add to Inventory
- Lists all products, so one may be chosen to add inventory to:
Example of Add to Inventory - List of Products
- Asks how many units of selected product to be added to inventory
Example of Add to Inventory - How many units to be added:
- Displays confirmation of item being updated
-
- Ask if manager would like to continue, which resets or exits the program
Example of Add to Inventory - Inventory update confirmation:
Add New Product
- Asks for the name of new product to be added:
Example of Add New Products - Name of new product:
- Asks for the department of the new product:
Example of Add New Products - New product department:
- Asks for the price of the new product:
Example of Add New Products - New product price:
- Asks for the starting stock quantity of the new product:
Example of Add New Products - New product starting quantity:
- Displays confirmation of new product being added:
- Asks if manager would like to continue, which resets or exits the program