Skip lines, not lunch
Built by Phil Dornfeld, Pat Dalberg, Vishal Atmakuri, and Ben Johnson
- Concept
- Stack
- Ideas for Extension
NomNow 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.
Our schema has two tables: restaurants and reports. They look like this:
google_id (primary) | name | website | longitude | latitude |
---|---|---|---|---|
ChIJz7o2jgm1RIYRi_5Y7JfjH0A | Perry's Steakhouse & Grille | https://perryssteakhouse.com | -97.74351200000001 | 30.269557 |
id (primary) | google_id (foreign) | wait_time | created_at |
---|---|---|---|
1 | ChIJz7o2jgm1RIYRi_5Y7JfjH0A | 15 | 2015-04-20 10:10:35 |
The server is comprised of two files.
This is where the express server is created. It serves up static files at '/' and accepts GET and POST requests at '/wait'.
This is where the functions that have the SQL queries live (we are not using an ORM). These functions are called from app.js.
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.
We used the angular-bootstrap
library to create the modal.
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.
Write a cron job that prunes stale data. The data will be relevant only for an hour or two.
Make the client auto-refresh when someone else submits data.
Ideas: OpenTable, Yelp, FourSquare
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.
Not for the faint of heart.