The Bamazon App is designed to simulate an online storefront. There is a customer module and a manager module. Each with their own commands. Using Inquirer we query the user for input that affects a MySQL database. The customer can "purchase" product, and the manager can alter and view inventory in a variety of ways.
- Running this Node application will first display all of the items available for sale.
- The app will then prompt the user with two messages:
- The first asks them the ID of the product they would like to buy.
- The second message will prompt the user for how many units of the product they would like to buy.
- Once the customer has placed the order, the application checks if the store has enough of the product to meet the request.
- If the store has enough of the product, the customer's order is fulfilled and their total cost is displayed.
- If not, the app will inform the customer and prevent the order from going through.
- Running this application will display the manager module which allows direct manipulation of our MySQL database through Inquirer prompts. There are 4 options available to the manager:
- View Products
- The View Products case will display all of the information associated with our database's product table.
- Low Inventory
- Selecting Low Inventory will display a list of all items with an inventory count lower than, but not equal to, five. (notice that Box Fan does not display)
- Add Inventory
- By choosing the Add Inventory option our manager is able to modify the inventory of an ID that already exists in our database.
- Add Product
- The last option available to the manager is Add Product. We can add a new product to our database from the terminal after following the prompts.