DEV Community

Adarsh Negi
Adarsh Negi

Posted on

TrailMate πŸŒΏπŸ‘» β€” A Ghost in Your Pocket That Wants You Outside

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission πŸ‘»πŸŒΌ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

TrailMate πŸŒΏπŸ‘» β€” A Ghost in Your Pocket That Wants You Outside

What if the ghost in your machine didn't want to haunt you, steal your data, or keep you doomscrolling?

What if it wanted you to close your laptop and go outside?

TrailMate is a local-AI-powered outdoor exploration companion that turns ordinary walks into small adventures.

Choose an environment, set a duration and difficulty, and TrailMate generates an outdoor mission with three objectives. These missions encourage you to look more closely at your surroundings, discover visual details, and pause for mindful observation.

A neighborhood you've walked through a hundred times might still have something you've never noticed. A quiet park might tell a different story when you slow down and pay attention.

That's the spirit behind this project: treating the familiar world as something waiting to be rediscovered.

For the Ghost in the Machine theme, I like the idea of an invisible companion that quietly nudges you toward the physical world rather than demanding more of your attention.

The ghost stays in the machine. The adventure happens outside it.

Demo

πŸŽ₯ Video demo: [Add your demo link here]

TrailMate currently runs locally with a Next.js frontend, a FastAPI backend, and Gemma 3 4B through Ollama.

The demo will show the mission preferences, local AI generation, and the resulting three-objective mission.

Code

πŸ’» GitHub repository: [Add your public GitHub repository URL here]

The project is built with:

  • Next.js, React, TypeScript, and Tailwind CSS for the frontend.
  • Python and FastAPI for the backend.
  • Gemma 3 4B through Ollama for local AI inference.
  • Pydantic for validating structured model output.
  • Pytest and Node's test runner for automated tests.

The architecture keeps the AI integration behind the backend rather than exposing the model runtime directly to the frontend.

How I Built It

I started by building the backend, integrating Ollama, and defining a structured mission schema. Then I connected the frontend to the mission-generation API.

The current flow is straightforward:

  1. The user selects an environment, difficulty, and duration.
  2. The frontend sends those preferences to FastAPI.
  3. The backend asks Gemma 3 4B to generate a structured mission.
  4. The backend validates the response before returning it.
  5. The frontend displays the mission and its three objectives.

One of the most interesting challenges has been running a 4-billion-parameter model on my own laptop's CPU.

Local inference is not instant. Cold starts and generation time can make a simple interaction feel surprisingly long, which means timeout configuration, loading states, and failure recovery matter just as much as the model call itself.

That experience has reminded me that building an AI product isn't simply about getting a model to produce an answer. It's about making the whole system useful and reliable despite the limitations of the hardware.

TrailMate is still evolving. The current focus is making mission generation work reliably; features such as camera-based objective verification and a persistent discovery journal remain future work.

Why Does Open Innovation Matter?

For TrailMate, open innovation isn't just a way to save API costs. It's an opportunity to build an AI experience that I can run and understand on my own hardware.

Using Gemma 3 4B through Ollama lets me experiment with local inference instead of making a closed, cloud-hosted AI API a mandatory dependency.

That gives the project several advantages:

  • Control: I can configure the model runtime and decide how the application communicates with it.
  • Privacy potential: Mission preferences can be processed locally rather than automatically being sent to a third-party AI service.
  • Flexibility: The model integration can evolve as I experiment with different models and configurations.
  • Accessibility for experimentation: I can learn about prompts, structured generation, validation, and inference without needing to build every experiment around a paid API.

There are trade-offs, of course. My laptop's CPU is considerably slower than dedicated inference hardware, and local inference still requires the model and runtime to be installed. I wouldn't claim that every part of TrailMate currently works offline without testing that end to end.

But open models make this kind of experimentation possible. I can inspect the application architecture, control the inference setup, and learn from the constraints instead of treating the model as a black box behind someone else's API.

That freedom is what makes open innovation valuable to this project.

My Agent Session

[Add a DevRelay agent session link here, if available.]

I'd like the development process to be part of the story too: not just the finished interface, but the iterations, debugging, and engineering decisions that made it work.

The Spirit of It

Halloween usually gives us ghosts that want our attention.

TrailMate imagines a different kind of ghost: one that reminds us how much of the world we miss when our attention is permanently trapped inside a screen.

It might be the old tree on your street, a strange pattern in a wall, the sound of birds somewhere nearby, or a corner of your neighborhood you've never explored.

You don't need a supernatural encounter to rediscover something. Sometimes you just need a reason to look.

And perhaps that's a fitting use for AI: not to replace the experience of being present, but to help us find our way back to it.

The best TrailMate session ends with the user putting their phone away.

The ghost lives in the machine. The story happens out there. πŸŒΏπŸ‘»

Prize Categories

[Add the applicable partner categories after checking the official challenge rules.]

Top comments (0)