Skip to content

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database.

Notifications You must be signed in to change notification settings

visheshbanga/Item-Catalog

Repository files navigation

Item Catalog

Introduction

This is a python module that queries a database for items on restaurant menus and then dynamically generates complete menus in the form of web pages and API endpoints. This module uses Flask framework to develop the application. Users can edit or delete items they've created. Adding, deleteing and editing items require oauth2 authorization.

Instructions

  • Setup

    • Install Git

      If you don't already have Git installed, download Git from git-scm.com. Install the version for your operating system.
      On Windows, Git will provide you with a Unix-style terminal and shell (Git Bash). (On Mac or Linux systems you can use the regular terminal program.)

    • Install Vagrant and VirtualBox

  • Fetch the Source Code and VM Configuration

    • Clone the Item Catalog repository to your local machine:
    • git clone https://github.com/visheshbanga/Item-Catalog

      Windows: Use the Git Bash program (installed with Git) to get a Unix-style terminal.
      Other systems: Use your favorite terminal program.

  • Set up a Google Plus oauth application

    • Go to https://console.developers.google.com/project and login with Google.
    • Create a new project.
    • Select "API's and Auth -> Credentials -> Create a new OAuth client ID" from the project menu.
    • Select Web Application.
    • On the consent screen, type in a product name and save.
    • In Authorized javascript origins add: http://0.0.0.0:5002
    • Click create client ID.
    • Click download JSON and save it into the root director of this project.
    • Rename the JSON file "client_secrets.json"
  • Run the Virtual Machine

  • Using the terminal, change directory to project directory, then type vagrant up to launch your virtual machine.

  • Running the App

    • Once it is up and running, type vagrant ssh. This will log your terminal into the virtual machine, and you'll get a Linux shell prompt.
    • Change directory to the /vagrant directory by typing cd /vagrant. This will take you to the shared folder between your virtual machine and host machine.
    • Type ls to ensure that you are inside the directory that contains project files.
    • Now type python database_setup.py to initialize the database.
    • Type python lotsofmenus.py to populate the database.
    • Type python project.py to run the Flask web server. In your browser visit http://localhost:5002 to view the catalog app.

About

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published