<?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: K S Rajeev Kasyap</title>
    <description>The latest articles on DEV Community by K S Rajeev Kasyap (@rajeevkasyap).</description>
    <link>https://dev.to/rajeevkasyap</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%2F4155200%2F2fd1cb1e-4cd4-40bb-b942-c57d84f683f2.png</url>
      <title>DEV Community: K S Rajeev Kasyap</title>
      <link>https://dev.to/rajeevkasyap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajeevkasyap"/>
    <language>en</language>
    <item>
      <title>2 AM Hostel Chef: A Sarcastic Recipe Generator</title>
      <dc:creator>K S Rajeev Kasyap</dc:creator>
      <pubDate>Sun, 04 Oct 2026 06:38:21 +0000</pubDate>
      <link>https://dev.to/rajeevkasyap/2-am-hostel-chef-a-sarcastic-recipe-generator-594c</link>
      <guid>https://dev.to/rajeevkasyap/2-am-hostel-chef-a-sarcastic-recipe-generator-594c</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;If you've ever lived in a student hostel, you know the 2 AM struggle. My friends constantly complain about being starving late at night, staring blankly at a random assortment of ingredients (like a banana, some stale muesli, and chili powder) and wondering what to do with it. They don't need a gourmet Michelin star cookbook; they need a chaotic, sarcastic chef that tells them exactly how to turn their random dorm room scraps into a meal using only a microwave. &lt;/p&gt;

&lt;p&gt;So for the Hacktoberfest Weekend Challenge, I built exactly that. Meet the &lt;strong&gt;2 AM Hostel Chef&lt;/strong&gt;. It is a fully functioning Android APK (built with React and Capacitor) powered by a lightweight Python FastAPI backend hosted on Render. You type in whatever sad ingredients you have lying around, and the AI chef aggressively guides you through a recipe.&lt;/p&gt;

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

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



&lt;p&gt;The entire codebase (React Frontend, FastAPI backend, and GitHub Actions Android compilation) is completely open source:&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/Rajeev-Kasyap" rel="noopener noreferrer"&gt;
        Rajeev-Kasyap
      &lt;/a&gt; / &lt;a href="https://github.com/Rajeev-Kasyap/hacktoberfest26" rel="noopener noreferrer"&gt;
        hacktoberfest26
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Projects made as part of Hacktoberfest2026
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;The core requirement of this project was to leverage an open-weight model. Initially, I tried running &lt;strong&gt;Gemma 2B&lt;/strong&gt; locally via Ollama right on my laptop to make it a completely offline app. While it was incredibly fast, the 2 Billion parameter model struggled to maintain the strict JSON schema and sarcastic persona simultaneously (a phenomenon known as "attention collapse"). &lt;/p&gt;

&lt;p&gt;Because Gemma is open-weight and available everywhere, I was easily able to pivot my architecture without changing providers or prompts. I swapped my backend to hit Google AI Studio's massive &lt;strong&gt;Gemma 4 26B&lt;/strong&gt; model. The jump in logic was staggering. The 26B model writes out an internal "Chain of Thought" before generating the recipe, resulting in flawless JSON schemas, hilarious Gen-Z sarcastic instructions, and actually edible recipes (it elegantly figured out how to use chili powder on a banana-muesli porridge!).&lt;/p&gt;

&lt;p&gt;Having access to the open Gemma ecosystem meant I could start small on the edge for offline testing, and easily scale up to a colossal 26B cloud model when the reasoning required it.&lt;/p&gt;

&lt;p&gt;The entire stack consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; React, Vite, TailwindCSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile Wrapper:&lt;/strong&gt; Capacitor (built to Android APK via GitHub Actions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Python FastAPI (hosted on Render's free tier)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Model:&lt;/strong&gt; &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; (Google AI Studio)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Open innovation meant I wasn't locked into a single inference provider. I was able to download the Gemma weights, run them locally on my own hardware using Ollama without needing the internet, experiment with the exact constraints of the model, and then seamlessly switch to Google's cloud API for the larger 26B parameter variant using the exact same underlying architecture. Closed APIs do not give you that freedom to experiment on the edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;Here is a brief slice of our session where we ripped out the broken edge vision model, fixed the JSON parsing, and pivoted the core reasoning architecture from local to cloud to solve the latency issues:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Refactoring 2 AM Hostel Chef: Fixing JSON parsing and latency&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The local Gemma 2B model is failing to return valid JSON for the recipe. It outputs markdown wrapped around invalid JSON. How do we enforce strict schema without increasing latency?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I will pivot the backend to use Google AI Studio's Gemma 4 26B model via REST API. It handles strict JSON generation natively. I will update main.py to route to the cloud API.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-replacefilecontent"&gt;replace_file_content&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"TargetFile": "backend/main.py", "Replacement": "call_gemini_api()"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"TargetFile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"backend/main.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Replacement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"call_gemini_api()"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;File updated successfully.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;If we move to a 26B cloud model, how are we stripping the &amp;lt;thought&amp;gt; blocks from the response? The frontend expects pure JSON.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I will add a parser in the FastAPI route that filters out the &amp;lt;thought&amp;gt; blocks and isolates the final JSON object before returning it to the React client.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-replacefilecontent"&gt;replace_file_content&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"TargetFile": "backend/main.py", "Replacement": "parse_thought_blocks()"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"TargetFile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"backend/main.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Replacement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"parse_thought_blocks()"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Parser added successfully.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The UI has an image capture button, but the multimodal processing is adding 45 seconds to the request. Remove it entirely. We will stick to text-only inputs for this iteration.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I am stripping the image upload logic from App.jsx and the corresponding vision processing dependencies from main.py.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-runcommand"&gt;run_command&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;{"CommandLine": "sed -i '/image/d' App.jsx"}&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ {"CommandLine": "sed -i '/image/d' App.jsx"}&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Vision logic removed successfully.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        6 of 6 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Reactions &amp;amp; Suggestions
&lt;/h2&gt;

&lt;p&gt;When I handed the app over to my friends, the reactions were hilarious. The aggressive, sarcastic tone of the AI chef was a massive hit. &lt;/p&gt;

&lt;p&gt;One major suggestion they had was to add a "Snap Photo" feature. They are far too lazy to actually type out the ingredients they have, so in a future update, I plan to integrate a multi-modal vision model where they can just point their phone camera at their messy desk, and the AI will auto-detect the food scraps!&lt;/p&gt;

&lt;p&gt;Of course, even with flawless AI instructions, things can go wrong. One of my friends, Vamsi, already managed to completely mess up his first attempt at a microwave porridge. But hey, the app can only give you the recipe—it can't cure being a genuinely terrible chef!&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;li&gt;Best Use of Render&lt;/li&gt;
&lt;/ul&gt;

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