Building Dog Agent: Why I Built an AI-Powered Community for Dog Walking Adventures (And What Broke Along The Way)
Honestly, I never thought I'd end up building a whole community app just because my golden retriever, Max, kept getting bored on the same walking routes every single day.
It started innocently enough — every morning we'd hit the same park trail, every evening the same neighborhood loop, and after three months Max would just stop halfway and look at me like, "Are we seriously doing this again?" I get it, dude. Variety is the spice of life, even for dogs.
So I began asking other dog owners in my area where they walked. Turns out, everyone has their secret spots — hidden trails along the river, quiet country roads with great smells, abandoned railway lines turned greenways that no one really talks about. But there wasn't a good place to share these spots specifically for dog walking. Google Maps doesn't care if a route has too many busy road crossings, or if there's livestock you have to watch out for, or if the mud gets so bad after rain that your dog will come home looking like a chocolate bar.
That's how Dog Agent started. Three months later, here I am with a working prototype, and a whole bunch of unexpected lessons learned. Let me share it all with you — warts and all.
What is Dog Agent anyway?
Dog Agent is a mobile-first community where dog owners can share, discover, and get AI-powered recommendations for dog walking routes. The core idea is simple:
- Share your favorite dog walks with details that matter to dog owners (surface type, difficulty, traffic, poop bag stations, water access, dog-friendly rules)
- Discover new routes near you filtered by your dog's size, energy level, and your walking style
- AI generates personalized route recommendations based on your preferences, location, and recent walks
- Privacy-first: your location data stays on your device unless you choose to share a route
GitHub repo: https://github.com/kevinten10/dog-agent
Currently it's a side project, completely open source under the MIT license, built with React Native + Go backend + PostgreSQL + PostGIS for spatial queries. I've been using it with my local dog walking group for about a month now, and we've already discovered 17 new great walking routes within 20km that none of us knew existed.
Stars: currently sitting at 5 (all from my dog walking friends, which is honestly more than I expected for a random side project)
Why build another route-sharing app when we already have AllTrails, Strava, Wikiloc?
Great question. I've used all those apps, and they're great for hiking, running, cycling — but dog walking has different priorities.
Let me give you an example: On AllTrails, a 5-star trail might go through an area where dogs are strictly not allowed off-leash, but that doesn't show up anywhere prominent. A "beginner" hiking trail might have 500 stairs — which is fine for fit humans but terrible for an older dachshund with joint issues. A popular route might cross three busy highways without pedestrian crossings — again, that information isn't highlighted anywhere because it's not relevant to hikers, but it's make-or-break for daily dog walking.
Here's what matters to dog owners that other apps don't track well:
- Off-leash friendliness: Is this route legally off-leash? Are there always other dogs around? Is it usually quiet enough to let your dog run safely?
- Surface information: How much asphalt vs gravel vs grass vs mud? Bad surfaces can hurt dog paws, especially after rain.
- Road crossings: How many busy road crossings are there? Is there a safe underpass or overpass?
- Facilities: Are there poop bag stations? Drinking water for dogs? Parking close to the trailhead?
- Dog rules: Are there seasonal restrictions (lambing season, bird nesting areas where dogs must be on-leash)?
- ** Hazards**: Livestock, wildlife (porcupines, ticks, poison ivy), steep drops that aren't good for clumsy dogs
These aren't things that matter much to hikers who are just passing through, but they matter a lot when you're looking for a daily walking spot you can bring your best friend to.
So I built Dog Agent to fill that gap.
Tech stack choices: What worked and what surprised me
Let's talk tech — because that's what you're really here for, right?
I chose:
- Backend: Go — I wanted something lightweight that could handle lots of concurrent spatial queries, and easy deployment on Fly.io. This has worked great so far. Go's standard library is solid, the binary is tiny, cross-compilation to arm64 works perfectly for my VPS.
- Database: PostgreSQL + PostGIS — I knew we'd be doing tons of "find all routes within 10km of me" queries, and PostGIS does this out of the box perfectly. No need for a separate spatial database.
- Mobile app: React Native — I know React already from web work, and Expo makes deployment so much easier for a solo dev. I can get test builds on my phone in minutes.
- AI recommendation: Currently using OpenAI embeddings + simple cosine similarity to match user preferences to routes. Nothing fancy, and it's already working better than expected.
The good
PostGIS has been a joy. I was worried spatial queries would be slow with hundreds of routes, but even with a thousand routes within 50km, it returns results in under 30ms on my cheap $5/month VPS. Here's what a typical nearby query looks like:
// Find all routes within given distance from point
func (q *Queries) ListRoutesNearby(lng float64, lat float64, distance float64, limit int) ([]Route, error) {
// PostGIS makes this literally one line
query := `
SELECT *
FROM routes
WHERE ST_DWithin(
geography(location),
ST_SetSRID(ST_MakePoint($1, $2), 4326),
$3
)
ORDER BY ST_Distance(geography(location), ST_SetSRID(ST_MakePoint($1, $2), 4326))
LIMIT $4;
`
// ... execute query and scan rows
}
That's it. PostGIS handles all the geometry, indexing, distance calculations. I didn't have to implement any of that myself. Absolutely love it.
Go has also been perfect. The entire backend API is about 1200 lines of code, which is tiny. It handles everything from route CRUD to image upload to spatial queries to authentication. Compiles to a single binary, deploy with Docker in 2 minutes.
The bad
React Native has been... fine, but there are definitely things I'd do differently next time.
The biggest surprise? Mapbox is really expensive once you get more than a few thousand active users. I started with their free tier, which is fine for development, but if this ever actually grows it's gonna cost more than my VPS, database, and everything else combined. I'm currently looking at switching to Google Maps or OpenStreetMap-based solutions, but that means rewriting the map layer. Lesson learned: check the pricing before you pick the dependency.
Another gotcha: React Native navigation has so many edge cases. I can't tell you how many hours I've spent debugging deep linking and status bar height issues on different Android versions. For a solo dev, maybe Flutter would have been faster to get moving — but I already knew React, so here we are.
The ugly
The biggest mistake I made early on was not handling image compression properly. Users would upload 12MP photos from their phones straight to the server, and suddenly my 80GB VPS disk was 90% full in two weeks from like 50 photos. Oops.
Fixed that with client-side compression before upload:
// In React Native, using react-native-image-resizer
const resizeImage = async (uri: string) => {
const response = await ImageResizer.createResizedImage(
uri,
1200, // max width
800, // max height
'JPEG',
80 // quality
);
return response.uri;
};
That reduced average photo size from ~3MB to ~200KB, problem solved. But I wasted a weekend panic-deleting old photos to free up space. Always compress images before upload, kids.
AI recommendations: Simpler is better
Originally I thought I'd need a huge fancy ML model to recommend routes to users. "AI-powered" is in the name, after all. But turns out, you don't need that much complexity to get useful recommendations.
Here's what I do now:
- When a user adds preferences (dog size, energy level, favorite terrain, hates busy roads), generate an embedding from those preferences using text-embedding-3-small.
- When a user adds a route, generate an embedding from the route description and all the metadata tags.
- To get recommendations, just compute cosine similarity between the user's preference embedding and all the route embeddings nearby, sort, return top 10.
That's literally it. 50 lines of code. And it works shockingly well.
Here's the core of it:
import (
"math"
"github.com/kevinchan08/go-cosine"
)
func getRecommendations(userEmbedding []float32, routes []RouteWithEmbedding, limit int) []RouteWithEmbedding {
type scored struct {
route RouteWithEmbedding
score float64
}
var scores []scored
for _, r := range routes {
similarity := cosine.Distance(userEmbedding, r.Embedding)
// cosine distance is 0-1, lower = more similar
// convert to similarity score 0-1 higher = better
score := 1 - similarity
scores = append(scores, scored{route: r, score: score})
}
// sort descending by score
sort.Slice(scores, func(i, j int) bool {
return scores[i].score > scores[j].score
})
// return top N
var result []RouteWithEmbedding
for i := 0; i < len(scores) && i < limit; i++ {
result = append(result, scores[i].route)
}
return result
}
I was honestly skeptical this would work — but because both the user preferences and the route descriptions are natural language, the embeddings capture semantic similarity really well. If a user says "my dog loves swimming and we're looking for river trails", the embedding ends up close to routes that mention "river" "swimming" "water" in their descriptions.
It's not perfect, but for a side project it's more than good enough. And it's cheap — each embedding is like a penny or less for hundreds of routes. I don't need to fine-tune any models, don't need to run any GPUs, just call the OpenAI API once per route/perference and done.
So here's the thing: I learned the hard way that you don't need GenAI for everything, but when you use it for what it's good at (turning natural language into vectors that capture meaning), it's magical how simple you can keep things.
Pros & Cons: Honest talk about this project
Let's cut the marketing fluff — here's what works and what doesn't.
Pros
✅ Privacy-first by design: You don't have to share your location or your walks if you don't want to. All personal data stays on your device unless you explicitly choose to contribute.
✅ Really simple data model: The entire schema is like 8 tables. Easy to maintain, easy to hack on if you want to add features.
✅ Works offline: Once you load nearby routes, you don't need data service to browse them — great for remote walking areas.
✅ Open source & free: MIT license, no open-core nonsense, all code is on GitHub. You can run your own instance if you want, totally free.
✅ Incremental adoption: You can use it just to discover routes, you don't have to share any of your own if you don't want to. No pressure.
✅ Spatial queries just work: PostGIS does all the heavy lifting, it's fast even on cheap hardware.
Cons
❌ Still beta: It's three months old, built by one person in spare time. There are bugs, and some features aren't done yet (like social features, following other users, commenting).
❌ Mapbox pricing: As I mentioned earlier, if it grows I either have to switch map providers or start charging, which I didn't want to do. Current version still uses Mapbox for now, but migration is on the todo list.
❌ Only iOS currently: Android build is almost done but not fully tested yet. Solo dev problems — I only have an iPhone to test on.
❌ AI recommendations are basic: It works okay for now, but it could be smarter. It doesn't learn from your actual walked routes yet, just your stated preferences.
❌ No offline maps caching: If you go really off-grid with no cell service, you can't see the map tiles, only the route line. That's on the todo list but not done yet.
My personal lessons building this project
So here's what I learned starting this project from zero three months ago:
First, solve your own problem first. I built this because Max and I actually needed it. Every feature I added was because I hit the problem myself. That keeps you focused, you don't build a bunch of useless features no one actually uses. I've built so many projects in the past solving other people's hypothetical problems, and most of them went nowhere. This one's different because I use it every single day.
Second, side projects need scope control. I originally wanted to add social login, sharing, commenting, following, direct messaging, route rating, everything. I cut all that except the core — share routes, discover routes, recommend routes. That's it. The entire project took three months from idea to working prototype because I kept it small. You can always add features later.
Third, don't reinvent the wheel. PostGIS already does spatial queries perfectly. OpenAI already does embeddings perfectly. Expo already does mobile deployment. Why build your own spatial index when PostGIS has already had decades of work put into it? Use the best tool for each job, even if it means calling an API.
Fourth, expect the unexpected. I never thought map pricing would be my biggest problem this early on. I never thought image compression would fill my disk in two weeks. Every project has these gotchas — that's part of the fun, right? If everything went according to plan it'd be boring.
Honestly, I'm having a lot of fun with this. It's my first full mobile app from scratch, first time using PostGIS seriously, first time adding AI recommendations to a real project I use myself. Even if no one else ever uses it, it's already been worth it for what I've learned.
What's next for Dog Agent
Right now it's just me working on it in my spare time after work and on weekends. The immediate next steps are:
- Finish testing Android build and get it on the app stores
- Switch map providers to something more affordable for growth
- Add offline map tile caching
- Add basic social features — commenting on routes, adding photos after your walk
- Improve the AI recommendations to learn from the routes you actually liked, not just your stated preferences
If you're a dog owner who's frustrated with the existing route apps, or you're a developer who wants to contribute, check out the GitHub repo and give it a star: https://github.com/kevinten10/dog-agent
All contributions are welcome — especially if you know React Native and want to help me fix Android bugs 😂
Wrapping up
So here we are — started because my dog was bored of walking the same route every day, ended up with a full-stack mobile app with AI recommendations. That's how side projects go, right?
The biggest takeaway for me: Sometimes the best projects are the ones that solve a tiny specific problem that no big company cares about. There's millions of dog owners out there, and none of the big fitness apps care about the specific things we care about when walking our dogs. That's where the interesting side project space is — solving those small specific problems that personally affect you.
I still can't believe how well the simple AI embedding approach worked. I went into this expecting to need a whole complex recommendation system, and it turns out 50 lines of code and cosine similarity gets me 90% of the way there. Sometimes simple really is better.
Now it's your turn: Do you have a dog? Do you walk them regularly, have you ever struggled to find new good walking spots? Are you building a side project solving your own specific problem? Drop a comment below and share your story — I'd love to read it.
Top comments (0)