<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Desislav Ivanov</title>
    <description>The latest articles on DEV Community by Desislav Ivanov (@desislavsi).</description>
    <link>https://dev.to/desislavsi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4158468%2F3ea8659d-e816-4e6b-b222-9d9bc05c3f6e.jpg</url>
      <title>DEV Community: Desislav Ivanov</title>
      <link>https://dev.to/desislavsi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/desislavsi"/>
    <language>en</language>
    <item>
      <title>Home Meal Planner: local AI for my wife’s weekly meals</title>
      <dc:creator>Desislav Ivanov</dc:creator>
      <pubDate>Mon, 05 Oct 2026 04:06:53 +0000</pubDate>
      <link>https://dev.to/desislavsi/home-meal-planner-local-ai-for-my-wifes-weekly-meals-5fn5</link>
      <guid>https://dev.to/desislavsi/home-meal-planner-local-ai-for-my-wifes-weekly-meals-5fn5</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Home Meal Planner&lt;/strong&gt; for my wife in Sofia, Bulgaria.&lt;/p&gt;

&lt;p&gt;The goal was practical: turn recipes into a weekly plan, then turn that plan into a shopping list we can actually use.&lt;/p&gt;

&lt;p&gt;A recipe might need 400 grams of tomatoes, but the shop sells cans, bags, or products priced by the kilogram. Planning several meals adds another problem: combining those ingredients without losing quantities, preparation details, or brand preferences.&lt;/p&gt;

&lt;p&gt;Home Meal Planner brings that workflow together:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save a recipe manually or import it from a URL.&lt;/li&gt;
&lt;li&gt;Review and correct the imported ingredients.&lt;/li&gt;
&lt;li&gt;Build a meal plan with editable suggestions from a local Gemma model.&lt;/li&gt;
&lt;li&gt;Scale and consolidate the ingredients.&lt;/li&gt;
&lt;li&gt;Compare product offers from grocery stores.&lt;/li&gt;
&lt;li&gt;Select products and open shopping lists grouped by store.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The application supports Bulgarian and English ingredient text. It is designed for one household, with private access and a small collection of familiar recipes.&lt;/p&gt;

&lt;p&gt;The final shopping decision stays with the person using it. Each selected product has an external link for manually adding it to the store’s basket.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Ca1aMORkFD8" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/Ca1aMORkFD8" rel="noopener noreferrer"&gt;Watch the demo on YouTube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The recording shows recipe import and editing, weekly planning, meal suggestions, ingredient consolidation, product comparison, selection, and shopping lists split between stores. It ends by opening a real product page.&lt;/p&gt;

&lt;p&gt;One concrete example is package calculation: if the plan requires &lt;strong&gt;1,200 grams of tomatoes&lt;/strong&gt; and an offer contains &lt;strong&gt;400 grams per can&lt;/strong&gt;, the application calculates &lt;strong&gt;three cans&lt;/strong&gt; and their total purchase cost.&lt;/p&gt;

&lt;p&gt;That matters more than simply displaying the cheapest package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/desislavsi/home-meal-planner" rel="noopener noreferrer"&gt;Home Meal Planner on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes setup instructions, regression tests, store validation scripts, and a deterministic fixture mode for repeatable demonstrations.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/desislavsi/home-meal-planner/blob/main/reports/live-store-smoke.json" rel="noopener noreferrer"&gt;live store validation report&lt;/a&gt; records public product retrieval from &lt;strong&gt;VMV and Randi&lt;/strong&gt;. Other candidate stores remain outside the working live scope until their adapters can retrieve usable offers reliably.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The application is a TypeScript monorepo with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React and Vite&lt;/strong&gt; for the interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fastify&lt;/strong&gt; for the API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared Zod schemas&lt;/strong&gt; for application contracts and AI responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mastra&lt;/strong&gt; for the meal-planning agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 4 E4B&lt;/strong&gt;, running through Ollama’s OpenAI-compatible API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local JSON persistence&lt;/strong&gt; for the competition MVP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gemma receives the saved recipe collection and the current plan. It proposes recipe choices and short explanations.&lt;/p&gt;

&lt;p&gt;The application validates the response before using it: recipe IDs must exist, dates must belong to the plan, and suggestions must not overlap meals already selected. Additional planning rules favor suitable meal slots and balance recipe repetition. The user reviews suggestions before applying them.&lt;/p&gt;

&lt;p&gt;If the model is unavailable or returns invalid output, a deterministic planner keeps the workflow usable.&lt;/p&gt;

&lt;p&gt;To verify the actual model integration, I ran the strict live smoke test on &lt;strong&gt;October 5&lt;/strong&gt; using local &lt;strong&gt;&lt;code&gt;gemma4:e4b&lt;/code&gt;&lt;/strong&gt;, Mastra, and synthetic Bulgarian recipe data. The test passed, and its final output contained &lt;strong&gt;21 validated meal suggestions after the application’s planning rules were applied&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This test fails on model errors instead of accepting the fixture fallback. The command, configuration, and successful terminal output are recorded in the &lt;a href="https://github.com/desislavsi/home-meal-planner/blob/main/reports/gemma-smoke.md" rel="noopener noreferrer"&gt;Gemma and Mastra live test evidence&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ingredient scaling, unit conversion, package counts, ranking, and totals are calculated in application code.&lt;/p&gt;

&lt;p&gt;Offers show their data provenance and availability. Compatible offers can be compared by the cost of buying the required quantity, including excess caused by package sizes. Exact-brand matches and alternatives are distinguished.&lt;/p&gt;

&lt;p&gt;Store prices are snapshots. Product subtotals do not include delivery fees or guarantee the final checkout price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Running an open-weight model locally makes this project approachable as a household tool.&lt;/p&gt;

&lt;p&gt;Meal-planning requests go to the local Ollama endpoint, without requiring a hosted model API key. Mastra provides an open-source agent layer, while shared schemas make the boundary between model output and application behavior explicit.&lt;/p&gt;

&lt;p&gt;The model integration can be changed independently of the shopping calculations. Store adapters can also be extended as access and product data improve.&lt;/p&gt;

&lt;p&gt;For this project, open innovation means being able to inspect and adapt the tool around a real household’s recipes and shopping habits.&lt;/p&gt;

&lt;p&gt;Live store comparisons still require internet access. Fixture mode provides a separate, repeatable way to test the workflow offline.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned and What Comes Next
&lt;/h2&gt;

&lt;p&gt;The difficult parts were interpreting recipe data and deciding whether a store result represents the ingredient the household needs.&lt;/p&gt;

&lt;p&gt;Recipe quantities, units, and yields need review. Store keyword searches can also return irrelevant products. The demo exposes both of these MVP limits, so tighter product-category filtering and clearer import corrections are the next priorities.&lt;/p&gt;

&lt;p&gt;The next useful test is handing the tool to my wife and watching where she needs help. That feedback will guide whether it needs fewer steps, clearer quantities, or better product suggestions.&lt;/p&gt;

&lt;p&gt;I have not measured time savings yet. The aim is to make the weekly planning and shopping process easier enough that she chooses to use it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Gemma 4 E4B runs locally through Ollama and proposes editable meal suggestions using the household’s saved recipes. Structured validation and application rules control how those suggestions enter the plan. The repository includes evidence of a successful strict live test.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Mastra&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mastra supplies the agent configuration and structured generation layer connecting the local model to the meal-planning workflow. The same live test exercises the Mastra agent, local inference endpoint, and response validation.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
