Inspiration

OmniGrub was developed to address the problem of having to check multiple review websites for the ratings of a restaurant. We came up with the idea of a simple Chrome extension that activates when you are on a specific restaurant on DoorDash. Once activated, it will query the API's and display the Yelp and FourSquares ratings of this restaurant directly on the DoorDash page. We chose DoorDash specifically because many of their restaurants carry a high rating even though they may have a much lower rating on other platforms. Artificially high ratings encourage users to order from these restaurants. FourSquare and Yelp on the other hand are completely impartial.

What it does

It uses your location and the name of the restaurant on the page to query FourSquare's places API, once we get the results, we manipulate the HTML on the page to show the reviews and give a link to FourSquare's website if they want to verify these reviews themselves.

How we built it

Researching the various calls that could be made with the Yelp Fusion API and FourSquare Places API, we determined that in order for us to get the FourSquare and Yelp rating of a restaurant off of DoorDash we needed to extract the user's address and the restaurant's name. Afterward, we sent this information to the script in charge of making the API calls. Within this script, it takes all the parts of the information passed on and matches it to the search queries required to make the API call. Then once we had the API JSON object, we used DOM manipulation to manually insert some stylized HTML based on the results.

Challenges we ran into

A big blocking point was hiding the private API key. Anyone who goes into our public github or uses inspect element can see the code we used. So we created a workaround using AWS lambda that allows us to query a remote server for our API key in a secure way.

Accomplishments that we're proud of

Getting it published to the chrome store and reaching nearly 50 active users with no marketing has been an incredibly humbling experience for both of us. The day Google approved our application for the store was incredible.

What we learned

When fine tuning the results of the Chrome extension, we learned about the various ways we could call out to FourSquare Places and Yelp Fusion APIs. In one method, we had the ability to make a general API call to get all nearby restaurants. In another method, we had the ability to retrieve the exact restaurant but only if we were able to pass on the exact address as a search parameter. Additionally, we learned how to make two API calls simultaneously retrieve the information that we needed from both, and have the Chrome extension only continue with its script once both API calls succesfully finished.

We also learned how to make and publish chrome extensions, a super interesting process made easy by Google's great documentation. Finally, this was our first time using AWS Lambda, a complicated but great platform.

What's next for OmniGrub

We're looking at improving the querying to get better results first and foremost, then creating some marketing to bring more awareness.

Built With

Share this project:

Updates

posted an update

Update Notice

Search Optimization (cont'd) - 101222

Instead of searching for the restaurant based on a user's address, we now search for it by the exact address found in the title element Address extraction code before:

  var address = document.querySelectorAll(".gUHrYg");
  var addressText = address[1].innerHTML;

Address extraction code now pulls the text content from the title element which requires a function to remove all extra text content that was surrounding it.

Log in or sign up for Devpost to join the conversation.

posted an update

Update Notice

Search Optimization - 101222

Searches optimized for restauraunts around the U.S. Prior to this update, the extension was optimized for NY restaurants as a result of the following lines: This line is responsible for indicating the zip code of the restauraunt when searching for it via FourSquare Places API. It uses the first match found on another platform's API

let zipFour = results.yelpResult.businesses[0].location.zip_code;

This line is responsible for getting a matching restaurant. But it had a permanently keyed in location query for NY.

const response = await fetch(`${urlYelp}location=${msg.location},NY&term=${msg.store}`

At first, the address of the restaurant was searched by the user's address which was only a street address. This is why the state of NY was hardcoded into the API call. It has now been determined that the exact address of a restaurant is available in the DOM tree even though a user's required to click 'More Info' to view the address which results in an exact match regardless of what state the user is in.

Log in or sign up for Devpost to join the conversation.