Skip to content

A Web Application to Display and Manage Restaurants and Menus

Notifications You must be signed in to change notification settings

sarithk/Restaurant-Menu-OAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restaurant Menus

A web application that displays restaurants and menus allowing the user to login and manage restaurant menus

This application interacts with a sqlite database using SQLAlchemy, an Object-Relational Mapping (ORM) layer. The CRUD operations and web page templates are handled using Python Flask framework. OAuth 2.0 framework allows users to securely login to the application using Google+ Sign-In or Facebook Login so users can create restaurant menus that are viewable by everyone but only modifiable by the original creator

Version of Python used: 3.6.1

Contents

Project files :
database_setup.py - Python program file that creates the sqllite database and related tables.
lotsofmenus_new.py - Data that can be loaded in restaurant and menu tables.
project.py - File that runs the web application.
static and template folders with images, stylesheet and HTML templates.

Installation

Install Python

Install VirtualBox
This project makes use of Linux-based virtual machine (VM). Vagrant and VirtualBox are used to install and manage the VM. VirtualBox is the software that runs the virtual machine. You can download it from virtualbox.org. Install the platform package for your operating system.

Install Vagrant
Vagrant is the software that configures the VM and lets share files between your host computer and the VM's filesystem. Download it from vagrantup.com. Install the version for your operating system.
From your terminal, inside the vagrant subdirectory, run the command vagrant up. This will cause Vagrant to download the Linux operating system and install it. This may take quite a while. Then log into it with vagrant ssh.

Download the files into the vagrant directory, which is shared with your virtual machine.

Operating Instructions

To Start the restaurant menu application:

  1. Open the command line tool
  2. Inside the vagrant subdirectory(cd /vagrant), navigate to the directory containing downloaded files.
  3. Run python3 database_setup.py to create the sqlite database and corresponding tables
  4. To load the data into tables, run the lotsofmenus.py file.
  5. Run python3 project.py to run the application.
  6. Open your web browser and connect to localhost:5000. Restaurants page is loaded with restaurant and menus data if available and with an option to login
  7. Authenticate using Google or Facebook Sign in if you wish to create, edit restaurants and their menu items.