Created an Amazon-like storefront with MySQL and Node. The app takes in orders from customers and depelte stock from the store's inventory. The app also tracks product sales across store's departments and provides a summary of the highest-grossing department in the store.
Setup
- Clone Repo and extract to an accessible location
- Navigate in
Git
to root of the folder bamazon - Type in
npm -install
- Open up the folder in your favorite text editor.
- Use
schema.sql
to create the necessary database and tables - Use
seeds.sql
to generate some data. - Navigate to
bamazonCustomer.js
,bamazonManager.js
andbamazonSupervisor.js
and update the password field with your password to access the database.
Running the App
- To access the customer store front, type in
node bamazonCustomer.js
- In this app, you, the user, can choose which item to purchase.
- After inputting an appropriate quantity, the quantity will depelete available quantity for a product and also update the appropriate table with sales
- To access the manager application, type in
node bamazonManager.js
- In this app, you, the user, can choose to View available products for sale, View Low Inventory Count, Replinish stock quantity for a product and Add a new product.
- To access the supervisor application, type in
node bamazonSupervisor.js
- In this app, you, the user, can View Product Sales by Department, which will allow the app to display a summarized table in terminal/bash window. You can also add a new department.