Giter Site home page Giter Site logo

rachelspdo / build-restaurant-application Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19.43 MB

This project is a RESTful web application utilizing the Flask framework which accesses a SQL database that populates categories and their items.

Python 58.26% CSS 5.05% HTML 36.69%
flask-application oauth sql-database python

build-restaurant-application's Introduction

Build-Catalog

This project is a RESTful web application utilizing the Flask framework which accesses a SQL database that populates categories and their items. OAuth2 provides authentication for further CRUD functionality on the application. Currently OAuth2 is implemented for Google Accounts.

In This Repo

This project has one main Python module application.py which runs the Flask application. A SQL database is created using the database_setup.py module. The Flask application uses stored HTML templates in the tempaltes folder to build the front-end of the application. CSS/JS/Images are stored in the static directory.

How To Install

  1. Install Vagrant & VirtualBox
  2. Download or clone Udacity Vagrant file (https://github.com/udacity/fullstack-nanodegree-vm)
  3. Download this repository
  4. Go to catalog inside Vagrant directory and place unzip file from step 3 here
  5. Open Terminal
  6. Go to Vagrant /cd vagrant directory, run vagrant up
  7. Log into Vagrant VM by run vagrant ssh
  8. Run cd /vagrant/catalog
  9. Setup application database python by running python database_setup.py
  10. Run application python application.py
  11. Access the application locally using http://localhost:5000

Google Login

  1. Go to Google Dev Console (https://console.developers.google.com/)
  2. Sign up or Login if prompted
  3. Go to Credentials
  4. Select Create Crendentials > OAuth Client ID
  5. Select Web application
  6. Enter name 'Restaurant Menu Application'
  7. Authorized JavaScript origins = 'http://localhost:5000'
  8. Authorized redirect URIs = 'http://localhost:5000/login'
  9. Select Create
  10. Copy the Client ID and paste it into the data-clientid in login.html
  11. On the Dev Console Select Download JSON
  12. Rename JSON file to client_secrets.json
  13. Place JSON file in the catalog directory
  14. Run application python application.py

JSON Endpoints

  1. Restaurant JSON: /restaurant/JSON - Displays all restaurants.

  2. Menu JSON: /restaurant/int:restaurant_id/menu/JSON - Displays all items in menu

  3. Items JSON: /restaurant/int:restaurant_id/menu/int:menu_id/JSON/ - Displays specific item in the menu

build-restaurant-application's People

Contributors

rachelspdo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.