Hello,
Here we have the BAMAZON customer and BAMAZON manager files which run npm functions inquirer and mysql. Using mysql we can access the database from our local server and change data using VS Code editor + inquirer. We plug in a connection query which includes the username, password, PORT allowing a secure connection.
We have created a TABLE of products within the Sequel Pro to list a number of items available for purchase on "BAMAZON".
These items can either be viewed or purchased through the BAMAZON customer file. The BAMAZON customer file has two main functions which allows the user to either view the list of items connected on Sequel Pro (free program available to users to create/test database sets) or to "purchase" items which will update the quantity on Sequel Pro.
Secondly, we have the BAMAZON manager which allows the user to run a wider range of functions such as "View Low Inventory, Add to Inventory, Add New Product on top of the previous two functions. Users can imitate the potential use-cases for these commands when it comes down to real-world applications of running an online business or even a business in store.
Below, I have attached screenshots which replicate the functions which are protrayed starting with the Bamazon customer file (First photo: shows the basic setup of the Sequel Pro Database/Table, Second photo: shows list of items available to purchase, Third photo: user selects an item to purchase, Fourth photo: asks user how many quantity to purchase, Fifth photo: completes transaction and user selects to exit, Sixth photo: displays updated quantity for the item purchased in Sequel Pro.):
In sequential order, below we have each photo running down the list of functions/options available to the "manager". Starting with "Viewing Products", "View low inventory", "Add to inventory", "Add new product" (unfortunately, I had an issue running the "Add to Inventory" option as it returned an error regarding the split function.):