<?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: Nirwan Sharma</title>
    <description>The latest articles on DEV Community by Nirwan Sharma (@nirwan_sharma).</description>
    <link>https://dev.to/nirwan_sharma</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%2F4145196%2Fb50fa882-4743-4fa3-8b9a-de4b5f5e0656.png</url>
      <title>DEV Community: Nirwan Sharma</title>
      <link>https://dev.to/nirwan_sharma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nirwan_sharma"/>
    <language>en</language>
    <item>
      <title>Touch Grass Buddy: a tiny app that sends me outside</title>
      <dc:creator>Nirwan Sharma</dc:creator>
      <pubDate>Fri, 09 Oct 2026 11:33:41 +0000</pubDate>
      <link>https://dev.to/nirwan_sharma/touch-grass-buddy-a-tiny-app-that-sends-me-outside-39a5</link>
      <guid>https://dev.to/nirwan_sharma/touch-grass-buddy-a-tiny-app-that-sends-me-outside-39a5</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Touch Grass Buddy is a one-page web app that gives you a small outdoor mission. You tell it where you are, how much time you have, how you feel, and what you like. It replies with one mission, three short steps, one thing to notice, and a phone rule (keep the phone in your pocket). After you come back, you tap "I went outside" and it counts your trips.&lt;/p&gt;

&lt;p&gt;It is made for anyone who scrolls too much and just needs a small push to step outside. The screen part takes about a minute. The rest happens in the real world.&lt;/p&gt;

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

&lt;p&gt;Try it here: &lt;a href="https://codepen.io/Nirwan-Sharma/pen/01a1203c-9f89-7202-ba27-ae70ed1553dd" rel="noopener noreferrer"&gt;https://codepen.io/Nirwan-Sharma/pen/01a1203c-9f89-7202-ba27-ae70ed1553dd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To try it, you need your own free API key from Google AI Studio. The key stays only in your browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysmdjwvgmsgns7bs4rau.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysmdjwvgmsgns7bs4rau.jpg" alt=" " width="800" height="1784"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs61tt6hqbtt58ogkqfby.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs61tt6hqbtt58ogkqfby.jpg" alt=" " width="800" height="1784"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;The whole app is a single HTML file, so all the code is inside the CodePen above. This is the part that talks to the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://generativelanguage.googleapis.com/v1beta/models/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;modelId&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;:generateContent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x-goog-api-key&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;I am a complete beginner. Before this week I had never written any code. I was confused in the AI models but after some research i learned it because I only had my phone and a few days. I built everything on my phone, and I used an AI assistant (Claude) to help write the code and explain each step.&lt;/p&gt;

&lt;p&gt;The app uses Gemma 4, an open-weight model from Google. A dropdown lets you switch between Gemma 4 31B and the lighter Gemma 4 26B. I ran into a real problem: the model sometimes returned an empty answer or a server error (500). So I added a retry that automatically tries the other model before giving up.&lt;/p&gt;

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

&lt;p&gt;Because Gemma is open-weight, my idea is not locked to one company's model. I could swap between two sizes by changing one value, and the same model can later run on my own computer instead of a server. For this first version I used Google's hosted API with a free key, because I only had my phone and two days. A closed model would not give me that freedom to move or change it later.&lt;/p&gt;

&lt;h2&gt;
  
  
  I Actually Went Outside
&lt;/h2&gt;

&lt;p&gt;The app gave me this mission: Find a quiet spot near some plants to sit and rest.&lt;br&gt;
STEPS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Walk slowly toward the nearest greenery.&lt;/li&gt;
&lt;li&gt;Find a place to sit and be still.&lt;/li&gt;
&lt;li&gt;Stay safe while you relax.
NOTICE: Listen for the sound of a bird.
PHONE RULE: Keep your phone in your pocket until you go back inside. I did it at home in evening. I felt the relaxation and also felt connected to nature and it gives mental peace.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqmmhjj79cxxga6t1740.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnqmmhjj79cxxga6t1740.jpg" alt=" " width="800" height="1418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The screen was the shortest part of the day, and the walk was the best part.&lt;/p&gt;

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

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

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