Back to selected work
PERSONAL PROJECT / CASE STUDY 02 / 03

Agentic AI + cross-platform

Meal Planner

An agentic recipe engine inside a cross-platform meal planner.

Meal Planner is a full product—MAUI client, JWT-secured ASP.NET Core API, MySQL domain—but its core is the recipe pipeline. A Claude-based chef agent works through tools instead of free text, a reviewer from a different model family grades the result, and deterministic code owns the parts that must be correct: nutrition numbers and allergens.

SYSTEM ARCHITECTURE

An agent loop with tools, a critic, and code-owned guardrails

The MAUI app sends a meal request to the API. The backend builds the household context, runs the chef agent against its tools, validates and saves the approved recipe, generates a dish photo, and logs every run's tokens and API calls for cost tracking.

ENGINEERING STORY

01 / TOOL USE

The chef works through tools, not free text

The chef agent (Claude) has three tools: search USDA FoodData Central for every ingredient in one call, calculate a serving's nutrition from grams to hit the calorie target, and submit the finished recipe. Tool calls run in parallel and the conversation is prompt-cached, so each turn only pays for new tokens.

02 / INDEPENDENT CRITIC

Graded by a different model family

Each submission is reviewed by a taste critic running on an OpenAI model, so the dish is never graded by the model that wrote it. It scores flavor, technique, coherence, request fit, and language; must-fix notes send the chef back to revise, and an approval with polish notes earns one final clean-up turn—all within fixed turn and review budgets.

03 / NUMBERS IN CODE

The model picks foods; code computes nutrition

The LLM only chooses foods and grams. Every stored macro, vitamin, and mineral comes from a deterministic calculator over per-100 g USDA data, cached locally to stay within API rate limits. A nutrient nobody reports stays unknown instead of becoming zero.

04 / ALLERGEN SAFETY

Allergens are checked in layers

The household's stored allergies always apply. At submit time, allergens are computed from the ingredients themselves—AI classification backed by keyword rules—rather than taken from the chef's own list, and severe allergies also exclude "may contain" products. A final check after saving hides any recipe that still conflicts.

TECHNICAL FOUNDATION

Layers of the system

AI backend

Agent / Tool OrchestrationClaude APIOpenAI APIUSDA FoodData CentralEmbeddings

Client

.NET MAUIBlazor HybridMudBlazor

Backend

ASP.NET CoreJWT authenticationEntity Framework CoreMySQL

Implemented capabilities

  • Agentic recipe generation with USDA-backed nutrition and an independent AI critic
  • Layered, household-aware allergen safety with an admin tool for reviewing ingredient tags
  • Embedding-ranked matching that offers ready recipes before generating new ones, plus AI dish photos
  • Cross-platform meal planning for families, with invitations, onboarding, and a chat assistant
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed. Trying again in seconds.

Failed to rejoin. Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session. Please retry or reload the page.