Bamazon App is a Node.js app that allows users to manipulate a mock store and inventory within the command line; the associated data is stored in a MySQL database.
This app has a three-part structure, providing access to the store's products and/or departments in the form of a user's choice to act as either Customer, Manager, or Supervisor.
By typing node bamazonCustomer.js
, a user is shown a table of the current products for sale and asked for the Item ID and desired quantity of an item.
Typing node bamazonManager.js
shows the user a list of several Manager-role options from which to select.
VIEW PRODUCTS FOR SALE
displays a table of the entire inventory, with VIEW LOW INVENTORY
presenting the user with items having counts lower than five:
A user can choose ADD TO INVENTORY
to increase the count of a specified item:
Finally, a Manager-role user is able to use ADD NEW PRODUCT
to create a new item to add to the inventory:
Entering node bamazonSupervisor.js
into the CLI will provide the user with a list of the total profits from each of the store's departments, as well as give the user the ability to create new departments using the list option CREATE NEW DEPARTMENT
:
This Bamazon app is dependent on multiple modules, packages, applications, and technologies, incorporating:
- Node.js, the CLI
- MySQL Workbench, for viewing and updating database tables
- SQL, the language used for interacting with the database
- mysql, a Node package for connecting and making queries to the database
- Inquirer.js, a package for the CLI prompts and capturing user input
- cli-table, the package used for the table formatting