Bamazon is a simple storefront app using MySQL and Node.js.
Let's get started ...
First we'll go over the Bamazon Customer App ...
Upon loading the Bamazon Customer App, you will be greeted with a table displaying the available items for purchase:
The headers of the table are as follows:
- Product's ID
- Product's Name
- Product's Department
- Product's Price
- Product's Quantity
Below the graph you will receive your first prompt, which asks for the numeric Product ID of the item you would like to purchase ...
This prompt contains validation; only correct product IDs will be accepted!
After entering a product ID, you will be asked to enter a quantity ...
This prompt contains validation; only numeric values will be accepted!
Once a quantity is entered, your order will be processed, a message will appear thanking you for your order, and a receipt will be generated.
The receipt consists of a unique receipt ID, the name, price, quantity of the item that was purchased, and the total of the purchase:
Under the receipt an updated table displaying the available items for purchase will display. This table will display the updated quantity of the item purchased:
At this point you will return to the beginning step of the Bamazon Customer App.
Now let's go over the Bamazon Manager App ...
At startup you will be given four options:
- View Products for Sale
- View Low Inventory
- Add to Inventory
- Add New Product
Let's go over what each option does ...
View Products for Sale
This option simply displays a table containing the available items for purchase:
The headers of the table are as follows:
- Product's ID
- Product's Name
- Product's Department
- Product's Price
- Product's Quantity
View Low Inventory
If selected, this option will generate a table containing all items with a quantity of 5 or lower:
The headers of the table are as follows:
- Product's ID
- Product's Name
- Product's Department
- Product's Price
- Product's Quantity
Add to Inventory
The 'Add to Inventory' option allows the user to update the quantity of an item in the database of products.
After selecting this option, a table containing the available items for purchase will display and you will be prompted for the Product ID of the product you would like to update the quantity of:
This prompt contains validation; only correct product IDs will be accepted!
After submitting a Product ID, you will be prompted for the new quantity of the selected item.
Please note, the value you are providing is the new quantity, it will not be added to the existing quantity.
This prompt contains validation; only numeric values will be accepted!
After submitting the new quantity, a confirmation will appear and an updated table displaying the available items for purchase will display. This table will contain the updated quantity.
Add New Product
The 'Add New Product' option allows the user to add a new item to the database of products.
After selecting this option, a table containing the available items for purchase will display.
Below this table a series of prompts will follow. Be prepared to provide the following:
- The New Product's Name
- The New Product's Department
- The New Product's Price This prompt contains validation; only numeric values will be accepted!
- The New Product's Quantity This prompt contains validation; only numeric values will be accepted!
After answering each prompt, a confirmation will appear and an updated table displaying the available items for purchase will display. This table will contain the newly added item.