Back to portfolio

April 6, 2026

MealMind AI

An agentic kitchen assistant and macro intelligence system that transforms fridge ingredients into structured recipes and real-time nutritional tracking.

AI Agents
LangGraph
Next.js
Personal Health
View project

MealMind AI is a sophisticated kitchen assistant that bridges the gap between creative culinary exploration and rigorous nutritional tracking. It moves beyond traditional fitness apps by treating meal planning and logging as an orchestrated reasoning task powered by a stateful agent graph.

The Problem

Most nutrition apps are digital ledgers that require tedious manual entry and offer little creative utility. You either get a recipe app with no nutritional awareness or a calorie tracker that feels like a clinical chore. They treat "data entry" as the user's primary job rather than "deciding what to eat."

Furthermore, existing AI "chatbots" often suffer from "prompt theater" - returning unstructured text that is impossible to track over time. For users with specific health needs, such as Hashimoto’s disease, generic AI advice is often too broad or fails to consistently apply critical dietary guardrails across different meal types.

The Architecture

MealMind is a decoupled system using a Next.js frontend and a FastAPI backend orchestrating a multi-agent LangGraph workflow.

The Orchestrator

A LangGraph classifier node that receives raw user input and determines intent - fridge raid, recipe request, macro check, or meal logging. It extracts structured data (ingredients, quantities, dish ideas) to route the state to the appropriate specialized agent.

Agentic Reasoning

Specialized nodes for Recipe Generation and Meal Planning that respect user constraints. A dedicated "Nutrition Enrichment" node hydrates these outputs, calculating per-ingredient macros and flagging estimation warnings for unknown items.

The Lens

A Next.js 15 interface that consumes structured JSON from the backend. It uses Server-Sent Events (SSE) to provide real-time visibility into the agent's thinking process and syncs state to a Postgres-backed API, enabling persistent server-backed threads and cross-device usage.

Key Design Decisions

Hashimoto-Friendly Mode

Rather than a post-filter, this mode injects a strict 7-rule framework - including anti-inflammatory bias, nightshade awareness, and selenium-rich focus - directly into every agent's system prompt. This ensures dietary constraints permeate every culinary decision.

Predictability over "Chat"

The system enforces a strict backend-to-frontend contract using Pydantic models. Every response must be valid JSON, allowing the UI to render rich, actionable cards and real-time progress bars instead of plain, unorganized text.

Household Sovereignty & Sync

The system has evolved from browser-bound storage to a shared network model. The backend utilizes a Postgres database to persist multiple household profiles, chat threads, saved recipes, and historical meal logs locally on the network. Each profile is secured with session-backed authentication and per-profile passwords, maintaining data privacy while allowing seamless cross-device syncing.

Hybrid Execution Architecture

The backend operates in two modes: a high-fidelity mode using OpenRouter for agentic reasoning and a deterministic fallback mode that uses local heuristics and a built-in food database to ensure core utility even if API keys are missing.

The technical stack is built for speed, isolation, and seamless local deployment. The backend uses Python 3.14 in a repo-local Conda environment, the frontend leverages a custom transport abstraction for streaming updates, and the entire infrastructure - including the Postgres database - is orchestrated effortlessly via Docker Compose. The result is a system where the AI doesn't just talk to you - it builds your infrastructure.