DEV Community

Pratik
Pratik

Posted on

TrailMate AI 🌿 β€” Turn Spare Time Into an Outdoor Adventure

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

What I Built

TrailMate AI helps turn the question β€œWhat should I do outside?” into a simple, personalized adventure.

We often spend our free time scrolling through our phones, even when we want to get outside, move around, or take a break from our screens. I built TrailMate AI to make taking that first step easier.

Instead of spending time planning an activity, users choose what they want to do, how much time they have, and what kind of mood they are in. TrailMate AI generates a personalized outdoor adventure with a sequence of small, actionable missions.

Users can choose from five activities:

  • 🌿 Nature Walk
  • 🚢 Walking
  • πŸƒ Running
  • πŸ”Ž Exploring
  • 🧘 Mindfulness

They can also select a duration of 20, 30, 45, or 60 minutes and choose whether they want a relaxing, curiosity-driven, or challenging experience.

Every generated adventure includes a title, description, difficulty level, and timed missions. Users can mark missions as completed, undo them if needed, and track their progress through an animated progress bar. Completing every mission triggers a celebratory animation.

The goal is simple: make the screen the starting point of an experience, not the experience itself.

TrailMate AI is designed for people who want to spend more time outdoors but need a little inspiration to get started. Its suggestions are starting points, so users should adapt them to safe, accessible places and their surroundings.

Demo

πŸ”— Live application: https://trail-mate-ai.vercel.app/

The best way to experience TrailMate AI is to generate an adventure, mark a few missions complete, and watch the progress update.

Code

πŸ’» GitHub repository: https://github.com/pratikraut8889-max/TrailMate-AI

The project is built with Next.js, React, TypeScript, and Tailwind CSS. Its API route communicates with Groq to generate structured adventure data, while Zod validates incoming requests and the generated response.

The interface handles loading and error states, displays generated missions, and tracks mission completion interactively.

How I Built It

The main technology stack is:

  • Next.js and React: Application structure, server-side API route, and interactive UI.
  • TypeScript: Typed activity options, moods, adventures, and missions.
  • Tailwind CSS: Responsive layouts and the visual design.
  • Groq API: Hosted inference for the AI model.
  • OpenAI gpt-oss-20b: An open-weight model that generates personalized adventure plans.
  • Zod: Validation of user inputs and generated adventure data.

I started by building the adventure selection interface. Once the basic UI worked, I connected it to a backend API route that sends the user's activity, available time, and mood to the model.

The model is instructed to return a structured JSON response containing an adventure and its missions. The backend validates that response, checks the expected mission count, and assigns mission IDs and durations before returning the result to the frontend.

One important engineering detail was making the AI response reliable enough for the UI to consume. Generative models may return malformed JSON or unexpected fields, so I added validation and error handling instead of trusting every response.

I then focused on the experience after generation: responsive layouts, loading animations, mission completion controls, a live progress bar, and a completion celebration.

The result is not just an AI text generator. It is a small interactive experience that encourages users to take an idea outside and act on it.

Model reference: OpenAI gpt-oss-20b. Inference provider: Groq.

Why Does Open Innovation Matter?

For TrailMate AI, open innovation matters because the model should not have to be permanently tied to one closed model provider.

I chose an open-weight model, gpt-oss-20b, and currently serve it through Groq. That gives me a practical way to build and deploy the application while retaining the option to explore other compatible inference providers or self-host the model in the future.

Open weights also create opportunities to inspect, experiment with, customize, and adapt a model as a project evolves. For a small project, that flexibility matters: I can continue experimenting with the quality of generated missions, output structure, and the balance between creativity and practical instructions without redesigning the entire application.

To be clear, the current deployed version uses Groq's hosted inference API and requires an internet connection. It does not currently run the model locally or work offline. The benefit of the open-weight approach here is flexibility and control over the model choice, along with a path to different deployment options in the future.

I also wanted to use AI for something that encourages people to spend less time using technology. TrailMate AI uses the model to help people make a plan, then gives them a reason to put their phones away and go outside.

To me, open innovation is not only about making technology available. It is also about giving developers more freedom to experiment with what that technology can help people do.

Prize Categories

I'm submitting TrailMate AI for the overall Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass.

I'm not claiming a partner-specific prize category because the current project uses Groq and Vercel rather than the challenge's listed partner technologies.

Top comments (0)