Brew Watch
View projectformulae.brew.sh has no "recently changed" feed — its API (/api/formula.json, /api/cask.json) is a full snapshot of every package, with no last-updated timestamp. The only reliable way to detect what's new or updated is to snapshot on a schedule and diff against the previous run.
Brew Watch does exactly that: a Cloudflare Worker cron job fetches the full formulae + cask snapshots on a schedule, diffs them by name against the last known state, and writes the results to D1. The site itself just reads that history back.
Architecture
- Astro with the
@astrojs/cloudflareadapter, deployed as a Cloudflare Worker - D1 database with two tables:
packages(current known state per package) andchanges(an append-only log of new/updated events, which is what the homepage actually reads from) - A Cron Trigger runs the fetch-diff-write job on a schedule (e.g. every 6 hours); the first-ever run seeds
packageswithout logging changes, so the initial snapshot doesn't show up as thousands of "new" packages - The frontend is a single server-rendered Astro page querying D1 directly — no auth, no build-time data fetching, no client-side JavaScript. It lists newly added and recently updated packages with an All/Formulae/Casks filter, linking out to formulae.brew.sh for each entry
What I learned building it
The absence of a changelog API from Homebrew's own package registry was the interesting constraint — it turns a "just call an API" idea into a small stateful system with its own diffing logic and history log.
Structuring the data as an append-only changes log alongside a packages state table meant the homepage never has to recompute anything — it just reads a pre-diffed history, and the cron job is the only writer.