Home · AI

MealPilot

Weekly family meal planning with pantry tracking and AI-generated plans.

Node.js · SQLite · Ollama · Mealie API · Docker

The problem

Planning a week of family meals is a weekly puzzle: what's already in the pantry, what each person will eat, which portions, and what still needs buying. Doing it by hand every week is slow and easy to get wrong, and a generic recipe app doesn't know what's in your kitchen or who you're cooking for. The goal was to draft a good plan automatically while leaving the final call with a person.

What I built

MealPilot takes the pantry, each person's preferences and portion targets to generate a structured weekly meal plan and weekend batch-cook strategy. System generation uses a two-stage architecture: first drafting the meal schedule, then deriving exact grocery requirements by comparing recipe ingredients against current pantry stock. It seamlessly toggles between local LLMs (Ollama) and cloud APIs, integrating with a self-hosted recipe manager. The entire system runs containerized on self-hosted hardware with full human edit control over the final plan.

Decisions worth defending

  1. Two-stage architecture: Separating creative planning from deterministic calculation

    Single-prompt attempts asking the LLM for both meal plans and grocery math resulted in hallucinated quantities and omitted items. I split the architecture into two stages: the LLM handles creative recipe scheduling, while deterministic software logic computes the grocery list from structured recipe ingredients minus pantry inventory. Letting models innovate while code computes eliminates silent data errors.

  2. Human confirmation over automated inventory decrementing

    AAutomating pantry deduction sounds ideal, but free-text inventory entries ("1 bag," "half bottle") cause rapid data corruption when auto-decremented. I specified a review-flagging system that alerts the user to items likely running low for manual confirmation, protecting core dataset integrity.

  3. Mitigating LLM primacy bias via weighted recipe ingestion

    Language models over-index on items positioned first in prompt context. To counteract this primacy bias, context feeds are dynamically sorted based on meal recency and rating weights, ensuring variety without hardcoding fixed rules.

  4. In-container integration testing before deployment promotion

    Test suites execute inside the target production container environment prior to deployment promotion. Validating code inside actual build artifacts ensures environment-specific dependency issues are caught early, leaving the live production instance unaffected if a build fails.

How this was built

As part of my self-hosted lab, the value lies in the ownership workflow: I defined system requirements and data schemas, co-developed the technical specification with AI during structured "grill me" sessions, and established architecture guardrails. Autonomous AI agents implemented code against the specification. Automated CI/CD pipelines promote builds only after passing in-container test suites, backed by automated nightly recovery procedures. I manage system strategy, data accuracy, and user experience end to end.

← Back to all work