I created an Amazon-like storefront with the MySQL skills. The app takes in orders from customers and depletes stock from the store's inventory. Moreover, I programmed bamazon to track product sales across your store's departments and then provide a summary of the highest-grossing departments in the store.
The Node application called bamazonCustomer.js
. Running this application will first display all of the items available for sale. Include the ids, names, and prices of products for sale.
Once the customer has placed the order, my application checks if the store has enough of the product to meet the customer's request. This means updating the SQL database to reflect the remaining quantity. Once the update goes through, bamazon shows the customer the total cost of their purchase.
The Node application called bamazonManager.js
. Running this application lists a set of menu options:
- View Products for Sale
- View Low Inventory
- Add to Inventory
- Add New Product
- Quit
If a manager selects View Products for Sale
, the app lists every available item: the item IDs, names, prices, and quantities.
If a manager selects View Low Inventory
, then it lists all items with an inventory count lower than 130.
If a manager selects Add to Inventory
, your app displays a prompt that lets the manager "add more" of any item currently in the store.
If a manager selects Add New Product
, it allows the manager to add a completely new product to the store.
Running bamazonSupervisor.js
lists a set of menu options:
- View Product Sales by Department
- Create New Department
- Quit
When a supervisor selects View Product Sales by Department
, the app displays a summarized table.
The total_profit
column is calculated on the fly using the difference between over_head_costs
and product_sales
.
There are two methods to download the repository.
Clone this repository, install dependencies, then run the project with the following:
> git clone [email protected]:artprofi91/MySQL-Bamazon.git
> cd MySQL-Bamazon
> npm install
Click here then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory and:
> npm install
Don't forget to change password in bamazonCustomer.js
, bamazonManager.js
and bamazonSupervisor.js
.