DEV Community

Cover image for Trail - Mate
Amit Dulariya
Amit Dulariya

Posted on

Trail - Mate

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

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

What I Built

🌿 TrailMate AI β€” Your AI Companion for Touching Grass

TrailMate AI is a simple AI-powered outdoor activity planner designed to help people spend less time in front of screens and more time outdoors.

The idea is simple: instead of endlessly scrolling or wondering what to do outside, TrailMate helps you turn your free time into an outdoor activity.

Users can choose their interests, activity type, difficulty, duration, and other preferences. TrailMate then uses a local open-weight AI model to generate a personalized outdoor plan.

It can be useful for:

  • 🌳 People who want to spend more time outdoors
  • 🚢 People looking for simple walking or outdoor activities
  • πŸ§‘β€πŸ’» Developers and students who spend long hours in front of a screen
  • πŸƒ Beginners who want easy outdoor activity ideas
  • 🌱 Anyone looking for a simple way to "touch grass"

The main goal of TrailMate isn't to keep users inside an AI application.

It's to use AI as a bridge that helps people get outside.

Demo

πŸŽ₯ Video Demo:

πŸ”— GitHub Repository:

GitHub logo amit-dulariya / Trailmate

a sort outdoor visiting plan app

<<<<<<< HEAD

TrailMate AI β€” Ollama local AI integration

TrailMate AI uses a React + Vite frontend and a Node.js + Express backend. The backend sends requests to Ollama's local /api/chat endpoint using llama3.2:3b. The browser never calls Ollama directly.

Requirements

  • Windows 10/11
  • Node.js 18 or newer (Node 20+ recommended; native fetch is used)
  • Ollama for Windows
  • The llama3.2:3b model downloaded locally

1. Install / verify Ollama

Open PowerShell:

ollama --version
ollama pull llama3.2:3b
ollama list
Enter fullscreen mode Exit fullscreen mode

Make sure llama3.2:3b appears in the list. Ollama normally listens on http://localhost:11434. Start the Ollama app if it is not already running.

Optional direct model test:

ollama run llama3.2:3b
Enter fullscreen mode Exit fullscreen mode

Type a short prompt, then enter /bye to exit.

2. Install project dependencies

Extract the project ZIP, open PowerShell in the extracted trailmate-ai-ollama folder (the folder containing package.json), then run:

npm install
Enter fullscreen mode Exit fullscreen mode

3. Start the backend

In…

Code

The complete source code is available on GitHub:

https://github.com/amit-dulariya/Trailmate

The project is structured as a React/Vite frontend with an Express backend.

Some important parts of the project include:

  • src/App.jsx β€” Main application interface
  • src/components/ActivityCard.jsx β€” Activity presentation
  • src/components/OptionPill.jsx β€” User preference selection
  • src/components/PlanResults.jsx β€” Generated plan results
  • src/components/OutdoorMap.jsx β€” Outdoor map component
  • src/data.js β€” Application data
  • server.js β€” Express backend and AI integration
  • src/styles.css β€” Application styling

How I Built It

TrailMate AI is built around open-source/local AI rather than relying completely on a closed AI API.

Tech Stack

  • βš›οΈ React
  • ⚑ Vite
  • 🟒 Node.js
  • πŸš‚ Express.js
  • πŸ¦™ Ollama
  • πŸ€– Llama 3.2 3B
  • πŸ—ΊοΈ Leaflet
  • 🌐 OpenStreetMap
  • πŸ’» JavaScript
  • 🎨 CSS

AI

The AI part of TrailMate runs locally through Ollama using the llama3.2:3b model.

The backend exposes an API endpoint:

POST /api/plan

The user's selected preferences are sent to the backend, which creates a prompt for the local Llama model. The generated response is then returned to the frontend and presented as an outdoor activity plan.

This allows TrailMate to use AI without sending the user's activity preferences to a paid external AI API.

Application Flow

The basic flow is:

  1. User opens TrailMate.
  2. User selects their outdoor preferences.
  3. The frontend sends the preferences to the Express backend.
  4. Express creates the AI prompt.
  5. Ollama runs the local Llama 3.2 model.
  6. The generated plan is returned to the frontend.
  7. TrailMate presents the activity plan to the user.
  8. The user can take the plan offline and actually go outside. 🌳

Why Does Open Innovation Matter?

Open innovation was especially important for this project because I wanted AI to be something that developers can actually experiment with and understand rather than simply calling a closed API.

Using an open-weight model through Ollama allowed me to experiment with local inference and build the AI part of TrailMate around a model running on my own machine.

This has several advantages:

  • πŸ”“ More control over the AI workflow
  • πŸ’» Local inference
  • πŸ’° No dependency on a paid AI API for the core generation
  • πŸ§ͺ Easier experimentation during development
  • πŸ› οΈ More freedom to modify and improve the application
  • πŸ” User preferences can remain local during AI generation

A closed API could certainly generate an activity plan, but using open/local AI made the project more interesting from a developer perspective because I could actually build around the model and understand how the AI fits into the application.

For me, open innovation means being able to take existing open technologies, combine them creatively, and turn an idea into something useful.

My Agent Session

I used AI-assisted development during the development of TrailMate to help with implementation, debugging, architecture decisions, and improving the application.

Prize Categories

I am submitting TrailMate AI for the following category:

🌿 Touch Grass

TrailMate is specifically designed around the idea of using technology to encourage people to step away from their screens and spend time outdoors.

Instead of building another application that keeps users engaged on their devices, TrailMate uses AI to help users decide what they can actually do outside.

The AI is the starting point.

The destination is outdoors. 🌳

Future Improvements

There are several features I would like to add to TrailMate:

  • πŸ“ Real-time nearby outdoor location discovery
  • πŸ—ΊοΈ Interactive outdoor maps
  • 🌳 Nearby parks, gardens, walking and hiking locations
  • πŸ“ Distance-based location filtering
  • πŸ“ Browser-based current location detection
  • πŸ€– Personalized plans based on the selected real-world location
  • πŸ“± Better mobile experience
  • πŸ’Ύ Saved outdoor plans
  • πŸ† Outdoor activity streaks and challenges

The goal is to gradually turn TrailMate from an AI activity generator into a complete outdoor companion.

Conclusion

TrailMate AI started with a simple question:

What if AI could help us spend less time using technology instead of helping us spend more time using it?

That question led me to build TrailMate.

AI generates the plan.

You go outside.

That's the whole idea behind TrailMate. 🌿

Thanks for checking out my project!

GitHub: https://github.com/amit-dulariya/Trailmate

Top comments (0)