DEV Community

jesroff rouk
jesroff rouk

Posted on

Trailbook: Take the photos outside, get the story back home

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

Trailbook turns the photos you take on a walk into a journal of the walk. You go outside and take photos with your phone's location turned on. When you're back, you drop the photos into Trailbook and it builds an interactive map , a round photo button at every place you stopped, a dashed path showing the route you took, and a card for each stop with a title, a short quote and the place name. It also writes a short sweet story of the whole journey.

It's for anyone who takes photos on walks, hikes and trips and wants a keepsake without spending an evening arranging an album, or uploading their location history to a cloud service to get one.

The "touch grass" part is built into the idea. Trailbook does nothing while you're out. It has no live tracking, no feed and nothing to check. The only way to get a journal is to go somewhere and take the photos, and the journal is what you get when you come back.

Demo

Code

Trailbook

Go outside, take photos, come back to a map of your walk.

trailbook turns a set of geotagged photos into an interactive journey: a map with your photos pinned where you took them, a dashed path showing the route, and a title, quote and short story written for every stop by an open-weight model running on your own machine.

Built for the Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass.

The app only has value if you leave the screen and take photos. It does nothing during the trip, and the journal is what you get when you come back.

Open pieces this project runs on

Piece Role
Ollama + an open-weight vision-language model Looks at each photo and writes its title, quote and location name, then the story of the whole journey
OpenStreetMap tiles and Nominatim Map background and address lookup
Leaflet Interactive map
FastAPI,
…

How I Built It

The pipeline runs in these steps:

  1. Read the photos. Pillow reads the GPS position and time from each photo's EXIF data.
  2. Find the address. OpenStreetMap's Nominatim turns each coordinate into a real address. I do this step outside the model on purpose, so the model can't invent a place.
  3. Describe each photo with a local model. I run gemma3:4b through Ollama. For each photo it gets the image, the address, the time and the titles of the earlier stops, and it fills in a location name, a short title and a one-line quote. Each quote fits the photo and the journey so far.
  4. Write the story. A second call to the same model writes the story of the whole journey from those stop details. It's told to use only the facts it was given.
  5. Return one JSON file. The result has the stops, a GeoJSON route and the story, so any frontend can use it however it wants

The backend is FastAPI. It saves the uploaded photos to a temporary folder, runs the pipeline, deletes the folder and returns the result as a downloadable journal.json. Nothing is stored on the server. The model and all settings are fixed on the server, so the frontend can only send photos.

The frontend is React with Vite. The map uses Leaflet with OpenStreetMap tiles, cropped to fit your stops, with photo pins and an animated dashed route. You can also open a saved journal.json later and see the map again without running the model.

Small models sometimes return messy JSON, so every model call has fallbacks. If a call fails, the page still works, using the address as the place name.

At first glance open source AI might seem a small part of it but It's the core of the project because without it we just some facts with images , description is what makes it live.

Why Does Open Innovation Matter?

A trip's photos with their locations are a detailed record of where you've been and when. For a journal app, sending all of that to a closed API would mean handing over your photos and your movements to get a few sentences back.

These kind of thing can be done by providing images to closed-API but That creates the issue of sharing location, image information with Organization which might misuse user's data.

Because the model is open-weight and runs locally through Ollama, the photos, the descriptions and the story stay on my machine. Only the coordinates go out, to OpenStreetMap's address lookup, and that can be switched off with one setting. The rest of the stack is open too: OpenStreetMap, Nominatim, Leaflet and FastAPI.

It also means the model is a choice, not a dependency. Switching to a different or larger vision model is a one-line change, so people can pick whatever their own computer can run.

Conclusion

There are few improvements that I could have done like share option to download and share the preview of your journey or adding an option to share this interactive feature directly with others.

I kept it as sample as I can and the problem was pretty personal because I have felt this issue that , Sometimes I go out but couldn't able to record and visualize my journey the way I want.

I loved designing the system and building this project using AI. As developers are being advised to "touch the grass". This project do exactly that considering that It doesn't interrupt in the process.
personally I tested it by myself, sad is that I only moved around 0.33km but Experiment turn out to be a success and indeed I touched some grass.

Top comments (0)