1. 9

Hi Lobsters,

I’ve been teaching lili2311 development beyond just the basics of frontend so we needed a project to work towards and ended up with this! It’s nothing too complex but it’s really helped her grok some backend stuff and she implemented the entirety of the Deliveroo handling stuff just recently.

It’s a browser extension which displays food hygiene ratings from the Food Standards Agency on popular UK food delivery websites: Just Eat, Hungry House & Deliveroo. You can see it action here: 1, 2 & 3.

There’s 3 main components: the core & API, the scraper and the extension itself. We scrape the sites in question, then do the lookups ourselves in a number of different ways and record the results. We found the other solutions quite slow as they worked client side and relied on doing one lookup per restaurant directly to the FSA’s API. This meant that on some Just Eat listing pages with 200-300 restaurants, your browser would basically be caning the server powering the FSA API which didn’t result in a great experience. The components:

  • The scraper handles scraping the sites so that we know about all the restaurants on there before you do, that bit is written in Python with thanks to the wonderful Scrapy project. It writes its results to Amazon S3.

  • The core picks up the scraped results from S3 and does the lookups with the FSA, storing the results in with Postgres. This bit was written in Elixir using the Phoenix framework for the API.

  • The extension is written in ES6/ES2015 JavaScript and is open source and viewable on github at munchdb/munch-browser-extension. It currently only supports Chrome & Opera, but we’re looking at Firefox support now.

We’re both happy to answer any questions :)

  1. 4

    Such a great extension. I used to work with /u/lili2311 - you guys really did an awesome job on this.
    Beautiful design and quite frankly, now, a necessity when using such services. Surprising to think that I hadn’t even thought about it before; but this is the sort of information that the guys running the services should be providing in the first place!

    1. 1

      Cheers! Yeah, they really should be. The cynic in me suspects the reason they don’t is monetary, given how many badly rated places are at the top of their listings.

      1. 2

        I think you hit the nail on the unfortunate-head there.
        Keep up the good work!