Projects
Side projects and applications I've built
BinaryBuilders
2 projectsMelio MealPlan AI
AI-Powered Meal Planning
**What it is.** Full-stack AI meal-planning platform built as a pnpm monorepo and running on Hetzner + Cloudflare Workers. NestJS owns business logic while a separate Python FastAPI ai-service runs the AI brain. In production: 311 generations from 105 users (September 2026) at ~$0.26 per plan on Claude Haiku 4.5, ~$0.33 on Sonnet. **AI generation pipeline.** The AI brain is a LangGraph StateGraph agent with a ReAct-style USDA tool loop and a forced submit tool; it never writes nutrition numbers itself — the server computes every macro from USDA data, a hard anti-hallucination guarantee. USDA lookup is Postgres full-text search plus an LLM rerank (pick accuracy 0.64 → 0.92 on frozen probes), and a separate recipe retrieval on Qdrant over ~230k filtered RecipeNLG recipes feeds dish ideas into generation. A separate chat agent with 16 tools lets users inspect, create and start plans in conversation. **Reliability & quality.** Quality is enforced by a 3-layer validate-and-retry cascade, and graph state is checkpointed to Postgres (AsyncPostgresSaver), so an interrupted plan restarts from the next unfinished day. A cross-provider fallback (Anthropic ⇄ a self-hosted model) is live and fired in production when the Anthropic balance ran out. A pre-release eval harness — golden sets of 101 meal plans and 80 chat cases, RAGAS, DeepEval and MLflow, best score 0.971 — catches regressions, and every generation is traced in self-hosted Langfuse v3 with OpenTelemetry. **Streaming & deployment.** Server-Sent Events stream meals live from Python → NestJS → Next.js behind a configurable 360 s hang watchdog. The platform moved from Railway to Hetzner + Cloudflare Workers in August 2026.
GovChime Analytics Platform
Federal Contract Data Platform — ETL, CDC & CQRS
**Data platform.** Federal contract data from SAM.gov runs through a Temporal-orchestrated ETL into PostgreSQL and, via CDC, into a ClickHouse CQRS read model. SmartSync holds ~7.06M contracts, ~1.48M vendors and ~94.4M award transactions from SAM.gov and USAspending.gov, used by a few hundred daily active users. **SmartSync on Temporal.** In production since 2026-09-25: 32 schedules on 6 task queues run extract → transform → load → verify per window for opportunities, entities and contract awards, plus enrichment (descriptions, attachments, SBA certifications) and guard jobs. The legacy scheduler was deleted, and replay tests of production histories run in CI. A 13-key SAM.gov pool with a usage ledger keeps every pipeline inside the API quota. **Completeness, proven.** A green run only proves execution, so each dataset is checked against a second copy of the source: 0 of 80,922 active notices and 0 of 733,627 FY2025–26 archive notices missing against SAM.gov's own files. The opportunities sync that once reported success while holding 17.5% of notices is gone with it. **CQRS read model and mirror.** PostgreSQL is the write model; one Temporal coordinator per table projects new rows into ClickHouse by watermark (query-based CDC), and a daily reconciliation checks checksum parity — contracts, entities and 94.4M award transactions match. A logical-replication PostgreSQL → PostgreSQL mirror (pgoutput) runs as Temporal Workflows with hourly health and daily hash checks. A teammate introduced ClickHouse and wrote the first copy scripts; I rewrote them with checkpoints and a parity check, moved them onto Temporal, and built the mirror. **Backend and Next.js on Cloudflare.** A headline query went from 13.6 s to ~1 s (a trigger-maintained indexed slug column instead of a per-row function) and ClickHouse queries from 2.2 s to 0.27 s. I added a single-flight guard to the Express API's in-memory response cache against query stampedes and aligned the React Query, ISR and API cache TTLs at 10 minutes, cutting worst-case feed lag from ~3–5 h to ~10 min by design. The Next.js 16 frontend runs on Cloudflare Workers via OpenNext with an R2 page cache; I added the D1 tag cache that makes on-demand revalidation work and edge-cached the sitemaps. The backend moved from Hetzner to OVHcloud in August 2026, when a change of stakeholders consolidated hosting there. **AI content.** A smaller Python service drafts blog, social and SEO copy from contract data behind a human review queue and a guard against invented figures, on Cloudflare Workers AI.