A command-line app that mimics the Amazon storefront using MySQL database. The app has three different views: customer, manager, and supervisor. The customer view takes orders from customers and depletes stock from the inventory. The manager view gives managers an overview of current products and allows them to add inventory or new products. The supervisor view tracks product sales across departments and allows supervisors to add new departments.
- Create the Bamazon database by running the code in bamazon.sql using MySQL Workbench
- Navigate to the root of the Bamazon app in your terminal
- Start the app by entering one of three commands:
node bamazonCustomer.js
node bamazonManager.js
node bamazonSupervisor.js
-
Upon entering the customer view, the app will list all of the current products in the database and ask you which product you would like to purchase:
-
Enter the id of the product and the quantity you would like to purchase
-
If you choose to continue shopping, the app will list all of the current products again:
-
When using the manager view, the app will list four commands:
-
View Products for Sale
will display all of the products currently for sale: -
View Low Inventory
will display products with an inventory count less than five: -
Add to Inventory
will allow you to add inventory to a specific product: -
Add New Product
will allow you to add a new product for sale. The app will ask you to enter the product name, department, price, and stock of the new product:
-
-
When done with current command, the app will ask if you would like to use another command:
-
The supervisor view allows you to view product sales by department or create a new department:
-
When finished with your current command, the app will ask if you like to use another command:
- JavaScript, Node.js
- MySQL
- Console.table
- Inquirer
- Colors