DEV Community

Cover image for "WanderQuest: AI scavenger hunts that put the phone in your pocket"
arjav patni
arjav patni

Posted on

"WanderQuest: AI scavenger hunts that put the phone in your pocket"

What I Built

WanderQuest is a mobile web app that turns the streets around you into a
scavenger hunt. You tap Start My Quest, and the app finds real places
near you from OpenStreetMap, such as historic buildings, fountains, artworks,
viewpoints and notable trees. An open-weight AI model then writes a
cryptic rhyming riddle for each one, without ever naming the place.

The screen is only a compass and a riddle-master. A distance counter ticks
down as you walk, and to claim a quest you have to physically get within
100 metres of the place. Then you snap a photo, and the app reveals what it was.

It's for anyone who says "I should go for a walk" and then doesn't:
people who work at screens all day, families looking for something to do on a
weekend, or visitors who want to see a neighbourhood differently.

How It Gets People Outside

  • The game only works outdoors. There is no way to complete a quest from the couch. The server checks your GPS position against the target.
  • Riddles, not directions. You look at buildings, signs and statues instead of a blue dot on a map.
  • Short and flexible. Each hunt is three places within about 1 km, so it fits into a lunch break.
  • Distance, not a route. The screen shows how far away you are, so you keep your eyes on the world.

Demo

How I Built It

Piece What I used
AI model openai/gpt-oss-20b, an open-weight model, served by Groq
Map data OpenStreetMap via the Overpass API
Backend Python and FastAPI
Database PostgreSQL on Render (SQLite locally)
Frontend One plain HTML/JS file, mobile-first
Photo check CLIP running in the browser via Transformers.js

The flow:

  1. The browser sends my GPS position to the backend.
  2. The backend queries Overpass for named historic sites, artworks, viewpoints, fountains and tagged trees within 1 km.
  3. It picks three of them and works out each one's distance and compass direction.
  4. It sends only the place name, type, direction and distance to the model and asks for JSON riddles in rhyming couplets that don't contain the name.
  5. The riddles and targets are saved in Postgres. The place name is kept on the server and only revealed after the location check passes.

The model is called through an OpenAI-compatible endpoint, so the code
doesn't depend on any one model or host. Setting LLM_BASE_URL and
LLM_MODEL is enough to point it at Groq, Together, or a local Ollama.

I started with Llama 3.1 8B, but Groq returned a 404 for it on my account.
I asked Groq's /models endpoint what my key could use and swapped to
gpt-oss-20b by changing one line in .env. That's the open-weights point in
practice: my app didn't break when one model went away.

The photo check is a bonus, and the location check is what actually
verifies a quest. The browser runs an open vision model to see if the photo
looks like the target type, and the photo never leaves the phone.

Why Open Innovation Matters Here

[Write this part in your own voice. Here is a draft you can edit:]

Swappable models. The riddle writer is a replaceable part. When my first
model stopped working, I changed one setting and carried on. With a closed API
I would have had to rewrite code or wait. Because the weights are open, I can
also run the same app locally with Ollama and no cloud at all.

Open map data. WanderQuest only exists because people mapped their own
neighbourhoods on OpenStreetMap: every fountain, mural and old mill. A closed map
service would have restricted how I could query and use that data. Here, the
community's data becomes the playground.

Privacy by design. The AI model never sees where I am. It only receives the
name, direction and distance of a place, and the photo check runs in the browser.
My GPS position goes only to my own server and to OpenStreetMap's public
Overpass API, so no proprietary ad network is involved.

Anyone can fork it. It's MIT licensed. A school could point it at its
campus, a city could add its heritage trail, and a parks group could swap in
local species. Open code, open data and open models make that possible.

What I'd Build Next

  • Hunts for a specific theme, such as street art, trees or local history
  • Friends racing the same hunt
  • A fully local mode with Ollama, for no-cloud use
  • Better coverage for places with sparse map data

Top comments (0)