Skip to content

amrod/catalog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recipe Catalog App

This Flask application provides a means to cataloging recipes, grouped by cuisine. It integrates third party user registration and authentication, provided by Google. Authenticated users have the ability to post, edit, and delete their own items.

Setup

  1. If using Vagrant:
  2. Install Vagrant and VirtualBox.
  3. Launch the Vagrant VM. A Vagrantfile and accompanying shell script are provided to setup all necessary software.
  4. If not using Vagrant, you can just run the provided pg_config.sh script to setup all necessary software.
  • Optional: Run the db_init_test_data.py script to populate the database with some test data
  1. Obtain OAuth 2.0 client credentials from the Google Developers Console. Details here.
  2. Download the client_secrets.json file from the Google Developer Console and store it under catalogapp/instance/
  3. Run run.py to start the local Flask development server. By default, the application is available on port 5000.

Using the Recipe Catalog

To make any changes (adding and removing recipes) you must first login. The application automatically creates your local user profile upon authorizing with Google the first time.

To sign-in, click on the link on the top-right corner of the page.

Adding Recipes

After you sign-in, two new buttons appear on the navigation bar: Add Recipe and Add Cuisine. At least one cuisine type must be added before adding a recipe.

API Endpoints

To access the recipe data in JSON format, use the following URLs:

  • /recipe/JSON

    • Returns all recipies in the catalog.
  • /recipe/<recipe_id>/JSON

    • Returns the recipe with ID <recipe_id>.
  • /cuisine/JSON

    • Returns all the cuisine types known to the catalog.
  • /cuisine/<cuisine_id>/JSON

    • Returns all the recipes of corresponding to the cuisine with ID <cuisine_id>.

RSS Feed

The RSS feed only lists the 15 recipes most recently added to the catalog.

  • /recipe/recent.atom

About

Udacity Full Stack Nanodegree Project #3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published