<?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: Sayem Rahman</title>
    <description>The latest articles on DEV Community by Sayem Rahman (@rahmansayem163).</description>
    <link>https://dev.to/rahmansayem163</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%2F4160393%2Fb75203f0-7b2b-4285-9b17-f1db935025c8.png</url>
      <title>DEV Community: Sayem Rahman</title>
      <link>https://dev.to/rahmansayem163</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahmansayem163"/>
    <language>en</language>
    <item>
      <title>Canopy: Rewarding Laziness in Git Workflows with On-Demand Slices and Semantic Caching</title>
      <dc:creator>Sayem Rahman</dc:creator>
      <pubDate>Sat, 24 Oct 2026 05:30:43 +0000</pubDate>
      <link>https://dev.to/rahmansayem163/canopy-rewarding-laziness-in-git-workflows-with-on-demand-slices-and-semantic-caching-4mm3</link>
      <guid>https://dev.to/rahmansayem163/canopy-rewarding-laziness-in-git-workflows-with-on-demand-slices-and-semantic-caching-4mm3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Drafted on DEV via DevRelay MCP: &lt;a href="https://dev.to/rahmansayem163/canopy-rewarding-laziness-in-git-workflows-with-on-demand-slices-and-semantic-caching-1pom-temp-slug-2457033/edit"&gt;Edit on DEV&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


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

&lt;p&gt;Cloning a multi-gigabyte monorepo just to inspect one file or understand a recent change wastes gigabytes of bandwidth and minutes of developer time. I built &lt;strong&gt;Canopy&lt;/strong&gt; (live at &lt;a href="https://canopy-lazy-git.onrender.com" rel="noopener noreferrer"&gt;https://canopy-lazy-git.onrender.com&lt;/a&gt;) to reward developer laziness: instead of downloading thousands of untouched blobs upfront, it mounts repositories using 767-byte manifest slices and materializes files strictly on demand. When you ask for diff digests, commit messages, or component architecture, Canopy derives the answer once with Google Gemma, validates it through Zod, and caches it permanently in SQLite for instant warm reads.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Problem: Monorepos Punish Curiosity
&lt;/h3&gt;

&lt;p&gt;In large monorepos, traditional developer tools demand total commitment up front. You want to check what changed in the billing service? Run &lt;code&gt;git clone&lt;/code&gt;, wait several minutes, pull down hundreds of megabytes of history, and watch your laptop fan spin.&lt;/p&gt;

&lt;p&gt;Anthropic's Scion explored making git lazy for autonomous AI agents. Canopy makes a repository lazy for &lt;strong&gt;human developers&lt;/strong&gt;, backed by an open-weight model and content-addressed local caching that you control.&lt;/p&gt;
&lt;h3&gt;
  
  
  Key Capabilities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lazy Slice-Based Filesystem (&lt;code&gt;src/cli/client.ts&lt;/code&gt;)&lt;/strong&gt;: &lt;code&gt;canopy mount&lt;/code&gt; fetches only the root directory manifest slice (767 bytes). Sub-directories and file blobs are resolved on demand and cached in &lt;code&gt;.canopy/objects/&lt;/code&gt; using their SHA-1 hashes. Subsequent reads hit local disk in 25.7 ms with &lt;strong&gt;0 network bytes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bilingual Repository Digest (&lt;code&gt;canopy digest&lt;/code&gt;)&lt;/strong&gt;: Generates an authoritative two-line summary and potential risk flags for recent commit ranges (e.g. &lt;code&gt;HEAD~5&lt;/code&gt;) in either English or Bengali (&lt;code&gt;--lang bn&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architectural Role Explanation (&lt;code&gt;canopy why &amp;lt;path&amp;gt;&lt;/code&gt;)&lt;/strong&gt;: Analyzes git commit history, file blame, and author distributions to explain a component's primary role and evolution patterns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit Message Synthesizer (&lt;code&gt;canopy commit&lt;/code&gt;)&lt;/strong&gt;: Derives concise, conventional commit titles and bodies from staged diffs piped via stdin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boot-Time Demo Cache Warmer (&lt;code&gt;src/server/warmer.ts&lt;/code&gt;)&lt;/strong&gt;: Pre-warms key digests and architecture files on boot, dropping initial user latency from ~13.7s to &lt;strong&gt;~4ms&lt;/strong&gt; (a &lt;strong&gt;3,400x speedup&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentry GenAI Agent Tracing (&lt;code&gt;src/server/sentry.ts&lt;/code&gt;)&lt;/strong&gt;: Instruments every LLM call across four designated agents (&lt;code&gt;CanopyDigestAgent&lt;/code&gt;, &lt;code&gt;CanopyWhyAgent&lt;/code&gt;, &lt;code&gt;CanopyCommitAgent&lt;/code&gt;, &lt;code&gt;CanopySummaryAgent&lt;/code&gt;) following OpenTelemetry semantic conventions, with strict developer privacy that scrubs client IP addresses and diff payloads.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;Experience Canopy directly in your browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Web Application&lt;/strong&gt;: &lt;a href="https://canopy-lazy-git.onrender.com" rel="noopener noreferrer"&gt;https://canopy-lazy-git.onrender.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Zero-Wait Demo Experience&lt;/strong&gt;: Explore the interactive tree viewer, inspect code blobs with cached AI summaries, toggle between English and Bengali digests, inspect architectural why files, and view real-time GenAI trace telemetry.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FSayemR0018%2Fcanopy%2Fmain%2Fdocs%2Fdemo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FSayemR0018%2Fcanopy%2Fmain%2Fdocs%2Fdemo.gif" alt="Canopy Walkthrough Demo" width="540" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Walkthrough Video&lt;/strong&gt;: &lt;a href="https://github.com/SayemR0018/canopy/blob/main/docs/demo.webm" rel="noopener noreferrer"&gt;docs/demo.webm&lt;/a&gt; (WebM, 1280x720, 86s, 5.40 MB)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-Resolution GIF&lt;/strong&gt;: &lt;a href="https://raw.githubusercontent.com/SayemR0018/canopy/main/docs/demo.gif" rel="noopener noreferrer"&gt;docs/demo.gif&lt;/a&gt; (540x304, 0.91 MB)&lt;/li&gt;
&lt;/ul&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/SayemR0018" rel="noopener noreferrer"&gt;
        SayemR0018
      &lt;/a&gt; / &lt;a href="https://github.com/SayemR0018/canopy" rel="noopener noreferrer"&gt;
        canopy
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A lazy, AI-assisted layer over git
    &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;Canopy 🌲&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;A lazy, AI-assisted layer over git that treats repositories as server-authoritative knowledge graphs, fetching files on demand and caching derived LLM insights.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Built for the &lt;strong&gt;dev.to Hacktoberfest Open-Source AI Challenge Week 3: "Slow and Steady"&lt;/strong&gt; (rewarding laziness in developer workflows).&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The Concept: Lazy Repositories for Lazy Developers &amp;amp; Agents&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Modern monorepos and sprawling codebases waste gigabytes of bandwidth and minutes of developer time during full clones, even when an engineer or AI agent only needs to read 5 files and understand recent changes.&lt;/p&gt;
&lt;p&gt;Canopy is inspired by the architecture described in Anthropic's public post, &lt;em&gt;"Redesigning source control at Anthropic"&lt;/em&gt; (Scion), along with ideas from Meta's Sapling and Mononoke:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server-Authoritative Tree&lt;/strong&gt;: Clients do not clone full git commit graphs or download historical packfiles upfront.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy Hydration&lt;/strong&gt;: The client mounts a lightweight tree manifest. Blobs are fetched only when read (&lt;code&gt;canopy cat&lt;/code&gt; or UI file view) and…&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/SayemR0018/canopy" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/SayemR0018/canopy" rel="noopener noreferrer"&gt;https://github.com/SayemR0018/canopy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License&lt;/strong&gt;: Permissive &lt;strong&gt;MIT License&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack&lt;/strong&gt;: Node &amp;gt;= 22.5.0, TypeScript, Hono, Dual SQLite Adapter (&lt;code&gt;node:sqlite&lt;/code&gt; / &lt;code&gt;better-sqlite3&lt;/code&gt; with WAL mode), Google Gemma 4 (&lt;code&gt;models/gemma-4-26b-a4b-it&lt;/code&gt;), Sentry, Docker, Render.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Lazy Payoff: Real Benchmark Numbers
&lt;/h2&gt;

&lt;p&gt;To measure real-world performance without network variance, Canopy includes a deterministic synthetic repository generator (&lt;code&gt;scripts/seed.ts&lt;/code&gt;) producing &lt;strong&gt;3,000 files across 40 directories and 200 commits&lt;/strong&gt; in under 2 seconds.&lt;/p&gt;

&lt;p&gt;Every number below comes directly from our 7-iteration benchmark script (&lt;code&gt;scripts/benchmark.ts&lt;/code&gt;), audited automatically by &lt;code&gt;scripts/check-claims.ts&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Traditional Git Clone (history)&lt;/th&gt;
&lt;th&gt;Working Tree Baseline&lt;/th&gt;
&lt;th&gt;Canopy Lazy Layer (Median)&lt;/th&gt;
&lt;th&gt;Difference / Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Initial Operation Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,858 ms (&lt;code&gt;git clone&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;266 ms (&lt;code&gt;canopy mount&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;7x faster initial setup&lt;/strong&gt; (min: 250 ms, max: 334 ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Initial Download Size&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,908,949 bytes (2.77 MiB)&lt;/td&gt;
&lt;td&gt;1,486,369 bytes (1.42 MiB)&lt;/td&gt;
&lt;td&gt;767 bytes (0.7 KiB)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100% initial bandwidth saved&lt;/strong&gt; (root slice)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cold Read (5 files)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Included in clone&lt;/td&gt;
&lt;td&gt;Included in working tree&lt;/td&gt;
&lt;td&gt;1,102 ms (1,937 bytes / 1.9 KiB)&lt;/td&gt;
&lt;td&gt;Selective on-demand fetch (min: 1,080 ms, max: 1,243 ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Warm Read (5 files)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Filesystem cache&lt;/td&gt;
&lt;td&gt;Filesystem cache&lt;/td&gt;
&lt;td&gt;25.7 ms (0 network bytes)&lt;/td&gt;
&lt;td&gt;Local content-addressed cache (min: 22.8 ms, max: 28.8 ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total Transfer (5 files)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,908,949 bytes (2.77 MiB)&lt;/td&gt;
&lt;td&gt;1,486,369 bytes (1.42 MiB)&lt;/td&gt;
&lt;td&gt;2,704 bytes (2.6 KiB)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;99.9% savings vs clone&lt;/strong&gt; (99.8% vs tree)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total Time (Mount + 5 files)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,858 ms&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;1,368 ms&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.4x faster end-to-end&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Baselines Explained
&lt;/h3&gt;

&lt;p&gt;We benchmark Canopy against two standard baselines: &lt;strong&gt;Full Git Clone (with history)&lt;/strong&gt;, which measures the complete network and disk footprint of cloning the repository including all historical packfiles, commit objects, and the working tree (2.77 MiB); and &lt;strong&gt;Working Tree Size&lt;/strong&gt;, which measures only the raw uncompressed bytes of the checked-out repository files on disk at HEAD without &lt;code&gt;.git&lt;/code&gt; metadata (1.42 MiB). Canopy fundamentally restructures repository hydration: &lt;code&gt;canopy mount&lt;/code&gt; transfers only a lightweight 767-byte root manifest slice, expanding directory slices (e.g. &lt;code&gt;apps/web/src&lt;/code&gt;) and streaming individual file blobs strictly on demand with local content-addressed deduplication.&lt;/p&gt;

&lt;p&gt;📊 Benchmark Reproduction &amp;amp; PRNG Technical Detail&lt;/p&gt;

&lt;p&gt;The benchmark suite generates a deterministic synthetic monorepo using a Mulberry32 PRNG (seed: &lt;code&gt;1337&lt;/code&gt;). All benchmark iterations are committed as machine-verifiable artifacts in &lt;code&gt;docs/benchmark-results.json&lt;/code&gt; and audited on every run via &lt;code&gt;npm run check-claims&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Went Wrong &amp;amp; Lessons Learned
&lt;/h2&gt;

&lt;p&gt;Engineering software that bridges low-level git internals, embedded databases, and probabilistic AI models invariably uncovers sharp edges. Here are four real problems we hit and how we solved them:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Native SQLite Dilemma on Windows vs Linux (D007)
&lt;/h3&gt;

&lt;p&gt;We wanted SQLite in WAL mode for synchronous, zero-network caching. In production Docker containers on Linux, &lt;code&gt;better-sqlite3&lt;/code&gt; compiled cleanly. But on developer Windows machines without Visual Studio C++ build tools installed, &lt;code&gt;npm install&lt;/code&gt; choked on &lt;code&gt;node-gyp&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We architected a dual-engine database adapter (&lt;code&gt;src/db/index.ts&lt;/code&gt;). It dynamically detects the runtime: on Node &amp;gt;= 22.5.0, it leverages Node's built-in &lt;code&gt;node:sqlite&lt;/code&gt; (&lt;code&gt;DatabaseSync&lt;/code&gt;), while falling back to &lt;code&gt;better-sqlite3&lt;/code&gt; when available. Both implement an identical TypeScript contract with zero API divergence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔧 Technical Detail: Dual SQLite Engine Adapter&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Dynamically selects node:sqlite or better-sqlite3 with standard WAL PRAGMAs&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createDatabaseAdapter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dbPath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;DatabaseAdapter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DatabaseSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node:sqlite&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;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DatabaseSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dbPath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PRAGMA journal_mode = WAL; PRAGMA busy_timeout = 5000;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;NodeSqliteAdapter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&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;Database&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;better-sqlite3&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;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Database&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dbPath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pragma&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;journal_mode = WAL&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pragma&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;busy_timeout = 5000&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BetterSqliteAdapter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;db&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;h3&gt;
  
  
  2. The Platform-Locked Rollup Dependency Trap (D023)
&lt;/h3&gt;

&lt;p&gt;While testing Docker builds, &lt;code&gt;npm ci&lt;/code&gt; on Debian Linux crashed with &lt;code&gt;EBADPLATFORM: Unsupported platform for @rollup/rollup-win32-x64-msvc&lt;/code&gt;. Running &lt;code&gt;npm install&lt;/code&gt; on a Windows host had written Windows-specific optional native packages into &lt;code&gt;package-lock.json&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We cleaned platform-locked devDependencies from &lt;code&gt;package.json&lt;/code&gt;, pinned &lt;code&gt;engines.node&lt;/code&gt; to &lt;code&gt;&amp;gt;=22.5.0&lt;/code&gt;, and updated our multi-stage Docker build to execute &lt;code&gt;npm prune --omit=dev&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Ephemeral Port Clashing Behind Reverse Proxies (D024)
&lt;/h3&gt;

&lt;p&gt;We implemented per-IP rate limiting (60 req/min) to safeguard our Google AI Studio demo quota. In local testing, bursts returned HTTP 429 cleanly. But when deployed behind Render and Cloudflare, requests intermittently bypassed rate limits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Investigation&lt;/strong&gt;: Cloudflare and Render append proxy addresses to &lt;code&gt;x-forwarded-for&lt;/code&gt; and attach ephemeral client ports (&lt;code&gt;203.0.113.195:54321&lt;/code&gt;, &lt;code&gt;:54322&lt;/code&gt;). Because each HTTP connection used a different ephemeral port, our IP map treated them as separate clients!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We overhauled &lt;code&gt;src/server/app.ts&lt;/code&gt; to prioritize &lt;code&gt;cf-connecting-ip&lt;/code&gt;, split multi-hop &lt;code&gt;x-forwarded-for&lt;/code&gt; headers, and strip trailing &lt;code&gt;:port&lt;/code&gt; suffixes before looking up rate limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Production Cold Starts: Model Bakeoff &amp;amp; Thought Token Stripping (Measured Before/After)
&lt;/h3&gt;

&lt;p&gt;Generating deep architectural digests requires significant LLM inference. During initial live deployment testing, cold inference latency was a serious barrier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Measured Before&lt;/strong&gt;: First-user cold digest latency took &lt;strong&gt;13,705 ms p50&lt;/strong&gt; on Google AI Studio's Gemma 26B (&lt;code&gt;models/gemma-4-26b-a4b-it&lt;/code&gt;), while Gemma 31B spiked to &lt;strong&gt;24,200 ms p50&lt;/strong&gt; and hit a &lt;strong&gt;116-second timeout&lt;/strong&gt; with a degraded fallback. Furthermore, reasoning thought tokens enclosed in &lt;code&gt;&amp;lt;thought&amp;gt;...&amp;lt;/thought&amp;gt;&lt;/code&gt; blocks caused schema validation failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We evaluated 26B vs 31B across 5 live runs each (&lt;code&gt;scripts/bakeoff.ts&lt;/code&gt;, documented in &lt;code&gt;docs/bakeoff.md&lt;/code&gt;). 26B achieved 100% first-try schema validity vs 80% for 31B. We patched &lt;code&gt;DerivedService&lt;/code&gt; with regex thought stripping (&lt;code&gt;&amp;lt;(thought|think)&amp;gt;[\s\S]*?&amp;lt;\/\1&amp;gt;&lt;/code&gt;), and implemented a background cache warmer (&lt;code&gt;src/server/warmer.ts&lt;/code&gt;) pre-populating English &amp;amp; Bengali digests and 3 key architecture files on boot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measured After&lt;/strong&gt;: First-user digest requests now hit SQLite cache in &lt;strong&gt;~4 ms instead of ~13.7s&lt;/strong&gt; (a &lt;strong&gt;3,400x speedup&lt;/strong&gt;), backed by 60s server timeouts and a visible warming status badge in the Web UI.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Code is proprietary, developer bandwidth is scarce, and infrastructure is expensive. The open-source AI paradigm offers distinct advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vendor Sovereignty &amp;amp; Zero Lock-In&lt;/strong&gt;: Canopy's LLM layer is built strictly on the standard OpenAI-compatible API format (&lt;code&gt;/v1/chat/completions&lt;/code&gt;) without proprietary vendor SDKs. You can run Canopy against Google AI Studio's Gemma endpoint in the cloud, or point &lt;code&gt;CANOPY_LLM_BASE_URL&lt;/code&gt; to a local Ollama instance (&lt;code&gt;http://localhost:11434/v1&lt;/code&gt;) running on your laptop with &lt;strong&gt;zero code modifications&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Resilience&lt;/strong&gt;: When internet access drops or API quotas are exhausted, Canopy doesn't crash. Every operation is guarded by strict Zod schemas, 2 automatic retries, and deterministic offline heuristic fallbacks flagged &lt;code&gt;is_degraded = 1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Privacy&lt;/strong&gt;: With local models via Ollama, zero lines of code or commit diffs ever leave your developer machine.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Honest Verification Status&lt;/em&gt;: Google AI Studio's hosted Gemma 4 model was fully verified live in production. The offline local path via Ollama is fully implemented with automated probing (&lt;code&gt;npm run verify:ollama&lt;/code&gt; generating &lt;code&gt;docs/ollama-results.json&lt;/code&gt;), but is currently marked &lt;strong&gt;unverified&lt;/strong&gt; because the local Ollama daemon was not running on the Windows test machine during this build pass.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sentry GenAI Agent Tracing &amp;amp; Privacy
&lt;/h2&gt;

&lt;p&gt;Observability is essential when managing multi-agent AI systems. We integrated Sentry OpenTelemetry GenAI agent tracing across four designated agent personas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CanopyDigestAgent&lt;/code&gt;: Commit range synthesis and risk assessment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CanopyWhyAgent&lt;/code&gt;: Architectural role and code evolution analysis&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CanopyCommitAgent&lt;/code&gt;: Conventional commit message generation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CanopySummaryAgent&lt;/code&gt;: File-level responsibility extraction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each span captures standard semantic attributes (&lt;code&gt;gen_ai.system&lt;/code&gt;, &lt;code&gt;gen_ai.request.model&lt;/code&gt;, prompt/completion tokens, input/output tokens, latency, cache hit/miss, retry count, and degraded status). &lt;/p&gt;

&lt;h3&gt;
  
  
  Privacy by Design
&lt;/h3&gt;

&lt;p&gt;Developer code must remain confidential. In &lt;code&gt;src/server/sentry.ts&lt;/code&gt;, we implemented strict privacy protections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client IP addresses are scrubbed and never stored (&lt;code&gt;user.ip_address: undefined&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Raw diff payloads and file source contents are stripped from event context before envelope dispatch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run our automated trace demo generator to simulate and dispatch 20 real-world scenarios to Sentry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run trace:demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note on Delivery Verification&lt;/em&gt;: Because client envelope dispatch is asynchronous fire-and-forget, traces must be visually confirmed by a human checking &lt;strong&gt;Explore &amp;gt; Agents&lt;/strong&gt; in the Sentry dashboard.&lt;/p&gt;




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

&lt;p&gt;This project was built pair-programming with &lt;strong&gt;Antigravity&lt;/strong&gt;, Google's agentic AI assistant.&lt;/p&gt;

&lt;p&gt;Hackathon challenge eligibility and tracking were verified through the &lt;strong&gt;DevRelay MCP Gateway&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We called &lt;code&gt;devrelay-gateway/get_challenges&lt;/code&gt; via MCP, confirming that Challenge ID 81 (&lt;em&gt;Hacktoberfest Open-Source AI Challenge: Week 3: Slow and Steady&lt;/em&gt;) is &lt;strong&gt;ACTIVE&lt;/strong&gt; through &lt;code&gt;2026-10-25T06:59:00Z&lt;/code&gt; (see &lt;a href="https://github.com/SayemR0018/canopy/blob/main/DEVRELAY_STATUS.md" rel="noopener noreferrer"&gt;DEVRELAY_STATUS.md&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Working with an agent was a rigorous pair-programming dialogue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Diagnosing why Windows PowerShell requires &lt;code&gt;;&lt;/code&gt; instead of &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; for command chaining.&lt;/li&gt;
&lt;li&gt;Inspecting Vitest logs when file extension heuristics generated &lt;code&gt;.tsx&lt;/code&gt; instead of &lt;code&gt;.ts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Writing automated verification scripts (&lt;code&gt;scripts/verify.ts&lt;/code&gt;) to validate every gate before committing.&lt;/li&gt;
&lt;li&gt;Establishing an honest engineering standard: every single claim in this post and the repository README is verified by &lt;code&gt;scripts/check-claims.ts&lt;/code&gt; against &lt;code&gt;docs/benchmark-results.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🧪 Automated 7-Gate Verification Suite&lt;/p&gt;

&lt;p&gt;Every release passes 7 sequential verification gates:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Vitest suite (48 tests across 6 test suites)&lt;/li&gt;
&lt;li&gt;Local Mock LLM server startup&lt;/li&gt;
&lt;li&gt;Synthetic bare monorepo generation (3,000 files, 200 commits)&lt;/li&gt;
&lt;li&gt;Canopy server boot with SQLite WAL&lt;/li&gt;
&lt;li&gt;E2E lazy fetch benchmark (verifying &amp;gt;= 98% bandwidth savings)&lt;/li&gt;
&lt;li&gt;Zero-call cache hit assertion &amp;amp; bad-model 2-retry heuristic degradation&lt;/li&gt;
&lt;li&gt;Numerical claims audit against &lt;code&gt;docs/benchmark-results.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma ($200)&lt;/strong&gt;: Canopy leverages Google Gemma 4 (&lt;code&gt;models/gemma-4-26b-a4b-it&lt;/code&gt;) via Google AI Studio's OpenAI-compatible endpoint as its primary reasoning engine for structured file summaries, bilingual git digests, and architectural role explanations backed by thought token stripping, Zod schema validation, a 2-retry repair loop, and boot-time cache warming (&lt;a href="https://github.com/SayemR0018/canopy/blob/main/src/server/derived.ts" rel="noopener noreferrer"&gt;src/server/derived.ts&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render ($200)&lt;/strong&gt;: Canopy is containerized with a production multi-stage Dockerfile and deployed on Render as an auto-seeding Web Service featuring an Infrastructure-as-Code Blueprint, automated REST API deployment orchestration, &lt;code&gt;/healthz&lt;/code&gt; health monitoring, and proxy-aware per-IP rate limiting (&lt;a href="https://github.com/SayemR0018/canopy/blob/main/render.yaml" rel="noopener noreferrer"&gt;render.yaml&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Sentry ($200)&lt;/strong&gt;: Canopy instruments every LLM call across four designated agent personas following OpenTelemetry GenAI semantic conventions with zero-leak IP and diff scrubbing, verifiable in Sentry under Explore &amp;gt; Agents (&lt;a href="https://github.com/SayemR0018/canopy/blob/main/src/server/sentry.ts" rel="noopener noreferrer"&gt;src/server/sentry.ts&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of GitHub ($200)&lt;/strong&gt;: Canopy integrates automated GitHub Actions CI verification gates, a 10-minute production keepwarm cron, repository Copilot guidance, a PR template, and curated good first issues with explicit acceptance criteria (&lt;a href="https://github.com/SayemR0018/canopy/blob/main/.github/workflows/ci.yml" rel="noopener noreferrer"&gt;.github/workflows/ci.yml&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sobuj Ghonta (সবুজ ঘণ্টা) — The Green Hour: Screen-Minimizing Urban Nature Companion</title>
      <dc:creator>Sayem Rahman</dc:creator>
      <pubDate>Wed, 07 Oct 2026 14:11:54 +0000</pubDate>
      <link>https://dev.to/rahmansayem163/sobuj-ghonta-sbuj-ghnnttaa-the-green-hour-screen-minimizing-urban-nature-companion-48ej</link>
      <guid>https://dev.to/rahmansayem163/sobuj-ghonta-sbuj-ghnnttaa-the-green-hour-screen-minimizing-urban-nature-companion-48ej</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 Submission 🌿&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;Four billion people live in dense metropolitan cities. When hackathons announce themes like &lt;strong&gt;"Touch Grass"&lt;/strong&gt;, the tacit assumption is that you live a short drive from pristine mountain trails or manicured suburban nature reserves.&lt;/p&gt;

&lt;p&gt;For those of us living in megacities like Dhaka, Delhi, or São Paulo, that is not reality. Our outdoors is an unforgiving landscape of sun-baked concrete, flyovers, gridlocked traffic, and isolated municipal parks like Ramna Park, Suhrawardy Udyan, or Dhanmondi Lake.&lt;/p&gt;

&lt;p&gt;Stepping outside in dense tropical cities comes with genuine environmental hazards:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Severe Air Pollution:&lt;/strong&gt; US AQI frequently spikes above 150 (Unhealthy) or 200 (Very Unhealthy), turning strenuous cardiovascular exercise into a pulmonary health risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Urban Heat Islands:&lt;/strong&gt; Apparent temperatures routinely exceed 38°C midday, elevating heat-stroke risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monsoon Humidity &amp;amp; Vector Risks:&lt;/strong&gt; Warm stagnant water and post-rain humidity (&amp;gt;70%) create high-risk environments for dengue and mosquito-borne illnesses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Worse yet, existing outdoor navigation and fitness apps create a glaring paradox: &lt;strong&gt;to navigate nature, they demand that you stay glued to a glowing glass screen.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;Sobuj Ghonta (সবুজ ঘণ্টা — "The Green Hour")&lt;/strong&gt; to solve this. It is an ambient, mobile-first, multilingual Progressive Web App designed with a singular architectural mandate: &lt;strong&gt;find your safe green window, get you outside safely, and then get out of your way.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Capabilities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Green Window Scoring (0–100):&lt;/strong&gt; Evaluates real-time Open-Meteo hourly telemetry across US AQI, PM2.5, heat index, UV radiation, precipitation probability, and sunset times to pinpoint the safest outdoor window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prior Labs TabPFN In-Context Uncertainty Forecasting:&lt;/strong&gt; Integrates the TabPFN tabular foundation model to deliver 24–72h quantile intervals ($p_{10}, p_{50}, p_{90}$) and anomaly detection, with fallback strictly labeled &lt;code&gt;"baseline (not TabPFN)"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Live Web Search (SerpApi &amp;amp; Serper):&lt;/strong&gt; Surfaces screen-minimizing park closures, gate maintenance, and official alerts in at most &lt;strong&gt;one concise spoken line&lt;/strong&gt; with prompt-injection defense.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Immutable Code Guardrails:&lt;/strong&gt; Hard mathematical checks that Google's open-weight &lt;strong&gt;Gemma&lt;/strong&gt; model cannot override. If AQI &amp;gt; 150, effort is locked to gentle; if AQI &amp;gt; 200, outdoor cardio is barred, and N95 mask / postpone guidance is enforced.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spoken Audio Walk in Your Pocket:&lt;/strong&gt; A flexible, cascading multi-tier TTS chain (studio-grade &lt;strong&gt;ElevenLabs&lt;/strong&gt; with monthly credit protection, zero-cost &lt;strong&gt;Gemini 3.8 Flash TTS&lt;/strong&gt; reusing the same key as Gemma, open-weight &lt;strong&gt;Meta MMS-TTS&lt;/strong&gt;, and client &lt;strong&gt;Web Speech API&lt;/strong&gt;) delivering mindful walk segments. Pair with lock-screen &lt;strong&gt;Media Session API&lt;/strong&gt; controls and an &lt;strong&gt;OLED pitch-black Pocket Mode&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global &amp;amp; Multilingual Support:&lt;/strong&gt; 8 languages (English, Bengali, Hindi, Spanish, Arabic with full RTL layout, French, Portuguese, Indonesian), unit conversions (°C/°F, km/mi), and 8 bundled offline city packs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screen-vs-Outside Meter &amp;amp; Canvas Receipt:&lt;/strong&gt; Uses the &lt;strong&gt;Page Visibility API&lt;/strong&gt; to track foreground screen seconds against total walk duration, generating a downloadable tactile share card.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Device Nature Journal:&lt;/strong&gt; Photo and note observations stored locally in browser &lt;strong&gt;IndexedDB&lt;/strong&gt;; photos are never uploaded or retained on remote servers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Field Test: Taking Sobuj Ghonta Outside
&lt;/h3&gt;

&lt;p&gt;I took Sobuj Ghonta out for a late-afternoon field run at Ramna Park to test whether the audio cues and the ScreenMeter metric could keep my phone in my pocket. At 4:30 PM, Shahbagh traffic was at peak gridlock, but the app identified an environmental window between 4:45 PM and 5:20 PM where the canopy temperature dropped to 29°C before the typical Dhaka post-sunset particulate spike trapped dust and exhaust at ground level. I plugged in my earphones, started the session, and walked the inner loop.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Where I went:&lt;/strong&gt; Ramna Park, Dhaka (starting from the Arunodoy gate, looping clockwise past the central lake, and cutting toward the tennis complex).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AQI that day:&lt;/strong&gt; US AQI 162 (Unhealthy), with high PM2.5 readings across the city, though the afternoon wind cleared a short dip before evening stagnation set in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What the plan got right:&lt;/strong&gt; It routed me away from the perimeter paved road toward the dirt path under the rain tree canopy, where radiant heat was noticeably lower. It also accurately flagged a mosquito warning for the lake perimeter starting at 5:10 PM, which hit almost right on cue as twilight settled.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What it got wrong:&lt;/strong&gt; The Overpass query routed me through a footpath near the park nursery that was padlocked for ground maintenance. The voice prompt repeatedly told me to turn left into a closed iron gate until I walked far enough past the boundary for the waypoint to clear.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How long I looked at the screen:&lt;/strong&gt; ScreenMeter logged 52 seconds of active screen time across a 34-minute walk (a 2.5% screen-to-walk ratio). I only took the phone out twice: once to check the detour around the locked gate, and once at the end to save an entry in the Nature Journal.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(Field Test Authenticity Note: The walk above represents my authentic in-person field test at Ramna Park in Dhaka. While the core guided walk, guardrails, and ScreenMeter have been field-tested outdoors, the newly added V2 features—TabPFN uncertainty intervals, live search heads-up, and the 7 non-Dhaka global city packs—were evaluated through empirical backtesting on real historical telemetry and comprehensive automated contract suites, rather than in-person field walks in those respective cities).&lt;/em&gt;&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Deployment on Render:&lt;/strong&gt; &lt;a href="https://sobujghonta.onrender.com/" rel="noopener noreferrer"&gt;https://sobujghonta.onrender.com/&lt;/a&gt; &lt;em&gt;(or deploy your own instance via the included Blueprint)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Key Instant Demo:&lt;/strong&gt; Tap &lt;strong&gt;"Demo (Offline)"&lt;/strong&gt; in the top navigation bar or select any of the 8 City Packs (Dhaka, Delhi, London, Los Angeles, Nairobi, São Paulo, Sydney, Tokyo). It runs entirely on bundled, authentic telemetry and pre-generated audio clips with &lt;strong&gt;0 ms external network latency&lt;/strong&gt; and &lt;strong&gt;zero API keys required&lt;/strong&gt;, allowing judges to test every feature instantly.&lt;/li&gt;
&lt;/ul&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%2F8zfnzgb3dvyy8bx8lokp.png" 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%2F8zfnzgb3dvyy8bx8lokp.png" alt="Sobuj Ghonta Mobile Interface" width="768" height="1376"&gt;&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/SayemR0018" rel="noopener noreferrer"&gt;
        SayemR0018
      &lt;/a&gt; / &lt;a href="https://github.com/SayemR0018/sobujGhonta" rel="noopener noreferrer"&gt;
        sobujGhonta
      &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;Sobuj Ghonta (সবুজ ঘণ্টা) — The Green Hour&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ambient, screen-minimizing outdoor companion for safe urban nature discovery.&lt;/strong&gt;&lt;br&gt;
Built for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05" rel="nofollow"&gt;DEV Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/SayemR0018/sobujGhonta/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://nodejs.org/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e1dcbc2da6e994600fb1cad0dbd0ae3ee79c4071949754b26a785b797722879b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652e6a732d32302e31382e302d626c75652e737667" alt="Node.js: 20.18.0"&gt;&lt;/a&gt;
&lt;a href="https://sobujghonta.onrender.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/95322b254204d4e6abe65001650ef1923da8d6a9a5a8c294a2700550277a9114/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656e6465722d4c69766525323044656d6f2d627269676874677265656e2e737667" alt="Live Demo"&gt;&lt;/a&gt;
&lt;a href="https://github.com/SayemR0018/sobujGhonta/docs/TEST_READY.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ee96c44aa1c5c475465b4525b2d23169e6ce0a36108c4ebe7167e039cb760e1b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d34363925324634363925323050617373696e672d737563636573732e737667" alt="Tests Passing"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/SayemR0018/sobujGhonta/docs/cover.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FSayemR0018%2FsobujGhonta%2FHEAD%2Fdocs%2Fcover.png" alt="Sobuj Ghonta Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌿 What is Sobuj Ghonta?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;For over four billion people living in dense urban centers, "touching grass" is not a 10-minute drive to pristine mountain trails. In high-density megacities like Dhaka, Delhi, or São Paulo, nature exists in fragmented municipal parks, lakeside paths, and pocket gardens nestled among flyovers and traffic.&lt;/p&gt;
&lt;p&gt;Stepping outside in these environments requires navigating &lt;strong&gt;harsh environmental realities&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Severe Air Pollution:&lt;/strong&gt; US AQI frequently spikes above 150 (Unhealthy) or 200 (Very Unhealthy), turning cardiovascular exertion into a pulmonary health risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Urban Heat Islands:&lt;/strong&gt; Apparent temperatures exceed 38°C midday, creating acute heat-stroke risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monsoon Humidity &amp;amp; Dengue Risks:&lt;/strong&gt; Stagnant water and post-rain humidity (&amp;gt;70%) trigger mosquito breeding seasons.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Worse yet, conventional navigation and fitness apps create a…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/SayemR0018/sobujGhonta" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; Permissive &lt;strong&gt;MIT License&lt;/strong&gt; (Open Source)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repository Structure:&lt;/strong&gt; Express production server and Vite React PWA client.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Verification:&lt;/strong&gt; 79 unit and contract tests across 12 suites (&lt;code&gt;npm test&lt;/code&gt;), 390 end-to-end integration tests across 78 suites (&lt;code&gt;npm run test:e2e&lt;/code&gt;), 16 production integration checks (&lt;code&gt;scripts/fullQaRunner.mjs&lt;/code&gt;), 9 deployment smoke tests (&lt;code&gt;scripts/smoke.mjs&lt;/code&gt;), and an empirical 48-hour TabPFN backtest (&lt;code&gt;scripts/backtest.mjs&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  1. Deterministic Green Window Scoring Engine
&lt;/h3&gt;

&lt;p&gt;Rather than delegating environmental safety decisions to probabilistic LLM hallucinations, Sobuj Ghonta calculates an objective 0–100 hourly score in deterministic JavaScript (&lt;code&gt;server/services/scoring.js&lt;/code&gt;):&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="c1"&gt;// Heuristic scoring: base 100 with environmental penalties and golden-hour bonus&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aqi&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;aqiPenalty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aqi&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;apparentTemp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;heatPenalty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;apparentTemp&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isThunder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;rainPenalty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;55&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isDaylight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;darknessPenalty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isGoldenHour&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;aqi&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;rainPenalty&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;goldenHourBonus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Immutable Code Guardrails That Gemma Cannot Override
&lt;/h3&gt;

&lt;p&gt;Public health recommendations cannot tolerate hallucinations. In &lt;code&gt;server/services/guardrails.js&lt;/code&gt;, strict rules validate and sanitize Gemma's structured JSON output:&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateAndCorrectPlan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;plan&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;guardrails&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;language&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;corrected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;plan&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="c1"&gt;// If AQI exceeds hazardous thresholds, override effort level&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;guardrails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hazardousAqi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;corrected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;effort_level&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rest&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;guardrails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;unhealthyAqi&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;corrected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;effort_level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;strenuous&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;corrected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;effort_level&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gentle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;// Guarantee mandatory medical disclaimer and mosquito alerts&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;corrected&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;h3&gt;
  
  
  3. Prior Labs TabPFN Tabular Foundation Model &amp;amp; Empirical Backtesting
&lt;/h3&gt;

&lt;p&gt;To forecast environmental safety with rigorous uncertainty bounds, we integrated Prior Labs' TabPFN tabular foundation model (&lt;code&gt;ml/services/tabpfn_engine.py&lt;/code&gt; and &lt;code&gt;server/services/mlClient.js&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quantile Forecasting:&lt;/strong&gt; Predicts hourly distributions $[p_{10}, p_{50}, p_{90}]$ for US AQI, PM2.5, apparent temperature, and UV using Prior Labs syntax (&lt;code&gt;output_type='quantiles'&lt;/code&gt;, &lt;code&gt;quantiles=[0.1, 0.5, 0.9]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anomaly Detection:&lt;/strong&gt; Flags statistical residual spikes against local 7-day hourly distributions to detect unseasonal smoke or heat surges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tri-State Fallback Parity:&lt;/strong&gt; If the Python ML sidecar is offline or constrained by memory caps on Render's 512MB free tier, &lt;code&gt;mlClient.js&lt;/code&gt; gracefully degrades to a deterministic baseline explicitly labeled &lt;code&gt;"baseline (not TabPFN)"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest Backtest Findings (&lt;code&gt;docs/TABPFN_EVAL.md&lt;/code&gt;):&lt;/strong&gt; We backtested on 48 held-out future hours across 168 hours of real Open-Meteo observations for Dhaka, Delhi, and London.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Where TabPFN won:&lt;/em&gt; On apparent temperature in Dhaka, TabPFN slashed Mean Absolute Error (MAE) from 2.62°C (persistence) down to &lt;strong&gt;1.33°C&lt;/strong&gt;, achieving 72.9% empirical coverage for the nominal 80% interval.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Honest Negative Results:&lt;/em&gt; On US AQI in Delhi, strong persistence during stagnant weather yielded lower short-horizon MAE (11.19) than TabPFN's general diurnal model (21.16). In London, seasonal-naive baselines struggled (MAE 24.42) while TabPFN delivered superior AQI bounds (MAE 18.49). All numbers are documented honestly without cherry-picking.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Unified Live Web Search Adapter (SerpApi &amp;amp; Serper)
&lt;/h3&gt;

&lt;p&gt;To address the exact failure discovered during my Ramna Park walk (a padlocked gate unknown to static OSM data), we built a unified live search engine (&lt;code&gt;server/services/search/index.js&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Screen-Minimizing Delivery:&lt;/strong&gt; Search output is filtered and distilled to &lt;strong&gt;at most ONE concise line&lt;/strong&gt; in the UI and spoken audio.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three Core Streams:&lt;/strong&gt; Park closures and gate issues, nearby community nature walks/birding, and official government air quality or heat advisories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Injection Defense (&lt;code&gt;server/services/search/normalizer.js&lt;/code&gt;):&lt;/strong&gt; Web search snippets are untrusted. We strip HTML tags, cap snippets at 200 characters, neutralize pseudo-URLs (&lt;code&gt;javascript:&lt;/code&gt;, &lt;code&gt;data:&lt;/code&gt;), and enforce prompt boundaries so instructions inside snippets can never override deterministic safety guardrails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy Design:&lt;/strong&gt; Latitude and longitude are rounded to 2 decimal places (~1.1 km) before generating cache keys, preventing user location tracking.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Multi-Tier Cascading TTS Provider Chain (ElevenLabs + Zero-Cost Fallbacks)
&lt;/h3&gt;

&lt;p&gt;Mindful nature audio guidance requires natural, calm delivery. Rather than locking users to a single costly vendor or an unnatural synthetic voice, we built a 4-tier cascading voice pipeline in &lt;code&gt;server/services/tts/index.js&lt;/code&gt; and &lt;code&gt;server/services/tts/elevenlabs.js&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ElevenLabs Multilingual Studio Voice (&lt;code&gt;eleven_multilingual_v2&lt;/code&gt;):&lt;/strong&gt; When configured via server environment or in-app HTTPS headers, ElevenLabs synthesizes rich, emotionally attuned guidance. We tuned the acoustic profile for slow outdoor walking (&lt;code&gt;speed: 0.9, stability: 0.5, similarity_boost: 0.75&lt;/code&gt;), resolved voices dynamically (&lt;code&gt;Anika&lt;/code&gt; default library voice, with dedicated language overrides for Bengali and English), and enforced an in-memory soft budget cap of &lt;strong&gt;8,000 characters/month&lt;/strong&gt; to protect free-tier users from bill shock or mid-walk quota failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 3.8 Flash TTS (&lt;code&gt;gemini-3.8-flash-tts&lt;/code&gt;):&lt;/strong&gt; Zero-cost fallback reusing the user's existing Google AI Studio key (&lt;code&gt;GEMMA_API_KEY&lt;/code&gt;). Generates 24 kHz studio-quality audio in English and Bengali (&lt;code&gt;bn-BD&lt;/code&gt;). When encountering Google's free-tier 3 RPM quota limit, it handles backoff automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meta MMS-TTS (&lt;code&gt;facebook/mms-tts-ben&lt;/code&gt; &amp;amp; &lt;code&gt;eng&lt;/code&gt;):&lt;/strong&gt; Open-weight multilingual speech models running on Hugging Face Serverless Inference behind an optional &lt;code&gt;HF_TOKEN&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Web Speech API &amp;amp; Bundled Audio:&lt;/strong&gt; Client-side zero-cloud fallback with automated Bengali voice detection, plus 8 pre-generated WAV clips committed into the repository and cached by Service Worker v2 for 0 ms offline walks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If ElevenLabs hits a concurrency limit, HTTP 429, or character budget cap, the orchestrator cascades seamlessly down to Gemini, MMS, or Web Speech without interrupting the walker's session.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Tactile UI Redesign, Pocket Mode &amp;amp; Share Card
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Information Architecture:&lt;/strong&gt; Rebuilt into 6 focused views: Home, Timeline (inline SVG band chart with TabPFN quantile bands), Places (list/radar toggle), Walk Mode (Pocket Mode), Journal, and Settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three Tactile Themes:&lt;/strong&gt; Light, Dark, and an OLED Pure Black (&lt;code&gt;#000000&lt;/code&gt;) theme that shuts off OLED pixels during pocket walks to maximize battery life.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canvas Walk Receipt:&lt;/strong&gt; When a walk concludes, &lt;code&gt;WalkReceiptModal.jsx&lt;/code&gt; draws a crisp graphic card via HTML5 Canvas highlighting total outdoor minutes, green score, and screen percentage (e.g., "Screen 2.5% of 34-min walk") ready for sharing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Three Zero-Leak Secret Paths &amp;amp; Production Hardening
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terminal CLI:&lt;/strong&gt; &lt;code&gt;npm run setup:keys&lt;/code&gt; prompts with masked input (&lt;code&gt;*&lt;/code&gt;) and writes &lt;code&gt;.env&lt;/code&gt; with &lt;code&gt;0600&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In-App Keys Panel:&lt;/strong&gt; Password inputs in Settings with format validation and ephemeral &lt;code&gt;sessionStorage&lt;/code&gt; default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Redacting Logger:&lt;/strong&gt; &lt;code&gt;server/services/logger.js&lt;/code&gt; automatically sanitizes API keys and tokens from server output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render Blueprint:&lt;/strong&gt; Configured via &lt;a href="https://github.com/SayemR0018/sobujGhonta/blob/main/render.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;render.yaml&lt;/code&gt;&lt;/a&gt; with reverse proxy trust, Helmet CSP, gzip/brotli compression, Node &lt;code&gt;20.18.0&lt;/code&gt; pinning, and decoupled &lt;code&gt;/health&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Building Sobuj Ghonta around open-weight models, open data, and open web standards demonstrated four clear advantages over closed proprietary ecosystems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Swappability &amp;amp; Offline Sovereignty:&lt;/strong&gt;&lt;br&gt;
A closed AI application is forever tethered to remote billing, latency, and vendor terms. Sobuj Ghonta's open architecture allows anyone to run &lt;code&gt;LLM_PROVIDER=ollama&lt;/code&gt; with &lt;code&gt;gemma2:9b&lt;/code&gt; on a consumer laptop. The entire loop — weather scoring, green space navigation, and AI walk generation — runs 100% offline with &lt;strong&gt;zero API toll&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Sovereignty &amp;amp; Location Privacy:&lt;/strong&gt;&lt;br&gt;
Personal location coordinates, walking routines, and photos of nature are deeply private. By relying on public open data (Open-Meteo and OpenStreetMap), rounding coordinates to 2 decimals, and storing journal entries exclusively in on-device &lt;strong&gt;IndexedDB&lt;/strong&gt;, the user's physical presence is never tracked, monetized, or sold into advertising profiles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Where Open Beat Closed (Deterministic Safety):&lt;/strong&gt;&lt;br&gt;
Commercial closed chat APIs tend to produce verbose, conversational essays that encourage prolonged screen interaction. By constraining open-weight Gemma with deterministic heuristic code guardrails, we produced terse, safety-verified walk scripts under 60 words that tell the user to put their phone away.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cultural &amp;amp; Linguistic Inclusion:&lt;/strong&gt;&lt;br&gt;
Open-weight models and open web standards allowed us to deliver first-class localization across 8 languages, including native Bengali typography (&lt;code&gt;Noto Sans Bengali&lt;/code&gt;) and full right-to-left layout for Arabic (&lt;code&gt;[dir="rtl"]&lt;/code&gt;), serving communities that are routinely overlooked by Western-centric wellness applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;This project was architected, implemented, and verified collaboratively using &lt;strong&gt;Google Antigravity&lt;/strong&gt; (&lt;code&gt;gemini_cli&lt;/code&gt;). Real agent session transcripts were curated, sanitized of secrets, and saved through &lt;strong&gt;DevRelay&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Session 1: Initial Architecture &amp;amp; Free TTS Chain
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/agent_sessions/sobuj-ghonta-architecture-free-tts-chain-full-qa-render-deployment-with-antigravity-d7vlbw"&gt;View Architecture &amp;amp; Free TTS Chain Agent Session&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Session 2: TabPFN Integration, Live Search Adapter, Global i18n &amp;amp; Production Verification
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/agent_sessions/sobuj-ghonta-v2-tabpfn-live-search-global-i18n-production-verification-with-antigravity-czgkve"&gt;View TabPFN &amp;amp; Production Verification Agent Session&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  Featured Categories
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma ($200):&lt;/strong&gt; Google's open-weight Gemma model serves as the core reasoning engine, generating mindful walking scripts, sensory missions, and multimodal photo observations strictly constrained by deterministic safety rules. Supports both Google AI Studio API (&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) and fully offline local &lt;strong&gt;Ollama&lt;/strong&gt; runtimes (&lt;code&gt;gemma2:9b&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render ($200):&lt;/strong&gt; Configured and deploy-ready on Render using a declarative Blueprint (&lt;a href="https://github.com/SayemR0018/sobujGhonta/blob/main/render.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;render.yaml&lt;/code&gt;&lt;/a&gt;) that provisions a unified Node.js web service serving the Express API, static PWA client, &lt;code&gt;/health&lt;/code&gt; monitoring, compression, and memory-safe fallbacks for the 512MB free tier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of TabPFN ($200):&lt;/strong&gt; Prior Labs TabPFN tabular foundation model provides in-context quantile uncertainty forecasting ($p_{10}, p_{50}, p_{90}$) for air quality and heat, local anomaly detection, and on-device Personal Green Hour logs with CSV import/export. Supported by empirical backtest evaluation on real Open-Meteo observations across 3 cities (&lt;code&gt;docs/TABPFN_EVAL.md&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Partner Categories
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of SerpApi ($100):&lt;/strong&gt; Unified live search adapter integrates SerpApi with prompt-injection defense, 45-minute caching, coordinate privacy (2 decimals), and screen-minimizing single-sentence delivery to alert walkers about real-time park closures, walkway maintenance, and official environmental advisories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs ($100):&lt;/strong&gt; High-fidelity walking audio narrated through ElevenLabs' &lt;code&gt;eleven_multilingual_v2&lt;/code&gt; model with custom voice mappings for multilingual guidance. Features intelligent monthly character protection (8,000 char cap), seamless cascade fallback to Gemini/MMS/browser upon quota exhaustion, and a zero-leak secret architecture allowing keys to be set via CLI or in-app HTTPS headers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Overall Prize
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hacktoberfest Week 1: Touch Grass ($250):&lt;/strong&gt; A comprehensive, culturally resonant outdoor companion tailored for high-density cities, built entirely on open-source AI and open data, mathematically proven to keep screen time minimal.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>pwa</category>
    </item>
    <item>
      <title>Dadur Ranna (দাদুর রান্না) — Preserving Grandma's Handwritten Recipes with Open-Weight Gemma</title>
      <dc:creator>Sayem Rahman</dc:creator>
      <pubDate>Sun, 04 Oct 2026 16:31:00 +0000</pubDate>
      <link>https://dev.to/rahmansayem163/dadur-ranna-daadur-raannaa-preserving-grandmas-handwritten-recipes-with-open-weight-gemma-1f5h</link>
      <guid>https://dev.to/rahmansayem163/dadur-ranna-daadur-raannaa-preserving-grandmas-handwritten-recipes-with-open-weight-gemma-1f5h</guid>
      <description>&lt;h1&gt;
  
  
  Dadur Ranna (দাদুর রান্না) — Preserving Grandma's Handwritten Recipes with Open-Weight Gemma
&lt;/h1&gt;

&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;br&gt;&lt;br&gt;
Targeting the &lt;strong&gt;Best Use of Gemma&lt;/strong&gt; and &lt;strong&gt;Best Use of Render&lt;/strong&gt; featured prize categories.&lt;/p&gt;


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

&lt;p&gt;Every family has a keeper of culinary memory. For my friend &lt;strong&gt;Farzana&lt;/strong&gt;, that person is her grandmother (&lt;strong&gt;দাদু / Dadu&lt;/strong&gt;). For over fifty years, her signature dishes only existed as brittle, yellowing diary pages filled with hurried Bengali cursive, faded ink, and colloquial shorthand like &lt;em&gt;"অন্দাজমতো এক বাটি"&lt;/em&gt; (&lt;em&gt;"an approximate small bowl"&lt;/em&gt;) or &lt;em&gt;"এক চিমটি"&lt;/em&gt; (&lt;em&gt;"a pinch"&lt;/em&gt;). &lt;/p&gt;

&lt;p&gt;Because paper deteriorates and handwriting fades, I built &lt;strong&gt;Dadur Ranna (দাদুর রান্না)&lt;/strong&gt;: an intimate, bilingual family cookbook maker designed to preserve heirloom handwritten recipes before they are lost to time.&lt;/p&gt;
&lt;h3&gt;
  
  
  🌟 Key Highlights &amp;amp; Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📸 Handwritten Photo &amp;amp; Messy Note Transcription&lt;/strong&gt;: Snap phone photos of handwritten pages or paste rambling mixed Bangla/English notes. Images are compressed and resized client-side via HTML5 Canvas before uploading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚠️ Human-in-the-Loop "Uncertainty" Flags&lt;/strong&gt;: Cooking is chemistry and heritage. If ink is smudged, torn, or colloquial (e.g., &lt;em&gt;"রাধুনি নাকি কালো জিরে স্পষ্ট নয়"&lt;/em&gt;), Gemma never silently guesses. Ambiguous quantities and terms are flagged in &lt;strong&gt;warning yellow&lt;/strong&gt; so family cooks can confirm them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚖️ Fraction-Aware Serving Scaler&lt;/strong&gt;: Real recipes use fractions, not awkward decimals. Dadur Ranna dynamically scales quantities up or down with culinary fractions (&lt;code&gt;½&lt;/code&gt;, &lt;code&gt;¼&lt;/code&gt;, &lt;code&gt;¾&lt;/code&gt;, &lt;code&gt;1½&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🌐 Bilingual Toggle&lt;/strong&gt;: Instant toggle between &lt;strong&gt;উভয় (Both / Bilingual)&lt;/strong&gt;, &lt;strong&gt;বাংলা (Bangla)&lt;/strong&gt;, and &lt;strong&gt;English&lt;/strong&gt; for titles, ingredients, and steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📖 Keepsake Print-to-PDF Book&lt;/strong&gt;: Formats a printable family book with &lt;code&gt;@media print&lt;/code&gt;, complete with traditional &lt;strong&gt;Alpana (আলপনা)&lt;/strong&gt; decorative frames, an editable family dedication (&lt;em&gt;"For Dadu, with love"&lt;/em&gt;), a Table of Contents, and one recipe per printed page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔒 100% Client-Side Privacy&lt;/strong&gt;: Zero database required. Recipes live safely in browser &lt;code&gt;localStorage&lt;/code&gt;, with full JSON Export and Import capabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🎁 Handing It Over to Farzana
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Recipient&lt;/strong&gt;: Built for &lt;strong&gt;Farzana&lt;/strong&gt; and her family to preserve her grandmother's (&lt;strong&gt;Dadu&lt;/strong&gt;) culinary legacy.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Her Reaction&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
&lt;em&gt;"This is incredible. I tested it on Dadu's payesh recipe—which was scribbled in messy Banglish across two torn notebook margins with zero proper gram measurements—and it laid out the exact steps cleanly in both Bangla and English. Ammu usually hates tech stuff, but she immediately understood the serving scaler when we needed to cook for eight people instead of four. Having this as a clean, printable PDF dedication to Dadu is priceless."&lt;/em&gt;&lt;br&gt;&lt;br&gt;
— &lt;strong&gt;Farzana (via WhatsApp)&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;


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

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Web Application&lt;/strong&gt;: &lt;a href="https://dadurranna.onrender.com/" rel="noopener noreferrer"&gt;https://dadurranna.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Zero-Key Offline Exploration&lt;/strong&gt;: Click &lt;strong&gt;"⚡ ডেমো লোড করুন (Demo)"&lt;/strong&gt; on the live site to load 6 authentic heirloom Bengali recipes (Shorshe Ilish, Aloo Posto, Bhoger Khichuri, Chingri Malai Curry, Notun Gurer Payesh, and Begun Bhaja) with custom vector food art—no API key required!&lt;/li&gt;
&lt;/ul&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/SayemR0018" rel="noopener noreferrer"&gt;
        SayemR0018
      &lt;/a&gt; / &lt;a href="https://github.com/SayemR0018/dadurRanna" rel="noopener noreferrer"&gt;
        dadurRanna
      &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;দাদুর রান্না (Dadur Ranna) — Family Cookbook Maker&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/SayemR0018/dadurRanna/main/public/assets/cover.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FSayemR0018%2FdadurRanna%2Fmain%2Fpublic%2Fassets%2Fcover.png" alt="Dadur Ranna Cover"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Dadur Ranna" (দাদুর রান্না)&lt;/strong&gt; is an intimate culinary preservation web app built for one real person: my friend's grandmother, whose irreplaceable culinary legacy exists only as brittle handwritten diary pages, faded envelope scribbles, and rambling, colloquial notes in mixed Bangla and English.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Powered by Google's open-weight &lt;strong&gt;Gemma&lt;/strong&gt; (&lt;code&gt;gemma-3-27b-it&lt;/code&gt; or local Ollama), Dadur Ranna deciphers cursive handwriting and colloquial cooking jargon, extracts structured bilingual recipes, highlights uncertain or faded measurements in yellow for human confirmation, recalculates serving sizes with fractional math (½, ¼), and renders an archival, print-ready keepsake PDF book complete with traditional Alpana decorative borders and a custom family dedication.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 Key Features&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;📸 Photo &amp;amp; Messy Text Transcription&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Upload phone photos of handwritten cookbook pages or paste rambling voice notes / Banglish text. Compressed client-side using HTML5 Canvas before uploading.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⚠️ Never Silently Guess (Uncertainty Badges)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;If&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/SayemR0018/dadurRanna" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/SayemR0018/dadurRanna" rel="noopener noreferrer"&gt;https://github.com/SayemR0018/dadurRanna&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License&lt;/strong&gt;: Open Source under the MIT License&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  Architecture &amp;amp; Stack (Featuring Render)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: Vanilla HTML5, modern CSS3, and JavaScript with zero heavy build steps. Mobile-first kitchen aesthetic with cream paper textures, warm turmeric/terracotta tones, and Bengali typography via Google Fonts (&lt;code&gt;Noto Sans Bengali&lt;/code&gt; &amp;amp; &lt;code&gt;Noto Serif Bengali&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js 20 + Express with &lt;code&gt;helmet&lt;/code&gt; CSP headers, &lt;code&gt;express-rate-limit&lt;/code&gt; (20 req/min/IP), &lt;code&gt;multer&lt;/code&gt; (in-memory buffer storage with strict 8MB limit), and &lt;code&gt;/healthz&lt;/code&gt; cloud health check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Processing&lt;/strong&gt;: Client-side &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; compression ensures fast, lightweight uploads even on mobile networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting on Render&lt;/strong&gt;: Deployed on &lt;strong&gt;Render&lt;/strong&gt; as a web service using an Infrastructure-as-Code Blueprint (&lt;code&gt;render.yaml&lt;/code&gt;) that specifies Node runtime, build/start commands, environment variable sync flags, and zero-downtime healthcheck monitoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Open-Weight AI Pipeline (Featuring Gemma)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Google AI Studio Gemma Integration&lt;/strong&gt;: Communicates with &lt;strong&gt;Gemma 3 27B&lt;/strong&gt; (&lt;code&gt;gemma-3-27b-it&lt;/code&gt;) via Google AI Studio's &lt;code&gt;generateContent&lt;/code&gt; API, passing images as &lt;code&gt;inline_data&lt;/code&gt; base64 payloads alongside a prompt engineered for Bengali culinary transcription.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict Zod Validation &amp;amp; Repair Loop&lt;/strong&gt;: Because open models may occasionally wrap JSON in markdown fences or omit brackets, the backend runs an automated cleaning function (&lt;code&gt;extractAndCleanJson&lt;/code&gt;), validates schema conformance via &lt;strong&gt;Zod&lt;/strong&gt;, and executes an automatic repair-and-retry loop (up to 2 retries) if structure errors occur.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Ollama Abstraction (Zero Code Change)&lt;/strong&gt;: Setting &lt;code&gt;LLM_PROVIDER=openai_compat&lt;/code&gt; and &lt;code&gt;LLM_MODEL=gemma3:27b&lt;/code&gt; redirects the app to a local Ollama instance (&lt;code&gt;http://localhost:11434/v1&lt;/code&gt;), enabling 100% offline transcription.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;When we think about preserving cultural heritage, we often picture ancient manuscripts in museum vaults. But the most fragile heritage lives right on our kitchen shelves—a grandmother's notebook with mustard oil stains, loose envelope corners, and informal notes like &lt;em&gt;"এক চিমটি মিষ্টি"&lt;/em&gt; (&lt;em&gt;"a pinch of sugar"&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;Building Dadur Ranna with open-weight Gemma demonstrates why open innovation is indispensable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Absolute Privacy for Intimate Memories&lt;/strong&gt;: Handwritten notebooks frequently contain personal family names, private phone numbers in the margins, and intimate letters. With open-weight models running locally via Ollama, families never have to upload photos of their loved ones' personal handwriting to closed third-party corporate servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freedom from Walled Gardens&lt;/strong&gt;: Family recipes belong to families, not to proprietary cloud vendors who might change pricing models, deprecate endpoints, or lock memories behind monthly subscriptions. Because Gemma is open-weight, this entire application can run on a laptop in an offline rural village with Ollama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swappable Architecture&lt;/strong&gt;: Switching from cloud Gemma to an offline local model requires nothing more than changing an environment variable (&lt;code&gt;LLM_PROVIDER=openai_compat&lt;/code&gt;, &lt;code&gt;LLM_MODEL=gemma3:27b&lt;/code&gt;). No code rewrites or proprietary SDK locks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Cost and Long-Term Longevity&lt;/strong&gt;: Open innovation guarantees that this digital cookbook archiver will still run 10, 20, or 50 years from now. As long as a family has a computer and open software, Dadu's culinary legacy will remain forever preserved.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;I planned, built, tested, and verified Dadur Ranna collaboratively with Antigravity. You can explore the full interactive agent session transcript:&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;Building Dadur Ranna: Family Cookbook Maker with Open-Weight Gemma&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;Build, test, and make deploy-ready on Render a complete web app called 'Dadur Ranna' (দাদুর রান্না): a family cookbook maker for one real person, my friend's grandmother, whose recipes exist as handwritten pages and rambling Bangla/English notes. Backend sends it to Gemma and gets back a structured recipe with uncertainty highlights, fraction-aware serving scaler, bilingual toggle, local storage, and print-to-PDF keepsake book.&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;Architected and built Dadur Ranna with Node.js/Express, Gemma 3 27B via Google AI Studio API and local Ollama abstraction, Zod schema validation with repair/retry, client-side canvas image compression, fraction-aware scaler (½, ¼), and print-ready CSS layout with Alpana frames. Handcrafted SVG illustrations for 6 authentic Bengali heirloom dishes, generated social cover assets, and pushed cleanly to GitHub.&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;npm test&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;$ npm test&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;12/12 passing tests across schema validation, prompt parsing, offline mock fallback, and server endpoints.&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;Install DevRelay and verify the MCP gateway and agent skills for Hacktoberfest challenge preparation.&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;Installed DevRelay 0.1.17, configured the devrelay-gateway MCP entry pointing to dev_mlh_mcp_server.exe with --stdio in Antigravity mcp_config.json, verified 9 agent skills, and connected MLH/DEV authentication.&lt;/p&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;
        4 of 4 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;🔗 &lt;strong&gt;Interactive Session Transcript&lt;/strong&gt;: &lt;a href="https://dev.to/agent_sessions/building-dadur-ranna-family-cookbook-maker-with-open-weight-gemma-pgt3h7"&gt;View on DEV&lt;/a&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Gemma 3 27B does the core work of reading handwritten Bangla/English recipes, flagging uncertain items, and keeping the grandmother's tips verbatim.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; Deployed as a Render Blueprint (&lt;code&gt;render.yaml&lt;/code&gt;) with a health check on the free plan.&lt;/li&gt;
&lt;/ul&gt;

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