BOOTCAMPAZON is a simple "storefront" ran from the command line. There is a "Customer" and "Manager" portal that can be used to buy products and update inventory.
BOOTCAMPAZON was created as a homework assignment for the UNC Chapel Hill Full Stack Web Development Bootcamp, Nov. 2018 Cohort. BOOTCAMPAZON is ran from terminal via Node.js.
Technologies / Proficiencies
Skills/technologies incorporated into this assignment:
- Node Package Manager
- Mad ASCI Layout Skills
Node packages incorporated into this assignment:
- [MySQL] (https://www.npmjs.com/package/mysql)
- [Inquirer] (https://www.npmjs.com/package/inquirer)
- [Table] (https://www.npmjs.com/package/table)
- [Chalk] (https://www.npmjs.com/package/chalk)
Running bootCampazon.js provides the following customer interactions:
After running the script, the inventory of the current store is displayed:
Making a Purchase
The customer is then presented with prompts asking which product they would like to purchase, and at what quantity:
After this interaction, the customer is presented with their total and an updated inventory count for the product they purchased:
Finally, the customer is asked if they would like to keep shopping:
If they chose "Yes", the script re-starts by presenting the customer with the inventory list and questions about which product they would like to buy. If the customer chooses "No", then a "thank you" message is displayed.
Running bootCampazonMan.js provides the following manager interactions:
After first running the script, the manager is presented with five options:
Note: After completing the steps for any given option, the manager is then presented with this same prompt.
View Products for Sale
This option will print to terminal a table of the available products:
View Low Inventory
This option will print a table of any product that has less than five items in stock:
Add to Inventory
When selected, this option will also print a table of the available products:
Then the manager is asked for the item to add to inventory, and the quantity:
Once the item has been updated, as simple confirmation message is shown before re-loading the main menu:
Add New Product
This option prompts the manager to input the name, category, price, and starting inventory for the new product:
After successfully adding the item to inventory, the following is displayed to the manager:
Selecting this option will end the script and exit to terminal.
BOOTCAMPAZON requires node.js in order to run. Package.json is included for ease of installation for NPM packages.
The SQL files schema.sql and seeds.sql can be utilized to create the proper database structure.