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
250+
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 MoE running locally on Apple Silicon via Ollama. Vision-capable, so 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 API costs per interaction. At scale, this means 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. 27 TypeScript modules, 250+ automated tests, 5 pilot users sending food photos and receiving coaching. The architecture is ready to migrate to AWS Lambda plus RunPod Serverless when it is time to scale.

How We Delivered

Our Delivery Process

See how our senior engineering pod delivered production-ready results

1

AI Food Recognition Pipeline

  • Gemma 4 26B MoE via Ollama for multimodal food photo analysis on Apple Silicon
  • 4-tier nutrition lookup: curated Egyptian DB, USDA FoodData Central, user-contributed foods, API fallback
  • Data flywheel with 5 learning tables: corrections, user foods, portion learning, meal profiles, accuracy tracking
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

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
30 curated Egyptian foods plus 7,500 USDA foods with automated graduation pipeline
4-layer memory system that learns portion sizes, meal patterns, and coaching preferences
250+ automated tests including e2e journey tests and scenario tests
First-principles coaching framework: protein-first, sleep-aware, behavior-focused
Architecture ready to migrate to AWS Lambda plus RunPod Serverless

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

Free AWS Architecture Roadmap
48-hour delivery. $12K value.