The Item-Catalog is a project written for Udacity's Full Stack Developer Nanodegree Program.
In this project, the webpage will display a menu and an item pane populated with food items with its representative food category. You have the option of adding new items to a particular food category, and edit/delete food items if you are the creator of that object (or have admin privileges). To create/edit/delete a category, you must have admin privileges. For the purpose of this evaluation, I have created a function to allow you to alternate your privilege status (See Usage.)
Please ensure your system contains the following software prior to using this project:
- Virtual Box
- Custom Vagrant file from Udacity.com
To obtain a copy of this project download the entire contents of this repository in a .zip file onto your desktop or folder of choice and unzip it to your vagrant folder. Below are also the required links that you will need to download and install for the requirements.
-
Open terminal or command prompt and navigate to your Vagrant folder.
-
Enter
vagrant upto initially set up your virtual machine. -
Once Vagrant has finished setting up, enter
vagrant ssh. -
Navigate to your vagrant folder inside vagrant using
cd /vagrant/. -
This project has already been setup with a database. If you want to delete the database and recreate it, move
main.dbto the trash. Runpython database_setup.pyfor a clean database orpython addDB.pyfor a populated database. -
Enter
python /vagrant/main.pyto run the server. -
To view the webpage, visit: localhost:5000.
- To alternate between user and admin privileges, please sign into your Google Account first, then after successful completion visit: localhost:5000/status/
- To serialize data visit:
- categories:
localhost:5000/main/JSON - items:
localhost:5000/main/<int:category_id>/item/JSON - specific item:
localhost:5000/main/<int:category_id>/item/<int:item_id>/JSON - users:
localhost:5000/user/JSON
Please use this project at your own risk. I, J. Ye., am not responsible for any damage(s) that the end-user's computer may experience while using this project.