<?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: Hammad Bin Sajjad</title>
    <description>The latest articles on DEV Community by Hammad Bin Sajjad (@hammad_binsajjad_7a6599d).</description>
    <link>https://dev.to/hammad_binsajjad_7a6599d</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%2F1495149%2Ffaa9ba70-d260-4f21-9f2d-93191285f8fd.jpg</url>
      <title>DEV Community: Hammad Bin Sajjad</title>
      <link>https://dev.to/hammad_binsajjad_7a6599d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hammad_binsajjad_7a6599d"/>
    <language>en</language>
    <item>
      <title>Kitchen Companion</title>
      <dc:creator>Hammad Bin Sajjad</dc:creator>
      <pubDate>Mon, 05 Oct 2026 00:01:33 +0000</pubDate>
      <link>https://dev.to/hammad_binsajjad_7a6599d/kitchen-companion-146k</link>
      <guid>https://dev.to/hammad_binsajjad_7a6599d/kitchen-companion-146k</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;&lt;strong&gt;Kitchen Companion&lt;/strong&gt; — a kitchen assistant for my mother, who kept asking me the same question over WhatsApp: &lt;em&gt;"Mere paas aloo, tamatar aur thora chawal bacha hai — kya banaun?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Her fridge is a moving target: leftovers, half-used things, whatever she bought that week. So I built her an app where she photographs her fridge, &lt;strong&gt;fixes the detected ingredient list on screen&lt;/strong&gt; (the vision model sometimes "sees" things that aren't there — she removes those with one tap), and then chats with a warm kitchen companion that suggests meals in &lt;strong&gt;Roman Urdu&lt;/strong&gt; — Urdu written in Latin letters, the way Pakistanis actually text. She can follow up by typing &lt;em&gt;or speaking&lt;/em&gt; ("steps chahiye", "tamatar nahi hai", "guests aa rahe hain"), and the ingredient list and suggestions stay in sync as the conversation evolves.&lt;/p&gt;

&lt;p&gt;It solves the actual problem: "what can I cook with THIS, right now" — not a generic recipe search engine.&lt;/p&gt;

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

&lt;p&gt;Video Recording: &lt;a href="https://drive.google.com/file/d/1CaxfYjIUAkL_-7jGiiiQ0QuF2bavQP8z/view?usp=drive_link" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1CaxfYjIUAkL_-7jGiiiQ0QuF2bavQP8z/view?usp=drive_link&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&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/hammadbinsajjad" rel="noopener noreferrer"&gt;
        hammadbinsajjad
      &lt;/a&gt; / &lt;a href="https://github.com/hammadbinsajjad/Kitchen-Companion" rel="noopener noreferrer"&gt;
        Kitchen-Companion
      &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;Kitchen Companion&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Photograph your fridge, fix the detected ingredient list on screen, and get meal
suggestions in Roman Urdu from a kitchen companion chatbot that answers typed
&lt;strong&gt;and spoken&lt;/strong&gt; follow-ups.&lt;/p&gt;
&lt;p&gt;All AI runs &lt;strong&gt;locally&lt;/strong&gt; on your laptop via llama.cpp — zero cloud calls at runtime.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run it&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Start the model server (first run downloads the model from Hugging Face):&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;./run_model.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start the app (separate terminal):&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn server:app --host 0.0.0.0 --port 8000&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On your phone (same Wi-Fi): open &lt;code&gt;http://&amp;lt;laptop-ip&amp;gt;:8000&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;One AI endpoint, &lt;code&gt;POST /api/chat&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;images attached&lt;/strong&gt; → vision turn: returns the detected ingredient list&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;text / audio clip&lt;/strong&gt; → conversation turn: Roman Urdu reply + the full current
ingredient list (so spoken or typed corrections like &lt;em&gt;"tamatar nahi hai"&lt;/em&gt; update
the chips; manual chip ✕ / + add work too)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;images + text/audio&lt;/strong&gt; → vision turn that also…&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/hammadbinsajjad/Kitchen-Companion" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Zero build tooling: plain HTML/JS frontend served by a small FastAPI backend that talks to llama.cpp. One command starts the model, one starts the app.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: Gemma 4 E4B (QAT GGUF) running via &lt;strong&gt;llama.cpp's &lt;code&gt;llama serve&lt;/code&gt;&lt;/strong&gt; on my laptop — chosen because it's natively &lt;strong&gt;multimodal&lt;/strong&gt;: the same model handles vision (fridge photos) &lt;em&gt;and&lt;/em&gt; audio (spoken follow-ups). No speech-to-text layer anywhere — her voice goes straight into the model as &lt;code&gt;input_audio&lt;/code&gt;, and the browser records/re-encodes it to WAV with vanilla JS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One endpoint&lt;/strong&gt;: the whole app is a single &lt;code&gt;POST /api/chat&lt;/code&gt;. The request shape decides the turn — images attached = vision turn, text/audio = conversation turn, both = a vision turn that also acknowledges the note. No intent classifier, no agent framework — routing that can be read off the request metadata should never be inferred.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured output&lt;/strong&gt;: every response is schema-constrained JSON &lt;code&gt;{reply, dishes, ingredients}&lt;/code&gt;. Dish suggestions are separate objects rendered as tappable cards (tap = "steps chahiye"), and the ingredient list rides along in every turn so conversational corrections ("chawal nahi hai") update the chips. Plus defensive parsing for the real world: brace-residue stripping, truncation salvage, case-insensitive dedupe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-loop by design&lt;/strong&gt;: the edited chip list — not the raw model output — feeds the suggestion pass. The model proposes; my mother disposes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stateless backend&lt;/strong&gt;: conversation history lives in the frontend and is re-sent every turn. Config lives in exactly two files (&lt;code&gt;config.py&lt;/code&gt; / &lt;code&gt;config.js&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tested mobile-first in DevTools responsive mode for Pixel 8/9 (412 x 915); my mother's phone is the real target.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Because the model is open and runs locally, every photo she takes — her kitchen, her cupboards, the inside of her fridge — &lt;strong&gt;never leaves her home network&lt;/strong&gt;. No cloud, no uploads, no server somewhere holding her family's life in a data center. What's in her fridge is nobody's business but her own, and open weights are the only way that's possible.&lt;/p&gt;

&lt;p&gt;And it just keeps working. No internet? No problem — the laptop on her Wi-Fi is the entire system. The app doesn't care if the connection drops, if a service is down for maintenance, or if a provider changes its pricing overnight. For a tool that lives in the busiest room of a house and gets used daily by my mother, that reliability isn't a nice-to-have; it's the whole point.&lt;/p&gt;

&lt;p&gt;A closed API would have meant mailing her kitchen photos to someone else's server on every single use — and a companion that dies the moment the connection does. Open innovation made this &lt;em&gt;private&lt;/em&gt; and &lt;em&gt;hers&lt;/em&gt; — which was the entire point of building for a friend.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Best Use of Gemma&lt;/li&gt;
&lt;/ul&gt;

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