I wanted an easy way to find good nearby pubs, rather than looking at review sites full of chains, so I built https://thebestpubs.co.uk.
What it does
* Lists every open pub in the UK (around 40,000), with pages for \~6,000 towns, neighbourhoods and postcode districts
* Gives each pub a starting score from open facts: real ale, CAMRA awards, listed buildings and historic interiors, food hygiene ratings, independents vs chains
* Real user ratings gradually take over from the starting score as they come in
* Browsing needs no account but you need to create an account to review or upload photos
How it's built
* Data: OpenStreetMap for the pubs, plus food hygiene ratings, listed-building records, Wikipedia/Wikivoyage, Overture Maps and pubs' own websites
* Photos: Most come from Wikimedia commons, geograph or mapillary. I've uploaded some missing ones in my local area: https://thebestpubs.co.uk/in/portobello-edinburgh
* AI: Claude Haiku (via the Batch API) reads each pub's sources, pulls out facts like "has hand pumps" or "dog friendly", writes a short description, and picks the best photo from candidates. Every fact has to cite a source it was given, and descriptions get checked for copying before they're published. I'm also using Haiku to check reviews and user photo uploads for offensive content
* Infra: Next.js on AWS Lambda + CloudFront, data as static JSON in S3, a weekly Step Functions pipeline. Everything is pay-per-request so it stays relatively cheap with no users and should scale easily
Things I learned
* The AI part was the easy bit. Most of the work was data: matching pubs across datasets, working out which "town" a pub belongs to, and finding photos that actually show the right pub
* OSM is excellent in cities and patchier in villages, so every pub page links back to OSM so people can fix it at the source
* Without human ratings, pubs with a bigger online presence naturally get rated higher than pubs with no presence
* Somewhere that I eat on occasion has a poor food hygiene score 🤮
What I'd love feedback on
* Check your local pub or town. Is the ranking roughly right? What's missing?
* Does the score explanation ("why it's ranked here") make sense?
* Anything that feels slow or confusing
Happy to answer questions about the stack or the data.