<?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: Anshika Gupta</title>
    <description>The latest articles on DEV Community by Anshika Gupta (@anshika66gupta).</description>
    <link>https://dev.to/anshika66gupta</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%2F506322%2F5ebc86fe-2993-4d25-97fb-99ec8b240626.jpeg</url>
      <title>DEV Community: Anshika Gupta</title>
      <link>https://dev.to/anshika66gupta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anshika66gupta"/>
    <language>en</language>
    <item>
      <title>I Built a 100% Offline Allergy-Safe Meal Planner for My Friend Anny (Powered by Local Gemma)</title>
      <dc:creator>Anshika Gupta</dc:creator>
      <pubDate>Mon, 05 Oct 2026 18:20:19 +0000</pubDate>
      <link>https://dev.to/anshika66gupta/i-built-a-100-offline-allergy-safe-meal-planner-for-my-friend-anny-powered-by-local-gemma-38bd</link>
      <guid>https://dev.to/anshika66gupta/i-built-a-100-offline-allergy-safe-meal-planner-for-my-friend-anny-powered-by-local-gemma-38bd</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;Anny’s Local Allergy-Safe Meal Planner&lt;/strong&gt; — a beautiful, 100% offline Streamlit application that generates safe, delicious, high-protein 7-day meal plans (plus a perfectly categorized shopping list) tailored specifically for my friend &lt;strong&gt;Anny&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Anny has severe allergies to &lt;strong&gt;Peanuts, Tree Nuts, Shellfish, and Dairy&lt;/strong&gt;. Every time she tries to plan meals, she lives with constant anxiety — double-checking every ingredient, every recipe, every grocery list. She also loves Indian-inspired food, prefers high-protein meals, and wants quick weeknight dinners under 20 minutes.&lt;/p&gt;

&lt;p&gt;So I built her a personal, private, offline chef that lives entirely on her laptop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Anny Profile&lt;/strong&gt; that instantly loads her exact allergies + preferences&lt;/li&gt;
&lt;li&gt;Full &lt;strong&gt;7-day Breakfast / Lunch / Dinner&lt;/strong&gt; plans&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-layer safety system&lt;/strong&gt;: Local Gemma generates creatively → deterministic Python filter guarantees safety&lt;/li&gt;
&lt;li&gt;Aisle-categorized shopping list (Produce, Proteins, Dairy Alternatives, Grains, Pantry) with checkboxes + PDF &amp;amp; .txt export&lt;/li&gt;
&lt;li&gt;Instant single-day re-rolls&lt;/li&gt;
&lt;li&gt;Gorgeous glassmorphism UI with interactive flip cards&lt;/li&gt;
&lt;li&gt;Completely private — zero data ever leaves her machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn’t a generic meal planner.&lt;br&gt;&lt;br&gt;
It’s &lt;em&gt;hers&lt;/em&gt;.&lt;/p&gt;


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

&lt;p&gt;&lt;strong&gt;Live Demo (Render):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://allergy-meal-planner.onrender.com" rel="noopener noreferrer"&gt;https://allergy-meal-planner.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YouTube Walkthrough:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://youtu.be/BPogI6m87Xs?si=FEwp09AYlCy1bG1D" rel="noopener noreferrer"&gt;https://youtu.be/BPogI6m87Xs?si=FEwp09AYlCy1bG1D&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Anshika66-Gupta" rel="noopener noreferrer"&gt;
        Anshika66-Gupta
      &lt;/a&gt; / &lt;a href="https://github.com/Anshika66-Gupta/allergy-meal-planner" rel="noopener noreferrer"&gt;
        allergy-meal-planner
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🥗 Anny's Local Allergy-Safe Meal Planner&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Help Anny plan safe, tasty meals without constant anxiety about allergies — powered 100% offline by local Gemma.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎯 Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Planning meals with severe food allergies can be stressful and anxiety-inducing. &lt;strong&gt;Anny's Local Meal Planner&lt;/strong&gt; is a lightweight, offline-first application that generates personalized 7-day meal plans and consolidated shopping lists tailored specifically for Anny's dietary requirements.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🔑 Core Features&lt;/h3&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Anny Profile Preset&lt;/strong&gt;: Instantly loads Anny's severe allergies (&lt;strong&gt;Peanuts&lt;/strong&gt;, &lt;strong&gt;Tree Nuts&lt;/strong&gt;, &lt;strong&gt;Shellfish&lt;/strong&gt;, &lt;strong&gt;Dairy&lt;/strong&gt;) and preferences (&lt;strong&gt;Gluten-Free Friendly&lt;/strong&gt;, &lt;strong&gt;High Protein&lt;/strong&gt;, &lt;strong&gt;Quick Prep &amp;lt; 20 mins&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;7-Day Safe Meal Plan&lt;/strong&gt;: Generates complete Breakfast, Lunch, and Dinner schedules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consolidated Aisle-Categorized Shopping List&lt;/strong&gt;: Aggregates ingredients across all 7 days into Produce, Protein, Dairy Alternatives, Grains, and Pantry aisles with checkable items and &lt;code&gt;.txt&lt;/code&gt; export.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-Day &amp;amp; Full-Week Regeneration&lt;/strong&gt;: Re-roll any individual day (e.g., Day 3)…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Anshika66-Gupta/allergy-meal-planner" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Quick Local Start
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:1b          &lt;span class="c"&gt;# or gemma2:2b&lt;/span&gt;
git clone https://github.com/Anshika66-Gupta/allergy-meal-planner
&lt;span class="nb"&gt;cd &lt;/span&gt;allergy-meal-planner
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
streamlit run app.py


&lt;span class="nt"&gt;---&lt;/span&gt;

&lt;span class="c"&gt;### Inspiration&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
Dietary restrictions and food allergies make meal planning exhausting. Whether managing severe allergies or strict nutritional goals, people spend hours cross-referencing ingredients, checking labels, and modifying recipes. We wanted to build an intelligent, ultra-safe meal planning assistant that combines the creative flexibility of local LLMs with a foolproof safety architecture—ensuring personalized, delicious, and 100% allergen-free meal plans every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚡ Instant Profile Loading:&lt;/strong&gt; Load strict preset profiles (allergies like peanuts, tree nuts, shellfish, dairy, plus high-protein, Indian-inspired, and &amp;lt;20-minute prep constraints) with a single click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤖 Hybrid AI Architecture:&lt;/strong&gt; Automatically checks if local Ollama + Gemma is available. If yes, it leverages local LLMs for creative meal plan generation (JSON); if not, it seamlessly falls back to a Smart Safety Engine with a curated recipe pool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🛡️ Dual-Layer Safety Engine:&lt;/strong&gt; Scans every meal name, ingredient list, description, and instruction. It uses context-aware keyword matching (protecting safe variations like "sunflower seed butter" or "oat milk"), automatically replaces dangerous ingredients with safe substitutes, and generates a complete audit log of every change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🛒 Smart Shopping &amp;amp; Export:&lt;/strong&gt; Automatically aggregates, deduplicates, and categorizes shopping lists by grocery aisle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✨ Interactive UI:&lt;/strong&gt; Renders beautiful interactive flip cards for each meal, one-click day regeneration, and instant PDF/.txt exports.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How we built it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend &amp;amp; UI:&lt;/strong&gt; Built with an interactive, responsive interface featuring dynamic flip cards and clean layout styling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI &amp;amp; Logic Layer:&lt;/strong&gt; Powered by &lt;strong&gt;Ollama&lt;/strong&gt; running &lt;strong&gt;Gemma&lt;/strong&gt; for local, privacy-first generative meal planning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety Engine:&lt;/strong&gt; Custom rule-based matching and context-aware keyword parsing to inspect ingredient strings and safeguard against cross-contaminants and allergens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data &amp;amp; Export:&lt;/strong&gt; Automated PDF and text export generators paired with smart grocery aggregation algorithms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenges we ran into
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context-Aware Allergen Filtering:&lt;/strong&gt; Standard string matching often triggers false positives (e.g., flagging "coconut milk" when dairy is restricted, or blocking "sunflower seed butter" due to nut restrictions). Tuning the Dual-Layer Safety Engine to understand context and safely handle substitutes was a rewarding challenge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful Fallbacks:&lt;/strong&gt; Ensuring the app remains fully functional even when local AI models (Ollama/Gemma) aren't running by building a robust rule-based fallback safety engine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Accomplishments that we're proud of
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Successfully implementing a dual-layer safety scanner that logs every substitution transparently.&lt;/li&gt;
&lt;li&gt;Creating a seamless local AI workflow with Ollama and Gemma that outputs structured JSON for reliable UI rendering.&lt;/li&gt;
&lt;li&gt;Delivering a polished end-to-end user experience—from preset profile loading to categorized shopping lists and PDF exports.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The importance of defensive AI architecture: never trusting raw LLM outputs blindly when dealing with health and safety-critical domains like food allergies.&lt;/li&gt;
&lt;li&gt;How to design resilient fallback mechanisms that switch smoothly between generative AI and deterministic rule engines.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Expanding the preset profile library for more dietary types (Keto, Vegan, Low-FODMAP, Halal).&lt;/li&gt;
&lt;li&gt;Adding multi-day meal prep tracking and pantry inventory scanning.&lt;/li&gt;
&lt;li&gt;Enhancing the local LLM prompting strategy for even greater culinary creativity.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Best Use of Gemma (Featured): Leverages Ollama running Gemma locally for privacy-first, creative, structured JSON meal plan generation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Best Use of Render (Featured): Hosted and deployed reliably on Render, ensuring fast cloud accessibility and smooth deployment workflows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




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