Code Monkey home page Code Monkey logo

glamorous-gerbils's Introduction

NomNow 2.0

Skip lines, not lunch

Version 2.0 offers the following updates, bug fixes, and features:

  • Map can be re-centered based on Search Box = search for address or establishment name
  • Restaurants provided in the "Report Wait Times" feature are the five closest to the center of the map
  • 12,000 test data reports over 20 restaurants generated for demonstration purposes
  • NomNow2.0 integrates with Tropo API. This calls a restaurant, records a response, transcribes the response, parses the wait time integer, and stores the information as a new report in the database.
  • User can view a popup graph of historical wait times for any given hour for an individual restaurant. An algorithm parses when past wait times were reported and averages the reported times for each hour. Highcharts was used to generate the graph based on these results.

Contributors

Adam Guerra [Adam's Github profile] (https://github.com/adamlg)

Karen Lewis Karen's Github profile

Josh Benson Josh's Github profile

Stephanie Foskitt Stephanie's Github profile

NomNow 1.0 information:

View the deployed app

Built by Phil Dornfeld, Pat Dalberg, Vishal Atmakuri, and Ben Johnson

Table of contents

  1. Concept
  2. Stack
  3. Ideas for Extension

1. Concept

NomNow2.0 is a web application for crowdsourcing wait times at restaurants. When at a restaurant, anyone can submit a wait time, and all the reported wait times are pooled and used to create a map which shows the average reported wait time for each restaurant.

2. Stack

Database: mySQL

Our schema has two tables: restaurants and reports. They look like this:

restaurants

google_id (primary) name website longitude latitude
ChIJz7o2jgm1RIYRi_5Y7JfjH0A Perry's Steakhouse & Grille http://perryssteakhouse.com -97.74351200000001 30.269557

reports

id (primary) google_id (foreign) wait_time created_at
1 ChIJz7o2jgm1RIYRi_5Y7JfjH0A 15 2015-04-20 10:10:35

Server: Node with Express

The server is comprised of two files.

app.js

This is where the express server is created. It serves up static files at '/' and accepts GET and POST requests at '/wait'.

db.js

This is where the functions that have the SQL queries live (we are not using an ORM). These functions are called from app.js.

Client: Angular + Bootstrap

Angular is taking care of the routes. When someone tries to report a wait, the client asks them for their location, and then it uses that to find restaurants where they may be.

Modal

We used the angular-bootstrap library to create the modal.

Googele Maps API + Google Places

We used the Google Maps API to generate the map and the markers, and we used the Google Places libary to get the info about the places.

3. Ideas for Improvement/Extension

Delete Old Data

Write a cron job that prunes stale data. The data will be relevant only for an hour or two.

Reactive Updating

Make the client auto-refresh when someone else submits data.

Integrate with other APIs

Ideas: OpenTable, Yelp, FourSquare

Filter Data by Location

Right now by default we serve up every report in the database when we create a map. Use the GPS of the client asking and dynamically serve up a map of only that city.

Integrate with Oculus Rift

Not for the faint of heart.

glamorous-gerbils's People

Contributors

phillydorn avatar vishalatmakuri avatar pat-dalberg avatar adamlg avatar bjmfactory avatar karmakettle avatar joshuabenson avatar sfoskitt avatar

Stargazers

 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.