This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
As software developers and students, we spend hours staring into glowing monitors, debugging code, and ignoring physical fatigue. We know we should take breaks, but decision paralysis often keeps us at our desks: "Where should I go? How long will it take? Is it worth leaving the house?"
To solve this, I built TouchGrass AI: an open-source, local-first outdoor assistant powered by Node.js and open-weight semantic embeddings.
Instead of routing you toward commercial stores, crowded coffee shops, or traffic-heavy streets, TouchGrass AI is specifically designed to get you off your chair and into nature.
You describe how you are feeling in plain language:
"I have 40 minutes between meetings, my eyes are tired, and I need a quiet, shaded place to walk without crowds."
TouchGrass AI semantically indexes local trail networks, city parks, and green corridors, matching your mood and available time with the nearest outdoor sanctuary.
Demo
Here is how TouchGrass AI transforms an everyday burnout prompt into a real-world outdoor session:
1. The Developer Prompt
Query: "I've been debugging for 6 hours. I need a quiet nature trail under 30 minutes away to clear my head."
2. The Semantic Recommendation
{
"trailName": "Oak Ridge Canopy Loop",
"distance": "1.4 miles (25 min walk)",
"natureScore": "94/100 (Dense tree cover & minimal road noise)",
"vibe": "Quiet, shaded, gravel path with bench overlooks",
"screenFreeTip": "Put phone on Do-Not-Disturb and complete one loop before opening your laptop again."
}
The system provides lightweight offline directions so you can shut your laptop, pocket your phone on Airplane Mode, and actually touch grass.
Code
You can find the project repository and core backend logic on GitHub:
👉 github.com/naveen-cs50-cse/TheArchive-AI.Powered
The Core Vector Retrieval Engine (Node.js)
The recommendation engine uses vector embeddings and cosine similarity to map user intent against outdoor sanctuary profiles:
/**
* Compute cosine similarity between query embeddings and trail embeddings
*/
function cosineSimilarity(vecA, vecB) {
let dotProduct = 0;
let normA = 0;
let normB = 0;
for (let i = 0; i < vecA.length; i++) {
dotProduct += vecA[i] * vecB[i];
normA += vecA[i] * vecA[i];
normB += vecB[i] * vecB[i];
}
if (normA === 0 || normB === 0) return 0;
return dotProduct / (Math.sqrt(normA) * Math.sqrt(normB));
}
/**
* Filter and retrieve the best outdoor spots based on context
*/
function recommendTrails(userQueryEmbedding, trailDatabase, threshold = 0.76) {
return trailDatabase
.map((trail) => ({
...trail,
relevanceScore: cosineSimilarity(userQueryEmbedding, trail.embedding),
}))
.filter((trail) => trail.relevanceScore >= threshold)
.sort((a, b) => b.relevanceScore - a.relevanceScore)
.slice(0, 3);
}
How I Built It
- Runtime: Node.js & Express for low-latency asynchronous processing.
-
Embeddings & Vector Search: Uses open-weight sentence embeddings (like
all-MiniLM-L6-v2) to turn subjective outdoor trail descriptions into 384-dimensional vector arrays. - RAG Pipeline: The query is embedded on-the-fly, compared against community trail vectors, and filtered through strict similarity thresholds to eliminate irrelevant commercial spots.
- Local-First Caching: Trail coordinate packages and summaries are stored in a local JSON cache so hikers can access them in dead zones with zero cell reception.
Why Does Open Innovation Matter?
When we rely on closed, proprietary AI APIs for personal well-being and outdoor recreation, several critical problems arise:
- Nature Shouldn't Require an Internet Connection: Proprietary cloud LLMs stop working the moment you enter a forest or mountain trail without 5G. Open-weight models allow true edge execution directly on your device.
- Location Privacy: Closed AI companies log your prompts, IP addresses, and personal schedules to train ad targeting models. Open-source AI lets users find quiet spots without broadcasting their daily movement patterns.
- Community Over Commercialization: Proprietary map algorithms optimize for businesses that pay for advertising. Open innovation keeps the focus purely on human well-being, public parks, and conservation.
Prize Categories
- Open-Source AI Challenge Week 1: Touch Grass
- Best Open-Weight / Local AI Application
Top comments (0)