DEV Community

Cover image for ๐ŸŒฟ GreenQuest: An AI Outdoor Adventure Planner That Gets You Off Your Phone
Sri Anuradha
Sri Anuradha

Posted on

๐ŸŒฟ GreenQuest: An AI Outdoor Adventure Planner That Gets You Off Your Phone

Hacktoberfest: Maintainer Spotlight

๐ŸŒฑ Introduction

We spend hours staring at screens.

Between endless slack pings, doomscrolling social feeds, and even the new wave of conversational AI chatbots, the modern digital economy is relentlessly optimized for one metric: maximizing screen time.

So for the Hacktoberfest 2026 Week 1 "Touch Grass" DEV Challenge, I decided to build an AI that does the exact opposite.

Instead of giving you another reason to stay glued to a glowing glass rectangle, GreenQuest gives you a structured reason to put your device away and step into the physical world.

GreenQuest is an open-source, AI-powered outdoor activity planner built on Googleโ€™s open-weight Gemma model. You tell it where you are and how many minutes you have, and it synthesizes a time-boxed, sensory-rich micro-adventure.

Once your plan is ready, the app does something radical: it tells you to pocket your phone, close the screen, and go outside.


๐ŸŽฏ The Problem

Decision paralysis keeps us indoors.

When you have a spare 30 or 45 minutes between study sessions or meetings, the default action is almost always passive: opening a browser tab, scrolling feeds, or asking an AI chatbot trivial questions.

Even when we want to go outside, common questions cause friction:

  • "Where should I walk?"
  • "Is 30 minutes enough time to do something meaningful?"
  • "What should I pay attention to?"

Traditional fitness and trail apps often make the problem worse: they demand continuous screen interaction with turn-by-turn map gazing, live social sharing, and notification badges.

The challenge wasn't just to generate outdoor ideas. The challenge was to use open-weight AI as a rapid catalyst that gets completely out of your way.


๐Ÿ’ก The Idea

GreenQuest is designed around the "Anti-Screen AI" philosophy:

  1. Sub-60-second digital footprint: Planning takes less than a minute. You enter your parameters, get a plan, and exit.
  2. Sensory mindfulness over pixel feeds: Every plan step pairs physical movement with a specific sensory prompt (e.g., listening for bird calls, feeling tree bark, observing wind patterns).
  3. Intentional minimalism in Adventure Mode: When you start your quest, the UI strips away all clutter, displaying only the current task and a clean timer.
  4. "Phone down. Adventure on.": Dedicated reminders and an active Pocket Mode encourage you to stow your phone away until you return.

๐ŸŒฟ How GreenQuest Works

Here is the exact journey from screen to soil:

[User Input] 
  Location + Time (10-180m) + Activity + Fitness Level + Sensory Focus
          โ”‚
          โ–ผ
[Google Gemma 2 Open-Weight Engine]
  Generates Structured JSON (Steps + Pack List + Safety + Mindfulness Cues)
          โ”‚
          โ–ผ
[Quest Overview & Offline Print]
  Interactive packing checklist + Print option to leave phone at home
          โ”‚
          โ–ผ
[Adventure Mode]
  Minimalist timer + Step audio chime + Pocket Mode (Dim screen)
  "Phone down. Adventure on. Check back when you're done."
          โ”‚
          โ–ผ
[Post-Quest Grounding & Reflection]
  User returns, logs reflection, awards stars, updates "Grass Touched Score"
Enter fullscreen mode Exit fullscreen mode
  1. Input: You choose your setting (e.g. Bhimavaram Nature Trail, a city park, or your local neighborhood), your available time (15, 30, 45, 60+ minutes), activity (Walking, Running, Gardening, Birdwatching, Nature Exploration, Cycling), and nature focus (native flora, acoustic songs, soil grounding).
  2. Gemma Synthesis: Gemma formulates a balanced, multi-step outdoor plan with sensory warm-ups, terrain exploration, mindfulness observation cues, and a cooldown.
  3. Structured Plan: You review the schedule, check off items on the Pack Checklist, or hit Print Offline Sheet to literally take paper and leave your phone behind.
  4. Adventure Mode: Once started, the app displays a high-contrast countdown timer and reminds you: > โ€œYour plan is ready. Now close the app and go outside. Check back when you're done.โ€
  5. Pocket Mode & Web Audio Chimes: Tap Pocket Mode to dim the screen completely to black, saving battery and eliminating screen temptation. When a step duration concludes, an ambient browser tone rings via Web Audio API so you never have to look down at your screen.
  6. Grounding Log: When you return, you log how it felt to disconnect, record a reflection, and track your Screen-Free Hours Gained and Grass Touched Score.

๐Ÿค– Why Gemma?

The challenge required building with open-weight, open-source AI models. Google Gemma was the ideal fit for several key reasons:

  • Open Weights & Local Deployment: Gemma models (gemma-2-2b-it and gemma-2-9b-it) can run locally on consumer hardware via Ollama or via serverless open-source providers without sending private location data to proprietary corporations.
  • Strict Instruction Adherence: By using instruction-tuned Gemma 2, we can guide the model to output strictly validated JSON matching our Pydantic data contract without conversational filler or conversational preamble.
  • Lightweight & Fast: Gemma 2 2B delivers near-instant inference latency, allowing users to generate their adventure plan in seconds rather than waiting through long generation delays.
  • Zero Closed-Source AI: There is no OpenAI dependency anywhere in the application.

๐Ÿ—๏ธ Technical Architecture

The codebase is cleanly divided into a modular frontend and backend:

โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py              # FastAPI endpoints & CORS
โ”‚   โ”‚   โ”œโ”€โ”€ models.py            # Pydantic schemas (AdventurePlan, PlanStep, Stats)
โ”‚   โ”‚   โ”œโ”€โ”€ storage.py           # Persistent SQLite database & impact statistics
โ”‚   โ”‚   โ””โ”€โ”€ ai/
โ”‚   โ”‚       โ”œโ”€โ”€ base.py          # Base provider & JSON boundary extractor
โ”‚   โ”‚       โ”œโ”€โ”€ factory.py       # Modular provider factory
โ”‚   โ”‚       โ”œโ”€โ”€ prompts.py       # Schema-enforced Gemma system prompt
โ”‚   โ”‚       โ”œโ”€โ”€ huggingface_provider.py # Hugging Face Serverless client
โ”‚   โ”‚       โ”œโ”€โ”€ ollama_provider.py      # Local Ollama REST client
โ”‚   โ”‚       โ””โ”€โ”€ mock_provider.py        # Local offline dev engine
โ”‚   โ””โ”€โ”€ tests/test_api.py        # 9 automated tests (validation, generation, errors)
โ””โ”€โ”€ frontend/
    โ”œโ”€โ”€ src/
    โ”‚   โ”œโ”€โ”€ components/
    โ”‚   โ”‚   โ”œโ”€โ”€ LandingPage.tsx   # Touch Grass manifesto & presets
    โ”‚   โ”‚   โ”œโ”€โ”€ PlannerPage.tsx   # Parameter selectors & mindfulness loader
    โ”‚   โ”‚   โ”œโ”€โ”€ PlanDetailPage.tsx # Interactive timeline, checklist, print sheet
    โ”‚   โ”‚   โ”œโ”€โ”€ AdventureMode.tsx # Minimal timer UI, pocket mode, audio tone
    โ”‚   โ”‚   โ””โ”€โ”€ HistoryPage.tsx   # Screen-free stats & past quest log
    โ”‚   โ”œโ”€โ”€ api.ts                # Type-safe API client
    โ”‚   โ””โ”€โ”€ types.ts              # TypeScript interfaces
    โ””โ”€โ”€ vite.config.ts            # Vite + Tailwind v4 + Proxy config
Enter fullscreen mode Exit fullscreen mode

Modular AI Layer

The backend implements an abstract provider interface (BaseGemmaProvider):

  • HuggingFaceGemmaProvider: Uses huggingface_hub.InferenceClient to call google/gemma-2-2b-it via serverless endpoints.
  • OllamaGemmaProvider: Connects to http://localhost:11434 for 100% offline, local GPU/CPU execution (gemma2:2b).
  • MockGemmaProvider: An offline deterministic fallback engine that enables rapid UI iteration, testing, and evaluation even without API keys or GPU hardware.

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 19, TypeScript, Vite, Tailwind CSS v4, Lucide Icons, Canvas-Confetti
  • Backend: Python 3.11, FastAPI, Pydantic v2, Uvicorn
  • Database: SQLite (built-in, persistent, zero external dependencies)
  • AI Model: Google Gemma 2 Open-Weight (google/gemma-2-2b-it / gemma2:2b)
  • Testing & Quality: Pytest, Oxlint (0 warnings, 0 errors)

๐Ÿš€ Demo & Code Repository


๐Ÿ“ธ Walkthrough

1. Landing Page โ€” The "Touch Grass" Manifesto

Explains the mission, displays active Gemma model status, and offers 1-click starter inspirations (30-min Nature Reset, 60-min Canopy Birdwatching, 45-min Trail Run).

Landing Page โ€” The

2. The Planner โ€” Setting Parameters

Select your location, duration slider (10 to 180 mins), activity card, and sensory focus tags. Features a rotating mindfulness loader during AI generation.

The Planner โ€” Setting Parameters

3. Plan Overview & Offline Print Sheet

Presents the AI-generated schedule, packing checklist, safety reminders, and a browser-optimized Print Offline Sheet button so you can leave your phone at home.

Plan Overview & Offline Print Sheet

4. Adventure Mode & Pocket Mode

An ultra-minimalist interface with a large countdown timer, current task, progress bar, audio chime, and a Pocket Mode that blacks out the display to keep your eyes on nature.

Adventure Mode & Pocket Mode

5. Adventures & Impact Dashboard

Tracks total outdoor minutes, Screen-Free Hours Gained, completed quests, and your Grass Touched Score.
Adventures & Impact Dashboard


๐ŸŒณ I Took GreenQuest Outside

To test the project in the real world, I generated a 45-minute Nature Exploration Quest for the Bhimavaram Nature Trail:

  • Step 1 (5 mins) โ€” Sensory Arrival: Calibrated breathing, listened for ambient bird calls before stepping onto the path.
  • Step 2 (17 mins) โ€” Exploration: Walked along the trail with my phone tucked away in my pocket.
  • Step 3 (17 mins) โ€” Botanical & Soil Focus: Stopped near native trees, inspected leaf textures, and felt the breeze.
  • Step 4 (6 mins) โ€” Cooldown & Reflection: Rested on a bench, took three deep breaths, and let my mind settle without checking notifications.

Returning and marking the quest complete felt noticeably different from typical app usage: I didn't feel the usual post-screen cognitive fatigue. Instead, I logged 45 screen-free minutes and felt genuinely refreshed.


๐Ÿ”“ Why Open Innovation Matters

Choosing an open-weight model like Google Gemma over a closed proprietary API was a deliberate design choice:

  1. True Privacy: When running Gemma locally via Ollama, not a single byte of personal dataโ€”your location, schedule, or habitsโ€”ever leaves your machine.
  2. Freedom from API Lock-In: Proprietary APIs can alter terms, raise prices, or deprecate endpoints overnight. Open-weight models are forever accessible and reproducible.
  3. Modular Extensibility: The BaseGemmaProvider abstraction allows developers to easily swap between local Ollama inference, quantized edge weights, or hosted serverless endpoints without changing application code.
  4. Community Trust: Open innovation allows the open-source community to inspect the model's behavior and verify that the application operates honestly.

๐Ÿง  Challenges I Faced

  1. Enforcing Strict JSON from Open-Weight LLMs: LLMs naturally default to conversational preambles like "Here is your outdoor plan:". I designed a system prompt with schema constraints, paired with a robust parser that cleans markdown fences and normalizes individual step durations so they precisely sum up to the user's requested time.
  2. Designing a UI That Discourages Screen Use: Standard web design principles optimize for user retention and clicks. Building an interface that actively prompts the user to look away required rethinking the UX: adding Pocket Mode, integrating Web Audio tones for hands-free step alerts, and providing a 1-click printable sheet.
  3. Test Isolation in SQLite: During backend test suite development, SQLite's in-memory mode created new isolated databases on every connection. I refactored PlanStorage to maintain clean in-memory connection pooling for tests while using file-based storage in production.

๐Ÿ“š What I Learned

  • AI as an Action Catalyst: Generative AI is at its best when it solves the friction of starting an activity, rather than acting as a perpetual conversational partner.
  • Gemma 2 Instruction Capabilities: Google's Gemma 2 2B model is remarkably capable at generating contextual, structured responses when provided with clear schema boundaries.
  • Code Craftsmanship: Designing modular abstractions from day one made it straightforward to support multiple inference backends (Hugging Face, Ollama, and dev fallbacks) seamlessly.

๐Ÿ”ฎ Future Improvements

  • Live Open Weather Integration: Integrate open-source meteorological APIs (like Open-Meteo) so Gemma can adjust clothing recommendations based on rain or temperature.
  • Audible Voice Guidance: Add offline text-to-speech cues so runners or cyclists can receive sensory prompts through a single earbud without touching their phone.
  • Browser WebGPU Gemma: Run quantized Gemma models directly in the browser via Transformers.js for 100% offline, zero-backend execution.

๐Ÿ™Œ Conclusion

AI does not have to be an engine for endless digital distraction.

Sometimes the most meaningful technology is the one that knows when to do its job, step aside, and tell you to enjoy the real world.

Stop staring at pixels. Touch grass. ๐ŸŒฟ

Check out the code, run it locally, and plan your own outdoor quest:

๐Ÿ‘‰ GitHub: anuuu2507/GreenQuest

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.