DEV Community

Saurabh Kumar
Saurabh Kumar

Posted on

Pagdandi

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Most modern apps are designed to maximize screen time and engagement loops. Pagdandi (पगडंडी — meaning "footpath") is built for the exact opposite: to get you out the door in under 30 seconds and keep your phone in your pocket while you explore the real world.

🌿 How it gets people off the screen and into nature

Instead of turn-by-turn map navigation or endless photo scrolling, Pagdandi is an audio-first, pocket-friendly walk companion:

  1. Quick 3-Tap Walk Setup: Pick your walk duration (15, 30, or 60 minutes) and mood (Clear head, Curious, Slow & gentle, Energetic). Pagdandi fetches current local weather from Open-Meteo with privacy-preserving approximate location.
  2. Dynamic Sensory Quests: Open-weight Gemma creates 4 to 6 micro-observation missions tailored to the local weather, month, and time of day (e.g., "Find where rainwater pooled and look for reflections," or "Close your eyes for 30 seconds and distinguish three distinct sound sources").
  3. Pocket-First Audio Mode: Missions are spoken aloud using browser speech synthesis with high-contrast, one-thumb controls. You hear the prompt, pocket the phone, and observe the world using your real senses.
  4. Cautious Visual Observation: Spot something intriguing like a leaf or fungus? Take an optional photo—Gemma provides cautious, beginner-friendly observations with strict safety guardrails (never giving handling or edibility advice).
  5. Private Field Journal & Anti-Screen Metric: At the end of your walk, Gemma transforms your observations into a grounded field note (in English or natural Hinglish). It explicitly displays your Time Outside vs. Time Screen Active (e.g., 32 minutes outside, only 45 seconds of screen time).

Demo

(Tip: You can attach a screenshot or short video/GIF of the walk mode and speech guidance here)


Code

Pagdandi

Take the path less scrolled.

Pagdandi (पगडंडी, “footpath”) is a mobile-first, audio-led walk companion. Pick 15, 30, or 60 minutes and a mood; open-weight Gemma creates a handful of weather-aware observation missions, reads them aloud, then helps turn the walk into a private field note. The key outcome is intentionally not engagement: Pagdandi shows time outside vs. time the screen was active.

Built October 5–11, 2026 for the DEV Hacktoberfest Open-Source AI Challenge: Week 1 — Touch Grass.

Screenshots

Add final home, walk-mode, and field-journal screenshots before submission.

Plan a walk Pocket-first walk mode A private field note
docs/screenshots/home.png docs/screenshots/walk.png docs/screenshots/journal.png

Why open matters

Gemma is not decoration here: it creates the quests, cautious photo guesses, and final field notes. A small provider interface makes those same open weights available in two ways:

  • gemini-api serves Gemma through Google’s Gemini API for the public Render demo.
  • ollama runs…

The entire codebase is open-source under the MIT License on GitHub: init4saurabh/Pagdandi-week1-.


How I Built It

Pagdandi is built with Next.js (App Router), TypeScript, Tailwind CSS, and Zod, centered around the Google Gemma open-weight model family:

┌───────────────────────────────────────────────────────────┐
│                    Mobile PWA (Next.js)                   │
│  - Approximate Geolocation  - Web Speech Synthesis        │
│  - Client-side Image Resize - LocalStorage Field Journal  │
└─────────────────────────────┬─────────────────────────────┘
                              │ Broad area + weather
                              ▼
                 ┌──────────────────────────┐
                 │ Next.js API Routes (App) │
                 └────────────┬─────────────┘
                              │
               ┌──────────────┴──────────────┐
               ▼                             ▼
   ┌───────────────────────┐     ┌───────────────────────┐
   │ Hosted Gemma Runtime  │     │  Local Gemma Runtime  │
   │  (Google AI Studio)   │     │    (Ollama :11434)    │
   └───────────┬───────────┘     └───────────┬───────────┘
               └──────────────┬──────────────┘
                              ▼
                 ┌──────────────────────────┐
                 │ Zod Extraction & Retries │
                 └──────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

1. Dual-Runtime Open Intelligence

A unified provider interface (lib/llm/provider.ts) allows Pagdandi to switch between two Gemma runtimes with a single environment variable (LLM_PROVIDER):

  • Hosted Mode (gemini-api): Serves multimodal Gemma via Google AI Studio API for scalable public deployment on Render.
  • Local Mode (ollama): Connects directly to a local Ollama instance (e.g., gemma3:12b) for 100% offline and private inference.

2. Plain-Text Structured Outputs & Defensive Validation

Rather than relying on proprietary function-calling mechanisms, Pagdandi uses:

  • Versioned plain-text prompts with concise JSON schemas.
  • A balanced-bracket JSON parser that safely strips conversational intros or code fences.
  • Strict Zod schema validation with automated error-correction retry loops.
  • minimal thinking configuration on Gemma 4 to ensure reasoning tokens don't exhaust the output budget.

3. Privacy Boundary by Design

  • No GPS tracking: Exact GPS coordinates stay in the browser for Open-Meteo weather calls. The LLM only receives a broad area label (e.g., "Hiranandani, Mumbai, 28°C, Overcast").
  • Client-side Image Processing: Photos are resized to 1024px client-side and processed purely in-memory—never saved to a remote database.
  • Local Field Journal: Walk notes remain in browser localStorage. No accounts, no tracking cookies, and no analytics databases.

Why Does Open Innovation Matter?

Open-source AI and open weights made key aspects of Pagdandi possible that closed APIs could not:

  1. True Local Privacy & Backcountry Exploration: Because Gemma can run locally on device via Ollama, a hiker can generate sensory quests and journal entries with zero internet connectivity and complete data sovereignty.
  2. Zero Vendor Lock-In: The application isn't bound to proprietary API deprecations or sudden pricing changes. Switching from a cloud provider to self-hosted weights requires zero frontend code modifications.
  3. Inspectable & Safe Architecture: In nature apps, safety is paramount. Open weights allow full transparency into model prompts and behavior, ensuring strict guardrails against harmful foraging advice or hazardous route suggestions.

My Agent Session

This project was built and designed using Antigravity AI agent workflows, pairing on architectural planning, dual Gemma provider implementation, and edge-case validation.


Prize Categories

  • Best Use of Gemma: Pagdandi is built exclusively around the open-weight Gemma model family. Gemma powers all three primary intelligence pipelines: generating weather-conditioned sensory quests, performing cautious visual nature observations, and synthesizing bilingual (English / Hinglish) walk journals.
  • Best Use of Render: Pagdandi is deployed as a Docker/Node web service on Render via render.yaml Infrastructure as Code, leveraging Render's managed environment secrets and health-check monitoring (/api/health).

Take the path less scrolled. Put on your walking shoes, pocket your phone, and touch some grass! 🌱🚶‍♂️

Top comments (0)