
Mobile and web around the same records
I built meal, weight, exercise, and coaching workflows across Expo and Next.js, sharing TypeScript contracts in a Bun monorepo. The web Meals screen supports manual and AI-description logging, saved meals, nutrition editing, and reuse. Ask Burn adds saved conversations, older-history paging, streaming replies, and action feedback through an adapter to the existing coaching service.
Coaching that accounts for interrupted actions
I made the coach use the same validated, owner-scoped operations as MCP instead of maintaining a second set of data tools. PostgreSQL conversation locks, expiring leases, request IDs, and durable action reservations guard overlapping replies and duplicate mutations. An interrupted reservation is not blindly rerun; retries can inspect recorded outcomes. I also record token usage and estimated model costs.
A consent-based ChatGPT connection
I built OAuth and MCP access for native Burn records and separately authorized Google Health data. The authenticated owner is resolved server-side; tools cannot choose a user ID. Writes require permission in both the token and active consent, while conversation and assessment history need an additional grant. Grant-version checks revoke access even before an issued token expires. Regression tests exercise scope checks and cross-account isolation.
Health analytics with visible data limits
I integrated Google Health activity, sleep, nutrition, and other authorized categories with separate dashboard and agent connections and encrypted token storage. Overview queries run independent metrics concurrently and distinguish missing permissions, missing data, provider failures, and incomplete pagination. Total-calorie queries are split into bounded date windows; an unfinished page sequence is not presented as a complete daily total.
Shared identity and verified entitlements
I unified web and mobile sign-in around Better Auth sessions and canonical user records, with mobile credentials stored through Expo SecureStore. I also implemented native Google sign-in bridges and direct Apple and Google subscription verification. Server checks bind purchase proofs to accounts and validate products, expiry, and store environment before updating entitlements.
Bounded photo processing
I built a Sharp pipeline that validates upload bytes and decoded pixels, rejects invalid or multi-frame images, strips metadata, and resizes meal photos to a 1,536-pixel maximum edge before JPEG compression. MCP photo upload and AI analysis are separate explicit operations; the upload tool does not fetch arbitrary URLs or silently trigger analysis.
Repeatable development and release safeguards
I built Docker Compose workflows for PostgreSQL, migrations, Next.js, Expo/Metro, and Android builds. Release preflight checks reject local backend URLs and development billing bypasses in production builds. Regression suites cover authentication, purchase validation, health-data handling, and coaching retries; a separate PostgreSQL integration script checks two-owner CRUD isolation with synthetic users.