DEV Community

Mohammed Abid Ali
Mohammed Abid Ali

Posted on

FieldQuest: The Local-First Outdoor Adventure Companion

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

FieldQuest: The Local-First Outdoor Adventure Companion

What I Built

Modern life has tethered us to algorithmic feeds, glowing rectangles, and endless notifications. Many of us genuinely want to explore the outdoors, but outdoor apps often exacerbate screen addiction: requiring live turn-by-turn navigation, cloud logins, subscription tiers, and constant screen gaze.

FieldQuest (TouchGrass) is an AI-powered, local-first outdoor adventure companion built around a single core philosophy:

Plan before leaving. Explore while outside. Preserve memories afterward.

The AI supports your outdoor journey without becoming another reason to stare at a screen.

How FieldQuest Works:

  1. Plan at Home (Desktop or Mobile): Enter your starting location (via GPS or map click), choose a destination, select your available time (30, 60, or 120 minutes), difficulty, and observational interests (Nature, Bird Song, Flora, Photography, Mindfulness, Local History).
  2. Verified Pedestrian Route: FieldQuest queries the OpenStreetMap / OSRM Foot Profile API to compute a real, walkable route with genuine geometry, distance, and turn steps. FieldQuest strictly forbids inventing imaginary trails.
  3. Local AI Mission Design: An open-weight Gemma 3 (1B) model running locally via Ollama personalizes 3 to 4 observational challenges (e.g. noticing leaf vein architectures, counting bird calls, or framing natural patterns) along with a safety checklist.
  4. Offline Field Mode: Export an Adventure Pack JSON or take the installed PWA outside. Turn off Wi-Fi or enable Airplane Mode. While outside, you check off missions, write raw field observations, and capture photos using your camera (auto-compressed to <=1280px JPEG directly in IndexedDB).
  5. Truthful Adventure Journal: Return from your outing and import your completed pack back to your computer. Gemma 3 synthesizes a grounded, reflective Adventure Journal based strictly on what you actually observed and recorded. No hallucinated species, no fabricated weather, and no invented achievements.

Demo

πŸ“Έ Application Walkthrough

1. Route Planning & Waypoints 2. Verified Route & AI Missions
Route Planning Screen Verified Adventure Route
3. Offline Field Mode 4. Grounded Adventure Journal
Offline Field Mode Grounded Adventure Journal

Code

The entire codebase is open-source under the MIT License:

  • GitHub Repository: https://github.com/mohammedabidali1956/FieldQuest
  • Architecture Highlights:
    • src/lib/ollama.ts: Ollama /api/chat integration with Gemma 3 (1B), timeout handling, and safe fallback missions.
    • src/lib/routing.ts: Pedestrian routing with caching and strict grounding (no hallucinated paths).
    • src/lib/storage.ts: Native IndexedDB persistence for offline adventures and compressed photos.
    • src/lib/adventureSchema.ts: Zod schema validation for AI JSON output and import/export packs.
    • src/lib/imageUtils.ts: Client-side HTML5 canvas downscaling (max 1280px JPEG).
    • src/pages/FieldModePage.tsx: High-contrast outdoor mode with autosave and offline indicators.
    • src/pages/JournalPage.tsx: Grounded memory synthesis with print/PDF layout.

How I Built It

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       FIELDQUEST PWA                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚       1. PLAN & ROUTE        β”‚      2. ADVENTURE PACK       β”‚
β”‚  - Browser GPS / Leaflet     β”‚  - Real OSRM Foot Geometry   β”‚
β”‚  - Time / Difficulty Options β”‚  - 3-4 Observational Missionsβ”‚
β”‚  - Outdoor Interest Chips    β”‚  - Safety & Gear Checklist   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚       3. FIELD MODE          β”‚     4. ADVENTURE JOURNAL     β”‚
β”‚  - 100% Offline (Workbox)    β”‚  - Grounded Gemma 3 (1B)     β”‚
β”‚  - IndexedDB Persistence     β”‚  - Photo Gallery & Captions  β”‚
β”‚  - Camera Photo Compression  β”‚  - Printable PDF / Markdown  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
               Local Inference via Ollama API
                               β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚     gemma3:1b (Local)     β”‚
                 β”‚  - Zero Cloud Telemetry   β”‚
                 β”‚  - Zero API Key Required  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

1. Local Open-Source AI (Gemma 3 1B via Ollama)

I chose Google's open-weight Gemma 3 (1B) model deployed locally via Ollama. Gemma 3 1B is astonishingly fast, runs on modest hardware, and follows structured JSON schemas with high fidelity.

  • Inference Setup: Configured to call http://localhost:11434/api/chat using strict JSON schemas.
  • Resilience: If Ollama is offline or experiencing connectivity issues, FieldQuest never crashes. It immediately switches to intelligent curated observation challenges and a grounded factual journal template.

2. Grounded Geography & Safety Guardrails

  • OSRM Foot Routing Profile: To ensure the user stays on authentic pedestrian paths, routes are obtained directly from OpenStreetMap data via the OSRM foot engine.
  • Anti-Hallucination Prompting: Gemma 3 is explicitly instructed never to confirm biological species names unless verified by retrieved data, and the journal synthesis prompt is strictly conditioned on user-recorded facts.

3. Progressive Web App & Offline Storage

  • Built using React 19 + TypeScript + Vite with vite-plugin-pwa.
  • The PWA precaches its shell and static assets so Field Mode operates in full airplane mode.
  • Local storage uses IndexedDB (fieldquest_db) to store route points, checklist state, observations, and photo attachments. Photos are downscaled client-side to <=1280px JPEG to keep JSON exports compact.

Why Does Open Innovation Matter?

Open innovationβ€”specifically open-weight foundation models and open geospatial dataβ€”fundamentally transformed how this project was conceived and built:

  1. True Privacy in Intimate Outdoor Spaces: When people walk, hike, or reflect in nature, they should not have their precise GPS coordinates, personal thoughts, and candid photographs sent to third-party commercial cloud servers. With open-weight Gemma 3 running locally on the user's computer and an offline PWA on mobile, user data never leaves their control.
  2. Zero Cost & Censorship-Free Exploration: Closed AI APIs charge per token and impose cloud rate limits. Open-weight models empower developers to build offline-first tools that remain free forever.
  3. OpenStreetMap Power: OpenStreetMap is one of the greatest collaborative human achievements. Pairing open geospatial infrastructure with open-weight AI demonstrates how community-driven data and open AI models reinforce one another.

My Agent Session

This project was built pair-programming with Google DeepMind's Antigravity agentic coding assistant. The agent analyzed the Hacktoberfest prompt, scaffolded the Vite + TypeScript + PWA codebase, implemented the OSRM pedestrian routing module, integrated local Ollama inference with Gemma 3 (1B), set up IndexedDB offline persistence, verified the entire flow in an end-to-end browser subagent session, and ran focused Vitest unit tests.


Prize Categories

  • Primary Track: Touch Grass (Hacktoberfest Week 1) β€” AI that gets people off their screens and engaging with the real world.
  • Open Innovation: Demonstrating the power of local inference with open-weight Gemma 3 and OpenStreetMap data.

Top comments (0)