My Android and iOS app to allow users to find hygiene ratings of establishments (restaurants, bars, shops etc).
Reasons & Purpose
Similar existing apps had poor UI and didn’t work well. I was also interested in the average rating for the largest chains in the UK. Around the same time, I had an interest in learning more about MongoDB and React Native, thus this seemed like a good fit.
MongoDB is used to store information about each establishment: location, hygiene ratings, last inspection etc. The main reason for using Mongo was that I needed a high-performant persistence store for geospatial queries.
Spring Boot is used to provide an API and backend for the mobile app:
- Geospatial queries: the user’s location is sent, along with any search criteria, which is converted into a Mongo query using the Spring Data framework. Nearby establishments are sorted by distance and sent back.
- Geo-encoding: the existing geo-encoding data for establishments, provided by the Food Standards Agency, is inaccurate, thus addresses are geo-encoded using a third-party service. The user can set their location using GPS (by default), or provide free-flow text (such as a city or post-code). In the latter, the text is geo-encoded and requests are cached using Spring Cache, with LRU (least recently used) storage.
- Push notifications: users can select their favourite establishments, and receive a notification on their device when an establishment inspection changes. This is done using Google Firebase.
- Telemetry: data is sent back by the mobile app: purchases made, purchases restored and in-app errors.
- Bulk processing: data is pulled from the Food Standards Agency website daily, with the average rating for the top 100 largest chains calculated.
This allows writing logic and UI once, shared across both Android and iOS. A lot of configuration is still required for each individual platform (SDKs/libraries, build process, push-notifications, permissions etc).
Adverts are displayed to the user, with an in-app purchase available for premium to remove them.
To see the latest screenshots: click the download buttons at the top of the page, which will show the app store listing.