This is a simple catalogue app created using Flask, and was created as part of the Udacity Full Stack Nanodegree program. By default it is set up to handle Restaurants and their matching menu items, but could be adapted to any kind of catalogue. The app has Google and Facebook oauth integration, CSRF protection, seperate views for authenticated users, and a JSON/XML API.
- Clone to your local machine:
git clone https://github.com/eldonuts/Udacity-FSND-P3-Restaurants.git
- Alter the config.py file to your specifications (you will want to change the secret key before deploying live)
- Run:
python setup.py
- To start the app you just need to run:
python run.py
- That's it, you're good to go (without auth), if you want some test data please look below.
If you wish you generate some test data, I have added a script to grab the top 20 restuarants for NYC (from Zomato) and populate them with a bunch of random menu items. If you wish to try this out, just sign up for a Zomato API key here and add this line to a new file settings.cfg (in restaurants dir): ZOMATO_API_KEY = 'xxxx'
(where xxxx is your new key).
Once you're ready you can simply run: python test_db_populate.py
To get logins working you will need to sign up for OAUTH keys for Facebook and Google, or alter the app to remove/add others at your discretion.
- Facebook Developers Page (we are using version 2.5)
- Google Developers Page (implementation type here)
Once you've gone through the instructions and gotten the keys, you need to download them in JSON format and save them to the secrets folder (by default set to /secrets), and call them facebook_client_secrets.json and google_client_secrets.json respectively.
- United Bootstrap Theme
- Login views based on content from the FSND course, altered to fit requirements.