The Item Catalog project is the second project in Udacity's full stack web development nanodegree program. The task was to build an application that provides a list of items within a variety of categories, as well as provide a user registration and authentication system. Next we added a search functionality that allows users to look for search for items or categories within the Item Catalog. We also connected the search to Wikipedia with the help from the MediaWiki API and added a feature that allows logged-in users to add wikipedia content as a category or item in the Item Catalog.
- Vagrant and VirtualBox to manage our VM.
- Python
- Flask
- SQLite
- oauth2client.client module to handle authentication and authorization via Google and Facebook
- Flask-limiter to handle limitation of API requests
- marshmallow-sqlalchemy to handle (de)serialization
- To get started, install vagrant and VirtualBox. You'll find a detailed guide for installing here.
- Cd into the vagrant directory and create a folder called catalog
- Download all the files from the catalog repository and put them into the catalog directory.
- To enable login with Google via the Item Catalog app, please visit console.developers.google.com and create a new project. Download the client secret file (JSON) from that project, rename it to
client_secrets.json
and store it in the catalog directory. See detailed instructions via Udacity's instructional video: Step 1 Create Client ID & Secret - To enable login with Facebook via The Item Catalog app, please register a new app with Facebook. Store the app_id and app_secret in a new file that you call
fb_client_secrets.json
, and save the file in the catalog directory. See detailed instructions via Udacity's instructional video: Registering your App with Facebook - Go to templates in the catalog directory and open login.html in a text editor. Replace the value of the
client_id
with the client_id of your newly created project and replace the value of theappId
with your newly create Facebook appId. - Start up the VM and login by using the commands
vagrant up
followed byvagrant ssh
. - On your virtual Linux machine, cd into /vagrant/catalog and use the command
python views.py
to run the webapp. - Open your favorite browser and go to localhost:8000
- Use the catalog to browse categories and items and login with Facebook or Google free of charge to create, edit or delete categories and items.
- To make use of the Catalog API, create a free user via
POST http://localhost:8000/api/users
- See API documentation at http://localhost:8000/API/
- To close the connection from the command line press
ctrl + c
, logout of the VM with the commandctrl + d
and shutdown your VM with the commandvagrant halt
.
- Udacity provided the training, review and feedback