An Udacity Full Stack Web Developer Nanodegree project developed by Tremaine Kirkman.
This web application provides an interface to browse, update, and delete items from a catalog organized by category. Authentication is provided via the Google Sign-in API, and user CRUD access is limited to their own catalog items.
- User Registration via Google Sign-in API.
- CRUD (Create, Read, Update, Delete) functions using SQLAlchemy and Flask.
- REST API providing access to database items and categories, provided as JSON.
Download can be found here
VirtualBox is software that runs the Virtual Machine (VM) that will be used to run this program. Download here, and install the platform package. Note: you do not need the extension pack, SDK or to launch the program
Vagrant configures the VM and establishes a shared directory between the VM and your local filesystem. Download here, then Clone or download the Vagrant VM configuration file from here. Open the directory and navigate to the vagrant/
sub-directory and then run
vagrant up
to set up the VM. Note: this process should take a while.
When finished run
vagrant ssh
to log in to the virtual machine. For more information, see the Vagrant documentation here.
Type cd /vagrant/
to navigate to the shared repository, and then download or clone this repo.
sudo python3 -m pip install --upgrade flask
To setup the database run:
python3 database_setup.py
Next, populate the database with starter values:
python3 catalog_database.py
Run:python3 app.py
, and then open http://localhost:5000/
in a Web browser, and enjoy!
In case the app doesn't run, double check a few things:
- You have run
python catalog_database.py
before running the application. This is an essential step. - You have at least python 2.7 installed.
- The latest version of Flask is installed.
This project implements a basic REST API that exposes several JSON endpoints to return category & item data from the database. Below is a list of all API endpoints included in the project.
This endpoint returns a list of all the item objects in the catalog database. Found at:
/api/catalog.json
Returns a specific item object from the database. Requires the correct catalog_id & item_id parameters
/api/categories/<int:category_id>/item/<int:item_id>.json
Returns a list of all category objects in the database
/api/categories.json