GitXplorerGitXplorer
J

Pitt-Menu

public
0 stars
0 forks
23 issues

Commits

List of commits on branch master.
Unverified
644f1e91e039fec931daa3cd48af4e7e6668b6df

SQL service database name updated.

committed 5 years ago
Unverified
a7b6c5c2b12dd14834de6048a161d8bd12b8baf5

Updated python processor so it uses dotenv

committed 5 years ago
Unverified
954c854533b0523e40827210ff057da64fbc1d96

Updated Readme

committed 6 years ago
Unverified
24f00dbfae4897a6ac471fbd4c85f7f746956569

Updated ReadME Table of Contents

committed 6 years ago
Unverified
541b9c723336a7045e30d34875d27662a3e465f7

Updated Readme; Fixed button width issue.

committed 6 years ago
Unverified
b4b7dc42c3a2c14a6e3e8840df69e9709a17360e

Image Upload Loader

committed 6 years ago

README

The README file for this repository.

Pitt-Menu

Repo for my undergraduate capstone project. The project is a fullstack application that parses a PDF of the menu from my school's dining hall, and uploads it to a normalized database. The data is then used in a Node.JS REST API and delivered to multiple front-end apps. The front end apps include a mobile and desktop friendly React App, as well as a Google Home Action for getting the lunch and dinner menu for the day.

Table of Contents

Python PDF Processor

This part of the project is found under the File Processor folder and is written in python. It downloads the university menus from a source link and differentiates between lunch and dinner menus. It then reads the items from the menus and uploads them to the MySql database.

To Run, install the dependenices using:

pip3 install [dependency]

Then:

python3 FormatPdf.py

Python Dependencies

MySQL Database

Run the SQL script in a database you have setup.

Here is the ER Conceptual and Logical diagrams for the database.

Conceptual

diagram

Logical

diagram2

Node.JS REST API

the endpoint for the Node.JS REST API is https://api.joelaustin.net.

The requests that you can make the API are as follows.

Menu for a specific date

GET https://api.joelaustin.net/menu/[DATE]?type=[TYPE]

Date: e.g. '2019-02-20

Type: e.g. 1 (dinner) OR 0 (lunch/breakfast)

Data for a specific item by item ID

GET https://api.joelaustin.net/item/[ITEMID]

Item IDs range from 1 to however many items are in the database.

Rating for specific item

Honestly, I don't know why i didn't just include this with the one above. 1 request > 2 requests.

GET https://api.joelaustin.net/ratings/[ITEMID]

Google Actions Webhook

This is a required endpoint for Google Assistant Actions and Dialogflow.

POST https://api.joelaustin.net/google

Invoking the Python Processor

When a GET request is made to this address it creates a child process that runs the python script that reads the PDF. This is automatically called every monday at 11AM EST.

GET https://api.joelaustin.net/invoke

React Web App

The Pitt Menu Web Application is built using React. It uses a mix of Semantic UI and my own styles and components. It can be visited below.

https://pitt-menu.joelaustin.net

System Architecture

Below is a diagram that outlines the system architecture for Pitt Menu. The data is stored in a mix of MySQL and Google Firebase. Firebase Mostly handles the user authentication.

test `

About the Developer

My name is Joel Austin, I am a developer from the University of Pittsburgh.

Please visit my Website at http://JoelAustin.Net