Bamazon is a Node.js CLI web store that provides views for shoppers, managers, and admins. It uses MySQL to store data.
This project demonstrates:
- Inquirer npm package
- MySQL npm package
- MySQL queries
- Modular functions
- Arrow functions
- User input validation
Shoppers can run node bamazonCustomer.js
to see the full inventory. They can then select an item and enter the desired quantity. If there is sufficient quantity, the inventory will be decremented accordingly and the shopper will be notified of their order total. If there is insufficient quantity, the shopper will be notified and returned to the inventory to list.
Managers can run node bamazonManager.js
to see a list of manager options. Managers can see full invenotry, see a list of items with a quantity lower than five, update the quantity of an item, and add new items.
Supervisors can run node supervisorManager.js
to see a list of supervisor options. Supervisors can see the total profit per department (overhead costs subtracted from sales) and add new departments.
- Fork or download this repository.
- Create a MySQL database using
bamazonDB.sql
. - Update
modules/db_connection.js
with your database information. - Run
npm install
to install the Inquirer and MySQL packages. - Access the views by using the following commands:
node bamazonCustomer.js
,
node bamazonManager.js
, ornode bamazonSupervisor.js
.