Website Change Tracker
Scheduled Browser Rendering snapshots with R2 storage and D1 diff history
Register URLs for on-demand and Cron-scheduled snapshots. Rendered text is stored in R2, content hashes and diff summaries in D1. View change history per tracked URL.
Features
- POST /track - register a URL
- DELETE /track?url= - unregister
- GET /history?url= - snapshot diff history
- Scheduled handler every 30 minutes for tracked URLs
API Reference
POST /track
Register a URL for scheduled tracking.
{ "url": "https://example.com" }DELETE /track?url=
Unregister a tracked URL.
GET /history?url=
Return snapshot history with content hashes and diff summaries.
Error Codes
400-INVALID_URL,INVALID_BODY404-NOT_TRACKED
Use Cases
- Monitor marketing or legal pages for unexpected content changes
- Learn R2 + D1 + Cron + Browser Rendering together
- Prototype change-detection alerts before production hardening
Limitations
- Requires D1, R2, Browser Rendering, and Cron bindings
- Diff summary is line-based heuristic, not semantic
- 30-minute cron interval; not real-time
Deployment
Configure bindings
D1 DB, R2 SNAPSHOTS, Browser BROWSER, cron */30 * * * *. Run D1 migrations before deploy.
Test your deployment
See the experiment README for curl examples.
Local Development
cd apps/experiments/website-change-tracker
npm install
npm run devConfiguration
D1 DB, R2 SNAPSHOTS, Browser BROWSER, cron */30 * * * *. Run D1 migrations before deploy.