Skip to main content

Success Story

Boody — AI Nutrition Coach, Concept to Live Users in 3 Days

Self-hosted LLM on WhatsApp and Telegram. Food photo analysis, proactive coaching, and a data flywheel that gets smarter with every meal.

3 DaysConcept to Live Product
Built by MSCLOUDTECH
TypeScriptNode.jsOllamaGemma 4 26BLanceDBSQLiteTelegram APIWhatsApp (Baileys)Express.jsVitestClaude Code
3 Days
Concept to Live Product
583
Automated Tests
4-Layer
Memory System
3
Messaging Channels

Challenge: Calorie tracking apps are tedious, generic, and ignore regional food. No app covers Egyptian and MENA cuisine accurately. Existing tools count calories without understanding behavior, sleep, or protein intake. Users quit within a week.

Solution: Built an AI coach that analyzes food photos via a self-hosted Gemma 4 26B model, tracks nutrition using a custom MENA food database, and sends proactive coaching messages based on a first-principles weight loss framework. Multi-channel: WhatsApp, Telegram, and web.

Result: Live product with real pilot users in 3 days. 4-layer memory system that remembers every meal, learns portion sizes, and adapts coaching over time. Data flywheel where every user interaction improves the food database.

Tech Stack

TypeScriptNode.jsOllamaGemma 4 26BLanceDBSQLiteTelegram APIWhatsApp (Baileys)Express.jsVitestClaude Code

The Story

Boody started because every calorie tracking app I tried was the same. Scan a barcode, search a database of American foods, get a number. Nobody tracked koshari, ful medames, or hawawshi. And the coaching was always the same generic "eat less, move more" advice that ignores why people actually fail at nutrition.

I researched first principles of weight loss: physics (energy balance), biology (metabolic adaptation, protein leverage), and psychology (habit formation, decision fatigue). Documented everything in a 500+ line framework that drives every coaching decision. The AI does not wing it. Every prompt is grounded in the framework. Protein first, sleep-aware, behavior-focused, never guilt-trips.

The technical bet was self-hosting. Gemma 4 26B runs the food identification, chosen after evaluating candidates on real food photos rather than on benchmark scores. The pilot validates on local Apple Silicon via Ollama, the cheapest way to prove the model and the product. For production the same model self-hosts on cloud GPUs the way it should be done: vLLM for continuous batching and concurrency, RunPod Serverless so idle GPUs scale to zero, and AWS Lambda for orchestration. Users send a food photo and get back a breakdown: what the food is, estimated portions, calories, protein, and a USDA-normalized name for database lookup. No per-token API bill; at scale that is roughly $0.001 per interaction versus $0.01-0.05 for API-based competitors.

The memory system is what makes Boody feel like a real coach, not a chatbot. Four layers: SQLite for structured metrics (daily logs, meals, weight trends, consistency scores), LanceDB with nomic-embed-text for semantic search across all conversations, AI-generated weekly coach notes that capture behavioral patterns, and the last 20 messages for conversational continuity. When a user says "I had the same thing as yesterday," Boody actually knows what that was.

The data flywheel is the long-term play. Every food photo gets labeled. Every correction gets stored. User portions are learned over time. Foods that get confirmed 3+ times graduate from user-contributed to the main database. At 1,000 users, that is roughly 90,000 labeled food photos per month, building a MENA food dataset that does not exist anywhere else.

I built and launched the entire product in 3 days using Claude Code. At launch that was 27 TypeScript modules, 250+ automated tests, and 5 pilot users sending food photos and receiving coaching. It has kept growing since. The same architecture scales from the local pilot to the cloud GPU setup when traffic justifies it.

How We Delivered

Our Delivery Process

See how our senior engineering pod delivered production-ready results

1

AI Food Recognition Pipeline

  • Gemma 4 26B for multimodal food photo analysis and packaged-label reading: Ollama on local Apple Silicon for the pilot, vLLM on cloud GPUs for production
  • 4-tier nutrition lookup: curated Egyptian DB, OpenFoodFacts for packaged items, USDA FoodData Central by category, then model-backed estimates
  • Data flywheel with 10 learning tables: per-user and global corrections, user foods, portion learning, meal profiles, accuracy tracking, training data, and pipeline alerts
2

4-Layer Memory System

  • SQLite for structured metrics: daily logs, meals, weight trends, consistency scores
  • LanceDB with nomic-embed-text embeddings for semantic search across all conversations
  • AI-generated weekly coach notes capturing behavioral patterns over time
3

Multi-Channel Architecture

  • Telegram Bot (Telegraf), WhatsApp (Baileys WebSocket), and Express web chat
  • Cross-channel identity linking: start on Telegram, continue on WhatsApp without losing history
  • Proactive coaching engine: 10+ trigger conditions, LLM-composed messages, graduated silence handling
4

How We Know It Works

  • 583 automated tests across 51 Vitest suites, including onboarding and check-in flow tests and simulated-conversation checks, running against a mock-Ollama harness so the model-dependent paths stay under test without a live model
  • Recognition accuracy is written to an accuracy_logs table as part of the food-photo flow, then read back through an /admin/accuracy endpoint and a weekly accuracy report rather than sampled by hand
  • The 10-table data flywheel is what moves that number: stored corrections, learned portions, and repeat-meal profiles feed the next identification instead of being logged and forgotten

Final Outcomes

Results

Concept to live product with real users in 3 days
Self-hosted LLM at $0.001/interaction versus $0.01-0.05 for API competitors
84 curated Egyptian foods plus USDA FoodData Central, with an automated graduation pipeline
4-layer memory system that learns portion sizes, meal patterns, and coaching preferences
583 automated tests including onboarding and check-in flow coverage
First-principles coaching framework: protein-first, sleep-aware, behavior-focused
Costed production path off the same self-hosted model: vLLM serving, RunPod Serverless for scale-to-zero, Lambda orchestration

Working on something similar?

Book a 15-minute call. We'll tell you honestly if we're the right fit.

Book a 15-min Call