Chihuahua|
Projects

CalPic - Calorie Counting from a Photo over WhatsApp

Team member 1
August 27, 2025

Every calorie-tracking app asks for the same thing: download it, create an account, then search a database for each ingredient and log it by hand. Most people quit in the first week — not because they stop caring, but because the logging is the chore.

CalPic removes the app entirely. You take a photo of your plate, send it to a WhatsApp number, and a couple of seconds later you get the dish identified and broken down: calories, carbs, protein, fat, fiber. You can then ask follow-up questions in the same chat — "is this good for breakfast?" — and it answers with your history in mind.

The bet is that the interface people actually keep using is the one already on their home screen.

  • Photo to nutrition: send a picture of the meal and get the dish recognized plus a full macro breakdown — no manual entry, no ingredient search
  • Conversational follow-ups: ask about the meal you just sent, or about your week, in plain language
  • Persistent memory across conversations: the agent recognizes the user by their WhatsApp ID and keeps context between sessions, so it doesn't start from zero each time
  • Progressive profile building: it learns goals and dietary preferences from the conversation itself instead of putting a form in front of the user
  • Zero install: works on any phone that already has WhatsApp — no download, no signup flow, no onboarding screens
  • Landing and subscription: marketing site with the plan, comparison, and direct entry into the chat

Three services in Docker Compose. WAHA handles the WhatsApp connection and forwards messages by webhook. An Express bridge normalizes those events and passes them to the agent. The agent itself is a LangGraph state graph in TypeScript, with dedicated nodes for session handling, conversation routing, profile validation, and message categorization — a photo, a follow-up question, and a first-time greeting each take a different path through the graph.

Vision and text both run through GPT-4o-mini, chosen so a single photo analysis costs little enough to be viable on a low monthly subscription. Persistence is split in two: LangGraph checkpoints in MongoDB keep each conversation's history, while a separate cross-thread profile stores what the agent has learned about the user — that second layer is what makes it feel like it remembers you rather than treating every message as a new conversation.

The frontend is a Next.js landing page on Vercel; the agent stack is self-hosted.

The interesting constraint was latency. A photo has to come back analyzed in a couple of seconds, because on WhatsApp anything slower reads as "it broke" and the person just closes the chat.