<?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: Farhan Mallik</title>
    <description>The latest articles on DEV Community by Farhan Mallik (@farhan_mallik).</description>
    <link>https://dev.to/farhan_mallik</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%2F3935994%2Fd1c83e33-4fd0-4985-a6eb-92a84e1dacb8.jpg</url>
      <title>DEV Community: Farhan Mallik</title>
      <link>https://dev.to/farhan_mallik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhan_mallik"/>
    <language>en</language>
    <item>
      <title>NatureQuest Audio Explorer - Touch Grass with AI 🌲🎧</title>
      <dc:creator>Farhan Mallik</dc:creator>
      <pubDate>Sun, 11 Oct 2026 17:53:25 +0000</pubDate>
      <link>https://dev.to/farhan_mallik/naturequest-audio-explorer-touch-grass-with-ai-4gic</link>
      <guid>https://dev.to/farhan_mallik/naturequest-audio-explorer-touch-grass-with-ai-4gic</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;link &lt;a href="https://naturequest-audio-explorer.onrender.com/" rel="noopener noreferrer"&gt;web link&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;NatureQuest Audio Explorer&lt;/strong&gt; is an open-source agentic web application engineered to solve digital screen fatigue. In a world of notifications and doomscrolling, NatureQuest gently nudges you to close your laptop, lace up your shoes, and literally &lt;strong&gt;touch grass&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Enter any city, neighborhood, or park, and NatureQuest orchestrates an autonomous AI agent that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scouts real trails &amp;amp; parks&lt;/strong&gt; near you using &lt;strong&gt;SerpApi&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crafts an inspiring 3-sentence sensory quest&lt;/strong&gt; using the open-weight &lt;strong&gt;Gemma 2-9B&lt;/strong&gt; model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synthesizes a calming audio companion&lt;/strong&gt; via &lt;strong&gt;ElevenLabs&lt;/strong&gt;, complete with timeline scrubbers, volume controls, and offline download support.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preserves the quest into a global Community Vault&lt;/strong&gt; powered by &lt;strong&gt;MongoDB Atlas&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  🚀 Demo &amp;amp; Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Web App on Render:&lt;/strong&gt; &lt;a href="https://naturequest-audio-explorer.onrender.com/" rel="noopener noreferrer"&gt;https://naturequest-audio-explorer.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/farhanmallik05/naturequest-audio-explorer" rel="noopener noreferrer"&gt;github.com/farhanmallik05/naturequest-audio-explorer&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🏗️ How I Built It: The Agentic Workflow
&lt;/h2&gt;

&lt;p&gt;Instead of a monolithic prompt, NatureQuest implements an autonomous agent architecture powered by &lt;strong&gt;Mastra&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TD
    A["User Input: Location (e.g. Kyoto Arashiyama)"] --&amp;gt; B["Mastra Agent Orchestrator (natureGuideAgent)"]
    B --&amp;gt; C["natureSearchTool (SerpApi)"]
    C --&amp;gt;|"Authentic outdoor spots &amp;amp; trailheads"| B
    B --&amp;gt; D["Gemma 2-9B Reasoning (Groq / Open-Weight)"]
    D --&amp;gt;|"Sensory-rich 3-sentence quest"| B
    B --&amp;gt; E["elevenLabsTtsTool (ElevenLabs)"]
    E --&amp;gt;|"Crystal-clear audio guide narration"| B
    B --&amp;gt; F["questMemoryTool (MongoDB Atlas)"]
    F --&amp;gt;|"Stores quest in Community Vault"| B
    B --&amp;gt; G["Interactive Next.js Player &amp;amp; Community Vault"]&lt;/code&gt;&lt;/pre&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ User: "Kyoto Arashiyama" ]
            │
            ▼
┌────────────────────────────────────────────────────────┐
│            Mastra Agent Orchestration Loop             │
├────────────────────────────────────────────────────────┤
│ 1. natureSearchTool (SerpApi)                          │
│    Scouts authentic outdoor spots and trailheads       │
│                                                        │
│ 2. Gemma 2-9B Reasoning (Groq / Open-Weight)           │
│    Crafts sensory-rich 3-sentence quest                │
│                                                        │
│ 3. elevenLabsTtsTool (ElevenLabs)                      │
│    Generates crystal-clear audio guide                 │
│                                                        │
│ 4. questMemoryTool (MongoDB Atlas)                     │
│    Stores quest into global community vault            │
└────────────────────────────────────────────────────────┘
            │
            ▼
[ Interactive Next.js Player + Community Adventure Vault ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Agent &amp;amp; Tools Orchestration (Mastra)
&lt;/h3&gt;

&lt;p&gt;We instantiated a genuine Mastra &lt;code&gt;Agent&lt;/code&gt; (&lt;code&gt;natureGuideAgent&lt;/code&gt; via &lt;code&gt;@mastra/core/agent&lt;/code&gt;) coupled with modular tools via &lt;code&gt;@mastra/core/tools&lt;/code&gt; (&lt;code&gt;natureSearchTool&lt;/code&gt;, &lt;code&gt;elevenLabsTtsTool&lt;/code&gt;, &lt;code&gt;questMemoryTool&lt;/code&gt;). The orchestrator coordinates tool calls, validates inputs and outputs with Zod schemas, and handles graceful error boundaries.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Open-Weight Model Reasoning (Gemma via Groq)
&lt;/h3&gt;

&lt;p&gt;We prompt &lt;strong&gt;Gemma 2-9B-IT&lt;/strong&gt; using an intentional sensory framework:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Sentence 1 (Invitation):&lt;/em&gt; Direct call to step away from screens and visit a named trailhead.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Sentence 2 (Mindful Action):&lt;/em&gt; An actionable sensory cue (e.g. feeling cool pine bark, smelling damp soil, noticing wind patterns).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Sentence 3 (Perspective):&lt;/em&gt; A philosophical closing on how nature reconnects our mind.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Voice Companion &amp;amp; Clean Audio Streaming (ElevenLabs &amp;amp; Next.js)
&lt;/h3&gt;

&lt;p&gt;Walking outside shouldn't mean staring down at your smartphone. NatureQuest converts the written quest into a soothing spoken narration using ElevenLabs Rachel voice. We designed a dual audio architecture: immediate base64 playback for newly synthesized adventures, plus a dedicated clean binary MP3 audio endpoint (&lt;code&gt;GET /api/quest?id=...&amp;amp;audio=1&lt;/code&gt;) that delivers proper &lt;code&gt;audio/mpeg&lt;/code&gt; streaming headers and HTTP caching without bloating JSON payloads. The frontend features a custom audio player with timeline seeking, waveform visualization, and an offline &lt;code&gt;.mp3&lt;/code&gt; download button so hikers can continue their quest even when cell reception drops.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Persistent Memory Layer (MongoDB Atlas)
&lt;/h3&gt;

&lt;p&gt;Every quest is logged into MongoDB Atlas, creating a collective community vault of nature quests worldwide. Hikers can browse past quests, replay audio guides, and see what green spaces other explorers discovered.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Deployment &amp;amp; Reliability (Render &amp;amp; Sentry)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Render Web Service:&lt;/strong&gt; Built with declarative infrastructure via &lt;code&gt;render.yaml&lt;/code&gt; and a multi-stage &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Guardrails:&lt;/strong&gt; In-memory sliding-window rate limiter (15 requests/min per IP) to prevent DDoS and API quota exhaustion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentry Integration:&lt;/strong&gt; Real-time exception capture for front-end and back-end runtimes.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌍 Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;Open innovation and open-weight models like &lt;strong&gt;Gemma&lt;/strong&gt; are foundational to the future of technology:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;True Offline Freedom in the Backcountry:&lt;/strong&gt; Closed proprietary APIs require high-speed internet. When you hike into deep ravines or mountain trails where cell towers can't reach, closed models are useless. Because Gemma is open-weight, it can run locally on an edge device (e.g., using Ollama or llama.cpp on a phone or Raspberry Pi in a backpack), providing guidance anywhere on Earth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Monopolistic Vendor Lock-in:&lt;/strong&gt; Open models ensure developers aren't vulnerable to unexpected price hikes, sudden deprecations, or opaque content filtering on benign outdoor descriptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditable &amp;amp; Fine-Tunable:&lt;/strong&gt; Communities can adapt Gemma to regional ecology, indigenous botanical knowledge, and localized conservation efforts without asking permission from big-tech gatekeepers.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories I am targeting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Mastra:&lt;/strong&gt; Modular &lt;code&gt;createTool&lt;/code&gt; architecture, typed inputs/outputs, and autonomous tool orchestration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Core generative intelligence powered by Google's Gemma 2-9B model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs:&lt;/strong&gt; High-fidelity voice synthesis designed specifically for screen-free walking experiences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of SerpApi:&lt;/strong&gt; Live localized search discovering actual green spaces and parks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of MongoDB Atlas:&lt;/strong&gt; Scalable cloud document storage providing persistent adventure history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; Automated deployment pipeline via &lt;code&gt;render.yaml&lt;/code&gt; infrastructure-as-code.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💚 Final Thought
&lt;/h2&gt;

&lt;p&gt;Next time you feel overwhelmed by browser tabs or Slack notifications, remember: the outdoors is only a few steps away. Go outside, breathe deeply, and touch grass!&lt;/p&gt;

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