This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Most modern AI applications are designed to maximize screen time, keeping your eyes glued to glass in endless conversation loops. TrailWhisper is designed to turn itself off.
TrailWhisper is a 100% offline edge nature companion and bioacoustic field guide powered by open-source AI. Built for hikers, trail runners, foragers, birders, and anyone experiencing screen fatigue, it puts nature first:
- Ultra-Fast Capture (< 2 Seconds): Point your camera or snap an outdoor specimen (flora, fungi, aviary, pollinators).
- On-Device Edge Vision: Open-weight Vision Transformers analyze the specimen locally on your device's GPU (WebGPU) in ~50ms without an internet connection.
- Auditory Whisper (Eyes-Up Nature Experience): Instead of making you read dense paragraphs on a glowing screen, a natural voice speaks a concise naturalist insight directly into your earphones, with automated markdown symbol stripping for fluid, human-like cadence.
- Tactile Sensory Challenges: Each sighting invites you to physically interact with the wild ("Touch the deeply furrowed white oak bark," "Smell the crushed pine needles").
- Anti-Screen Sleep Minimizer (Trail Mode): To keep eyes on the canopy, an automatic sleep countdown dims the display into an ultra-dim, battery-saving OLED black mode with a breathing green leaf ring. (Paused by default for review, with a customizable timer: 30s, 60s, 90s, or 3 mins).
-
Smartwatch GPX & Markdown Export: Trail observations and offline GPS waypoints export directly into a
.gpxfile loadable into Garmin, Apple Watch, Strava, and AllTrails—allowing you to pack your phone away completely during hikes.
Demo
- GitHub Repository: https://github.com/Abhinav-Shrivas/TrailWhisper
How to Run Locally in 60 Seconds:
git clone https://github.com/Abhinav-Shrivas/TrailWhisper.git
cd TrailWhisper
npm install
npm run dev
Open http://localhost:5173 in any modern browser (Chrome, Edge, Brave).
Interactive Testing Highlights:
- Curated Trail Presets: Test immediate edge AI classification without leaving your desk using curated specimens (Eastern White Oak, Fly Agaric Mushroom, Perched Songbird, Autumn Maple, Peat Moss).
- Live Camera & Photo Upload: Aim your webcam at houseplants or upload your own trail photos (lions, elephants, mushrooms, trees).
- Offline Trail Simulator: Toggle the TRAIL OFFLINE badge in the header to verify that the app runs with 0KB network traffic.
- Edge AI Engine Settings: Click the CPU chip icon in the header to inspect your hardware acceleration (WebGPU Direct3D 12/Vulkan vs. WASM SIMD CPU), verify on-device privacy badges (0 bytes uploaded), and manage your local Ollama connection.
Code
Abhinav-Shrivas
/
TrailWhisper
TrailWhisper is a 100% offline edge nature companion and bioacoustic guide powered by open-source AI. It is built for hikers, trail runners, foragers, birders, and anyone seeking respite from screen fatigue.
🌲 TrailWhisper — Offline Edge Nature Guide & Audio Naturalist
"Built with open-source AI at its core to get people off the screen and into the wild."
Touch Grass Challenge — Open Source AI Build
🍃 The Philosophy: "Make the Screen the Shortest Part of the Experience"
Most AI applications are designed to maximize your time looking at a screen. TrailWhisper is designed to turn itself off.
When you encounter an unfamiliar tree, mushroom, bird, or wildflower on a remote trail:
- Quick Capture (< 2 seconds): Point your camera or choose a specimen.
- Instant Edge AI Inference: Powered 100% on-device by open-weight AI (WebGPU / Transformers.js).
- Auditory Whisper: Instead of reading paragraphs on a screen, a natural voice speaks a concise naturalist insight directly into your earphones.
- Tactile Sensory Prompt: You are invited to interact with nature physically ("Touch the deeply furrowed bark," "Smell the…
How I Built It
TrailWhisper is built from the ground up around open-source AI models and frameworks:
1. Google Gemma 2 (google/gemma-2-2b-it) — The Naturalist Reasoning Brain
We integrated Google DeepMind's open-weight Gemma 2 as our ecological reasoning and sensory quest engine:
-
Custom Naturalist
Modelfile: We created a specialized Ollama persona compiled directly on top ofFROM gemma2:2b(ollama create trailwhisper -f Modelfile) that produces poetic, scientifically grounded ecological relationships formatted specifically for eyes-up hikers. -
Live Local Ollama Bridge: Connects seamlessly to a local Ollama instance on
localhost:11434via a dedicated Vite proxy to stream live 2.6B neural reasoning with zero browser CORS barriers. - Zero-Cloud Distilled Field Fallback: When disconnected on a remote backcountry trail without Ollama active, TrailWhisper automatically falls back to an embedded Distilled Gemma 2 Field Cache with zero network dependency.
-
Terminal Verification Command:
npm run test:gemma
2. Vision Transformer (ViT) — Hardware-Accelerated Edge Classifier
-
Model:
Xenova/vit-base-patch16-224(open weights in ONNX format). -
Runtime:
@huggingface/transformersrunning directly in the browser via WebGPU (Direct3D 12 / Vulkan) with WASM SIMD CPU fallback. - Zero Cloud Latency: Performs forward tensor passes in ~50ms without transmitting pixels across the internet.
-
Terminal Verification Command:
npm run test:model
3. Offline Botanical & Wildlife Taxonomy Engine
- Pre-compiled taxonomic field knowledge for 50+ forest species pairing neural predictions with safety badges (Edible / Toxic / Protected), habitat notes, and tactile field cues.
4. Anti-Screen UI, GPX Engine & Local Field Journal
- Built with Vite, React 19, and a custom Vanilla CSS design system styled with deep forest obsidian tones (
#07100b) and bioluminescent accents (#4ade80). - Observations, timestamps, and GPS coordinates are stored exclusively in local
IndexedDB/localStoragewith 0 external telemetry. - Export engine formats GPS coordinates directly into standard GPX 1.1 XML schema for cross-compatibility with outdoor GPS watches and mapping software.
Why Does Open Innovation Matter?
1. Datacenters Can't Hike With You
Frontier cloud models (GPT-4o, Gemini Cloud) reside in multi-billion dollar datacenters. When you hike into a valley, canyon, or national park, cellular reception vanishes—and cloud AI goes completely dark. If an assistant requires 5 bars of 5G to tell you whether a mushroom is toxic, it fails the outdoors. By running open weights locally on-device via Transformers.js and WebGPU, TrailWhisper operates reliably in Airplane Mode with 0 bytes sent over the wire.
2. 100% Location & Foraging Privacy
Trail paths and foraging spots are personal and sensitive. Commercial closed APIs log GPS waypoints and store photos on external servers. Open-source AI ensures that all coordinates, images, and notes remain strictly on the user's hardware.
3. $0.00 Operating Cost & Zero Cloud Emissions
No subscription fees, no credit card paywalls, no metered API billing, and zero datacenter water or compute emissions.
4. Freedom to Build an "Anti-Screen" App
Commercial AI companies optimize their products for continuous user engagement and endless chat loops. Open-source AI gave us the autonomy to build an AI that does the opposite: answers in 2 seconds, speaks aloud, and intentionally turns off the screen so you can touch grass.
My Agent Session
This project was built and architected in pair-programming collaboration with Antigravity (Google DeepMind's agentic AI assistant). The agent assisted with:
- Architecting the anti-screen WebGPU edge pipeline and auto-sleep countdown mechanics.
- Integrating Google Gemma 2 open weights, configuring the custom
Modelfile, and building the local Ollama bridge. - Developing automated standalone test suites (
test-model.jsandtest-gemma.js) for reproducible CLI verification. - Configuring GitHub Actions CI/CD to ensure continuous model testing and build verification on every commit.
Prize Categories
1. Best Use of Gemma ($200 USD)
-
Model Used: Google Gemma 2 (
google/gemma-2-2b-it/gemma2:2b) by Google DeepMind. -
Implementation: Gemma 2 powers both the dynamic ecological reasoning engine and the real-time sensory quest generator. We created a custom Ollama
Modelfile(FROM gemma2:2b) with a specialized naturalist prompt and sensory quest format, and coupled it with an offline distilled field knowledge cache for zero-cloud resilience in the backcountry. -
Verification: Run
npm run test:gemmato test the open-weight reasoning pipeline directly in your terminal.
2. Best Use of GitHub ($100 USD)
-
Continuous Integration: Implemented an automated GitHub Actions workflow (
.github/workflows/ci.yml). -
Automated AI Testing: On every push and PR, GitHub Actions automatically spins up an environment, runs model unit tests to verify the Gemma 2 reasoning engine, and compiles the production bundle with
npm run buildto prevent regressions for open-source contributors.
Top comments (0)