Skip to content

Repository files navigation

Catalog

Overview

This is the fourth Back-end developer Udacity nanodegree project.
The project is a catalog app, with some json end points.
Authentication is provided by Facebook using OAuth
Items are classified by categories.
You can create, edit and delete your own Items when you is logged.

Setup Project

Install VirtualBox and Vagrant:

  1. Download Virtualbox Here

  2. Download Vagrant Here

  3. If you is a back-end developer nanodegree student, you can Download the Vagrant File with the configurations in This Link
    If not Download or Clone this repository

Launching the Virtual Machine

  1. Launch the Vagrant VM inside Vagrant sub-directory in the downloaded fullstack-nanodegree-vm repository using command:

    $ vagrant up

  2. Then Log into this using command:

    $ vagrant ssh

  3. Change directory to /vagrant and look around with ls.

Setting up the enviroment

  1. Download the content of this current repository, by either downloading or cloning it from Here

  2. If you cloned the content skip next step, jump to Setting up the database.

  3. If Download the content manualy from github you need to move the folder to vm vagrant folder.

  4. If You want you can check/install the requiriments using the command:

    `$ pip install -r requirements.txt

Facebook id with OAUTH

To authentication the app use facebook api with OAUTH. You need to configure it with you app_id and app_secret More infomation about it here

  1. Configure the app_id and app_secret on file fb_create_secrets.json and on /templates/login.html,
    this is provide ou your developer facebook when you configure the facebook api Here.
    You can make your changes on file fb_client_secrets.json.example and save as fb_client_secrest.json
file: fb_create_secrets.json

{
  "web": {  
    "app_id": "YOUR_APP_ID_HERE",  
    "app_secret": "YOUR_APP_SECRET_HERE"  
  }  
}

Setting up the database

  1. Access the repository folder inside the vagrant folder.

  2. run the database_setup.py using command:

    $ python database_setup.py

Populating Categories

The categorias are created on createCategories.py, we used shoes categories to make this project, but
if you want, you can edit this file and change de categories editing the file!
on Line 21.

# createCategories.py
categories = ("Women's Shoes", "Men's Shoes", "Casual Shoes",  
              "Dress Shoes", "Boots", "Canvas Shoes")

Caution

don't run createCategories.py, if you want to populate with fake item to test app.

  1. If you want populate only the categories run the file createCategories.py, if you want populate categories and fake items for test don't run createCategories.py, jump to step 2.

    $ python createCategories.py

  2. If you want create some cateogories and items for test the app, run the file lotofthingdb.py

    $ python lotofthingsdb.py

Running the the program

  • From the vagrant directory inside the virtual machine, go the repository directory and run the program using:

    $ python application.py

Acessing the app

API JSON endpoints

About

this is the fourth project udacity Back-end Developer nanodegree

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages