/catalog1

Primary LanguagePython

Catalog App

Description

This application provides a list of items within a variety of categories. The list of categories and items comes from Facebook Pages for Marketing. "Page type" (Local Business or Place, Company, Organization or Institution, ...) and "Category" from this Facebook page represents respectively "category" and "item" for this project.

This app is based upon:

A third party authentication system (Google and Facebook) is implemented to let users add, update and delete items.

This app implements also API endpoints with responses formatted in JSON.

This web app is a project for the Udacity Full Stack Web Developer Nanodegree. So, this application has been developed for an educational purpose.

Requirements

We assume that Flask, SQLAlchemy, SQLite and oauth2client are already installed in the virtual machine (VM).

Set Up and run the application

Please follow these steps to set up and run the application.

Download or clone the catalog-app repository under /catalog and move this directory under your /vagrant directory (like that: /vagrant/catalog).

Launch the Vagrant VM from inside the /vagrant folder with:

$ vagrant up
$ vagrant ssh

Then move inside the catalog folder.

$ cd /vagrant/catalog

Create and populate the database.

$ python data.py

Run the application.

$ python application.py

Open your web browser to this URL: http://localhost:8000

Screenshot

You should see something like this.

screen

API endpoints

Request Methods What you get
/catalog.json GET All categories with their items.
/v1/categories GET All categories with their items.
/v1/categories/category_name GET A specific category with his items.
/v1/categories/category_name/item_title GET A specific item.

License

The contents of this repository are covered under the MIT License.