Week 12 Homework
Simple command line storefront with two functionalities:
- Customer
- allows user to view and purchase products
- Manager
- allows user to view, update, add, and remove products
To run this application, you will need MySQL and Node JS installed on your computer.
MySQL Database Setup (Instructions by angrbrd)
If you do not have MySQL database already set up on your machine, visit the MySQL installation page to install the version you need for your operating system. Once you have MySQL installed, you will be able to create the Bamazon database and the products table with the SQL code found in bamazon.sql. Run this code inside your MySQL client (like Sequel Pro or MySQL Workbench) to populate the database, then you will be ready to proceed with running the Bamazon customer and manager interfaces.
Once you have the Bamazon database set up, run these commands in the command line:
git clone https://github.com/chzwzrd/Bamazon.git
cd Bamazon
npm install
node bamazonCustomer.js
Note: type node bamazonManager.js
to access the manager portal
The customer interface:
1) Presents the customer with a table of all available products
2) Asks for the ID of the customer's desired product
3) Asks how many items the customer would like to purchase
4) Confirms order & updates product inventory in database
The manager interface presents a list of actions:
1) View Products for Sale
Displays a table of all active products available to the customer
2) View Low Inventory
Displays a table of all products with fewer than 5 items in stock
(or a message that there are no low-stock items)
3) Add to Inventory
Allows the manager to add more items to a product's inventory
4) Add New Product
Allows the manager to list a new product that is available for purchase
5) Remove A Product
Allows the manager to remove a product from the store
Melodie Chi (Inspiration for this README is credited to: angrbrd, kellymersereau, and ramirolpz55)
Contributing (Instructions by ramirolpz55)
To contribute to this application:
- Fork the repo
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
© 2017 UCI Coding Bootcamp | Melodie Chi