DEV Community

Root Kevadiya
Root Kevadiya

Posted on

🌿 TrailMate AI β€” Your Offline AI Outdoor Companion

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

🌿 TrailMate AI β€” Your Offline AI Outdoor Companion

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

What I Built

TrailMate AI is an offline-first AI outdoor companion designed to help people spend less time looking at screens and more time exploring the real world.

The project uses Gemma, an open-weight AI model, running locally through Ollama as a core part of the application.

The idea is simple:

Discover β†’ Ask Gemma β†’ Get a mission β†’ Put the phone away β†’ Explore β†’ Return β†’ Record your discovery β†’ Earn XP.

TrailMate allows users to take or upload a photo of a plant or natural object. The local AI system uses Gemma to analyze the observation and provide useful, beginner-friendly information.

Instead of keeping the user inside the application, TrailMate then uses Gemma to generate a short outdoor mission.

For example:

🌿 Outdoor Mission

Find another tree nearby and compare its leaves with the plant you just discovered.

+20 Explorer XP

The user can activate Touch Grass Mode, put their phone away, and complete the mission outside.

After returning, they can record what they discovered in their Nature Journal and earn Explorer XP.

Who is it for?

TrailMate is designed for:

  • 🌱 Students
  • πŸ₯Ύ Hikers and walkers
  • 🌳 Nature lovers
  • 🐦 Outdoor explorers
  • πŸ‘¨β€πŸ‘©β€πŸ‘§ Families
  • Anyone who wants a reason to spend more time outdoors

The goal isn't to make people spend more time using an AI app.

The goal is to make them stop using it and go outside.


πŸ€– How Gemma Powers TrailMate

Gemma is the AI brain of TrailMate.

Instead of sending every request to a proprietary cloud AI API, TrailMate runs a Gemma model locally through Ollama.

The basic architecture is:

User
  β”‚
  ↓
TrailMate Streamlit App
  β”‚
  ↓
Python Application
  β”‚
  ↓
Ollama
  β”‚
  ↓
Gemma Open-Weight Model
  β”‚
  β”œβ”€β”€ Nature/Image Analysis
  β”œβ”€β”€ Plant Information
  β”œβ”€β”€ Outdoor Mission Generation
  β”œβ”€β”€ Observation Feedback
  └── Nature Journal Assistance
Enter fullscreen mode Exit fullscreen mode

Gemma is therefore not just an extra chatbot inside the project.

Gemma is part of the core workflow that makes TrailMate work.


🌿 What Gemma Does

1. Nature Understanding

When the user provides a nature observation, Gemma helps analyze and explain it.

Example:

User:
I found this plant during my walk.

        ↓

TrailMate
        ↓

Ollama
        ↓

Gemma
        ↓

Possible identification
+ Description
+ Habitat
+ Interesting information
Enter fullscreen mode Exit fullscreen mode

The application is designed to communicate uncertainty rather than pretending that every identification is correct.


2. Outdoor Mission Generation

Gemma converts an observation into an outdoor activity.

For example:

Observation:
User found a Neem-like tree.

        ↓

Gemma

        ↓

🌳 Mission:

Find another tree nearby.
Compare its leaf shape and size
with the first tree.

Reward: +20 XP
Enter fullscreen mode Exit fullscreen mode

This is an important part of the Touch Grass concept.


3. Nature Journal

The user can describe what they saw.

Gemma can turn the observation into a short, useful reflection.

Example:

User:
I found two trees with different leaves.

        ↓

Gemma

        ↓

Nature Journal:

"Today you noticed two different
leaf shapes. Next time, compare
their bark and arrangement."
Enter fullscreen mode Exit fullscreen mode

4. AI Feedback

After completing a mission, Gemma can provide feedback and suggest what the user could observe next.

This creates a loop:

Discover
   ↓
Gemma
   ↓
Explore
   ↓
Observe
   ↓
Gemma
   ↓
Learn
Enter fullscreen mode Exit fullscreen mode

πŸ› οΈ How I Built It

TrailMate AI is built using:

Technology Purpose
Gemma Open-weight AI reasoning/analysis
Ollama Runs Gemma locally
Python Application logic
Streamlit User interface
Pillow Image processing
SQLite Local data storage
Git/GitHub Open-source development

Core technology stack

🌿 TrailMate AI
       β”‚
       β”œβ”€β”€ Streamlit
       β”‚
       β”œβ”€β”€ Python
       β”‚
       β”œβ”€β”€ Ollama
       β”‚      β”‚
       β”‚      └── πŸ€– Gemma
       β”‚
       β”œβ”€β”€ Pillow
       β”‚
       └── SQLite
Enter fullscreen mode Exit fullscreen mode

πŸ“΄ Local AI Architecture

One of the key design decisions was to run Gemma locally.

The application communicates with Ollama on the user's computer:

TrailMate
    β”‚
    ↓
localhost
    β”‚
    ↓
Ollama
    β”‚
    ↓
Gemma
    β”‚
    ↓
Response
Enter fullscreen mode Exit fullscreen mode

This means the core AI interaction does not need to depend on a remote proprietary AI API.

Once the required model and dependencies are installed, the application can continue to provide its core AI functionality without continuously requiring internet access.


πŸ”’ Why Does Open Innovation Matter?

Open innovation matters because TrailMate deals with personal observations, images, and outdoor exploration.

Using an open-weight model such as Gemma gives us much more control over where and how AI runs.

πŸ”’ Privacy

With local Gemma inference, the user's images and observations can remain on their own computer instead of automatically being sent to a proprietary AI provider.

πŸ“΄ Offline Potential

Outdoor environments don't always have reliable internet.

Running Gemma locally through Ollama allows the AI experience to continue working after the model has been downloaded and configured.

πŸ”„ Model Freedom

The architecture isn't permanently tied to one proprietary AI API.

We can experiment with different open models and choose the one that works best for specific tasks.

πŸ’° No Per-Request Cloud AI Cost

Because Gemma runs locally, the core AI functionality doesn't require paying a cloud provider for every AI request.

This makes experimentation much more accessible for students and developers.

πŸ› οΈ More Control

Using an open-weight model allows developers to experiment with:

  • Prompts
  • Model selection
  • AI behavior
  • Local inference
  • Custom datasets
  • Future fine-tuning
  • Specialized nature applications

This would be much harder to control when the entire AI layer is a closed API.


🌳 Why Gemma Was a Good Fit

We chose Gemma because it gives TrailMate a practical way to experiment with an open-weight AI model while keeping the AI layer under our control.

Instead of building:

TrailMate
   ↓
Closed AI API
   ↓
Internet
   ↓
Cloud
Enter fullscreen mode Exit fullscreen mode

we built the core AI path around:

TrailMate
   ↓
Ollama
   ↓
Gemma
   ↓
Local AI
Enter fullscreen mode Exit fullscreen mode

This architecture fits the project's goal of creating an offline-first outdoor companion.


🌿 The "Touch Grass" Philosophy

The most important design decision in TrailMate is that the AI should not become another reason to stay on the screen.

Many AI applications encourage users to keep chatting.

TrailMate does the opposite.

The application gives the user a short interaction:

πŸ“· Discover something
        ↓
πŸ€– Gemma explains it
        ↓
πŸ₯Ύ Gemma creates a mission
        ↓
πŸ“± Put the phone away
        ↓
🌳 Go outside
        ↓
πŸ‘€ Explore
        ↓
πŸ“” Record what you discovered
        ↓
πŸ† Earn XP
Enter fullscreen mode Exit fullscreen mode

The screen is only a tool to start and finish the experience.

The real product is the outdoor experience.


πŸ₯Ύ Touch Grass Mode

TrailMate includes a dedicated Touch Grass Mode.

When the user starts a mission, the application displays:

🌳 MISSION STARTED

Your AI guide has given you
everything you need.

πŸ“± PUT THE PHONE DOWN.

πŸ₯Ύ GO OUTSIDE.

πŸ‘€ LOOK AROUND.

🌿 EXPLORE.

Come back when you're done.
Enter fullscreen mode Exit fullscreen mode

This is intentionally designed to minimize screen time.


πŸ† Explorer XP

TrailMate includes a simple gamification system.

Examples:

🌿 Identify a plant       +10 XP
πŸ₯Ύ Complete a mission     +20 XP
πŸ“” Add a journal entry    +10 XP
🐦 Observe a bird         +15 XP
🌳 Make a new discovery   +25 XP
Enter fullscreen mode Exit fullscreen mode

Explorer levels:

🌱 Beginner Explorer
        ↓
🌿 Nature Explorer
        ↓
🌳 Trail Explorer
        ↓
πŸ₯Ύ Outdoor Adventurer
        ↓
πŸ† Nature Master
Enter fullscreen mode Exit fullscreen mode

The purpose of XP is not to encourage more screen time.

It is to reward real-world exploration.


πŸ“” Nature Journal

Every completed exploration can become part of the user's local Nature Journal.

The journal can contain:

  • Date
  • Discovery
  • Image
  • AI identification
  • User observation
  • Mission
  • XP earned

Example:

October 7, 2026

🌿 Discovery:
Neem-like tree

πŸ‘€ Observation:
"I found this tree during my walk."

πŸ€– Gemma's feedback:
"Compare the leaf arrangement with
another nearby tree."

πŸ† XP:
+20
Enter fullscreen mode Exit fullscreen mode

πŸ” Privacy by Design

TrailMate is designed around local-first data handling.

User data such as:

  • Nature photographs
  • Observations
  • Journal entries
  • Mission history
  • XP

can be stored locally.

The application does not need to send these details to a cloud AI service for the core workflow.


πŸ’» Code

GitHub Repository:

[Add your GitHub repository link here]

The repository contains:

TrailMate-AI/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ pages/
β”œβ”€β”€ core/
β”œβ”€β”€ database/
β”œβ”€β”€ utils/
β”œβ”€β”€ data/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── LICENSE
Enter fullscreen mode Exit fullscreen mode

The project is intended to remain open so other developers can experiment with the AI prompts, model, outdoor missions, and future nature-focused features.


πŸŽ₯ Demo

Demo Video:

[Add your YouTube/Loom/demo link here]

Live Demo:

[Add your deployed Streamlit link here]

The demo will show:

  1. TrailMate dashboard
  2. Gemma/Ollama local AI status
  3. Nature image upload
  4. Gemma-powered analysis
  5. Outdoor mission generation
  6. Touch Grass Mode
  7. Mission completion
  8. Nature Journal
  9. Explorer XP

πŸ€– My Agent Session

DevRelay Agent Session:

[Add your DevRelay session link here]

The session shows the development process and how the project was built with AI-assisted development.


πŸ† Prize Categories

🌿 Touch Grass

TrailMate is designed specifically around the Touch Grass theme by encouraging users to leave the screen and explore their physical surroundings.

πŸ€– Open-Source / Open-Weight AI

TrailMate uses Gemma, an open-weight AI model, as a core part of the application.

Gemma runs locally through Ollama, allowing the project to experiment with local AI rather than depending entirely on a proprietary cloud API.

πŸ“΄ Local / Offline AI

The architecture is designed around local inference, allowing the core AI workflow to work without continuously requiring internet access after the required model and dependencies are installed.


πŸš€ What's Next?

Future versions could add:

  • 🐦 Offline bird-call identification
  • 🌱 More specialized plant recognition
  • πŸ—ΊοΈ Nature trail recommendations
  • 🌦️ Weather-aware missions
  • πŸŽ™οΈ Voice interaction with Gemma
  • πŸ“ Local biodiversity information
  • πŸ“΄ Better offline maps
  • πŸ† Group outdoor challenges
  • 🧠 Fine-tuning with local nature datasets

The long-term goal is to make TrailMate a personal open AI guide for exploring the physical world.


πŸ’‘ Final Thought

AI doesn't always need to keep us in front of a computer.

Sometimes the best thing an AI can do is tell us:

"You've learned enough. Put the phone down and go see it yourself." 🌳

That's what TrailMate AI is trying to build.


πŸ‘€ Creator

Project: TrailMate AI

Challenge: Hacktoberfest Open-Source AI Challenge β€” Week 1: Touch Grass

Creator: Root Kevadiya


πŸ”— Project Links

Top comments (0)