This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
FoliageStride AI is a scenic autumn run & park route builder built to solve a modern fitness irony: runners going outdoors just to stare at GPS screens, pace charts, and turn-by-turn prompts every 30 seconds.
Instead of keeping runners glued to their devices, FoliageStride AI uses Google Gemma 2 to synthesize autumn running routes based on distance (2 km, 5 km, 8 km), terrain preference (Maple & Oak canopies, riverbank reflections, historic park perimeters, or hilltop ridges), and pacing style.
In under 30 seconds:
- You select your distance and desired autumn scenery.
- Google Gemma 2 synthesizes the route and extracts 3 to 4 distinct physical visual landmarks such as The Century Red Oak Grove, Heron Creek Footbridge, or Old Stone Wall.
- You commit the visual landmarks to memory, hit Start Run, and pocket your phone.
- A hands-free Web Audio synthesizer produces split cadence chimes at kilometer milestones so you know your checkpoints through your headphones without taking your phone out of your running belt.
- Upon returning, you log your session and outdoor streak into the offline Stride Journal.
Demo
- Live Web App: https://foliagestride-ai.vercel.app/
- GitHub Repository: https://github.com/ahanghosh77/foliagestride-ai
The application runs in modern browsers and includes a fallback route-generation engine when the local AI model is unavailable.
Code
The complete open-source code is available on GitHub:
GitHub Repository:
https://github.com/ahanghosh77/foliagestride-ai
The repository contains:
-
index.html— Main application interface with distance selection, route visualization, elevation profile, visual waypoints, stopwatch, and Stride Journal. -
style.css— Responsive autumn-themed UI with glassmorphism styling. -
app.js— Gemma 2 integration through Ollama, fallback route generation, Web Audio API cadence chimes, and localStorage-based journal tracking.
How I Built It
FoliageStride AI is designed with an offline-first architecture.
Google Gemma 2
The core AI component uses Google Gemma 2 (gemma2:2b) through Ollama.
The model receives the runner's preferences, including:
- Running distance
- Autumn scenery preference
- Terrain preference
- Pacing style
It then generates structured route information and memorable physical landmarks that the runner can remember before starting the run.
Hands-Free Audio
The application uses the browser's native Web Audio API with OscillatorNode and GainNode to generate cadence chimes at kilometer milestones.
This means the runner does not need to continuously look at the phone during the run.
Dynamic Route Visualization
The application uses SVG-based graphics to display the route and elevation profile, together with visual markers representing foliage and important landmarks.
Offline Fallback
If the local Gemma 2 model is unavailable, the application uses a deterministic fallback route-generation engine.
This allows the application to remain usable even without a running local AI model.
Local Journal
The Stride Journal uses browser localStorage to keep track of completed sessions and outdoor streaks without requiring a cloud database.
Why Does Open Innovation Matter?
Open innovation and open-weight models like Google Gemma 2 are especially useful for outdoor and fitness applications.
1. Trail Readiness With Limited Connectivity
Outdoor runners can lose cellular reception inside parks, ravines, mountain trails, and nature reserves.
A local AI model reduces dependence on a continuously available cloud API.
2. Privacy of Physical Location & Movement
Running applications can involve sensitive information such as routes, workout frequency, and frequently visited locations.
FoliageStride AI is designed around local processing and local journal storage rather than sending this information to a third-party fitness server.
3. No Per-Request Cloud AI Cost
Running an open-weight model locally avoids paying for every AI request through a hosted API.
This makes experimentation more accessible to students, developers, and open-source communities.
My Agent Session
This project was built through pair-programming with Google Antigravity.
The agent helped with the responsive UI layout, autumn visual design, SVG course elevation profile, structured JSON schema for Google Gemma 2 prompting, hands-free Web Audio API split-chime synthesizer, and overall project structure.
The final project was refined around the core idea of helping runners touch grass instead of constantly checking a screen.
Prize Category
- Best Use of Gemma — $200 USD
FoliageStride AI uses Google Gemma 2 (gemma2:2b) as the local route-synthesis engine, converting a runner's distance, scenery preference, and pacing style into structured scenic route information with memorable physical landmarks.
Conclusion
FoliageStride AI turns an ordinary run into a more screen-free outdoor experience.
The idea is simple:
Plan with AI → Remember the landmarks → Pocket the phone → Run → Touch Grass. landmarks.
Top comments (0)