MN://WORK/ai-calories-tracker
AI Calories Tracker
A Bun monorepo pairing an Expo client with a Cloudflare Workers API, hardened around idempotent writes and honest health reporting.
- Bun
- Expo
- Cloudflare Workers
- TypeScript
$ trace "ai-calories-tracker"
- Expo client
- Workers API
- idempotent write
- health check
The problem
A food log is a write-heavy mobile app talking to an edge API, where a retried request must not create a duplicate entry and a broken maintenance job must not look healthy.
The constraint
Scheduled maintenance tasks have to fail independently, and the health endpoint has to report degradation explicitly instead of returning a green 200.
The approach
Independent checks for media garbage collection and idempotency, a health endpoint that answers 503 when either fails, per-task decoupled scheduling with structured logs, and environment parsing with safe fallbacks.
The outcome
Failure of one maintenance task no longer blocks the other, and the regression suite covers the degraded paths rather than only the happy one. Still in progress and without a published README.
Next route
Open another project
The index is the wider system.