Overview
What it is
Unroute is an iOS app for finding places and events in an unfamiliar city through experiences shared by people who know it, with a city map, saved plans and events anyone can create. It's published on the App Store, and I built it solo, from the SwiftUI client to the serverless backend. It runs on iOS 18 and later, on iPhone and iPad, in six languages. The app's rules (models, validators, and the map, geohash and cluster policies) live in a Swift package with no Firebase or UI imports. The client can't write content to Firestore at all: every change goes through a Cloud Function.
Numbers
- 60
- Supported cities
- 6
- Languages
- 33
- Cloud Functions
- 975
- Passing tests
- 31.4k
- Swift lines
- Solo
- Developer
Story
Why I built it
The idea came from a trip to Japan with a friend. Instead of the usual popular tourist spots, we wanted to find places that were genuinely beautiful but not widely known, the kind most tourists never hear about. The popular guides didn't give us that. We kept going to places we had found online, and then we spent a day with two locals we met there and realized there were much better places that you simply can't find on the internet.
What bothered me was how those guides work: they rank places by ratings, so whatever the most people liked and rated highly ends up on top. But not everyone enjoys the same things, and people's interests can get pretty niche. For example, I wanted an isolated spot with a great view where my friend and I could just sit and talk. No guide had a place like that, and when one did, it was a tourist spot, so it never had the atmosphere we were looking for. Everyone wants something different, and that was the core of my vision: people who live in a place share the spots they personally like, and others can easily find places that fit them, using location.
The events feature serves a similar purpose in a more organized way: people can create events or join them, and meet others with similar tastes.
I had young travelers in mind when I started building it. I never wanted Unroute to become hugely popular, and I still don't, because popularity can end up crowding and spoiling the very places people share.
App
In the app
- Shot 2 · Zoom-through on the city map: slow pinch out then in across a cluster boundary, then a pan · 6–8 s recording
Draft: 6–8 s recording, silent - Shot 5 · Place detail: photo carousel, rating, distance, directions, nearby rail
Draft: still - Shot 6 · Create flow: two photos, details, preview, publish, upload bar · 8–10 s recording
Draft: 8–10 s recording, silent
Map
Geohash viewport queries
The map loads only what the camera sees. Firestore can't do a two-dimensional range query, so every place and event carries a geohash that the server derives from its coordinates. The client turns the camera rectangle into at most 9 geohash ranges, and three workers fetch pages of 50 documents from them. A load stops at 300 visible items, 900 document reads or 36 page requests, and it says so: if work is left over, coverage is marked truncated and the map asks for a closer zoom. A 300 ms debounce and a cached rectangle with a 1.3x margin mean a small pan costs no reads. These are protective limits, not measured performance numbers.
Clusters
A grid anchored to the world
Pins merge into clusters on a grid anchored to the world, not the screen. Each pin falls into a cell of a Web Mercator grid whose level comes from the zoom, so a cell is always between 48 and 96 points wide, and panning never changes who is in which cluster; zooming in only splits them. A cluster is named cluster:level:column:row, so it keeps its identity while pins come and go. To stop a pinch that hovers on a level boundary from flipping every cluster back and forth, the previous level is kept while the exact level stays within 0.15 of it. Pins within 0.0001 degrees of each other can't be separated by zooming, so tapping them opens a callout instead.
Backend
33 Firebase Cloud Functions
The backend is 33 second-generation Cloud Functions on Node 22: 27 callables, 3 scheduled jobs and 3 Firestore triggers. The rules file lets the app read, and the only write it allows is removing an entry from your own blocked list, so every save, rating, RSVP, report, block and profile change is a callable that uses the Admin SDK in a transaction. A server can also validate what the rules language can't, like a post with six photos in three sizes each. The schedules sweep expired events, orphaned photos and stale account deletions, and the triggers clean up saved items when a place or event is deleted and keep usernames in sync. Account deletion is a leased, checkpointed job that survives crashes.
Media
Why Cloudflare R2 for photos
I store photos on Cloudflare R2 instead of Firebase Storage because it's cheaper for images: storage costs less per GB, and R2 doesn't charge egress fees for downloads. In a photo-heavy app every image is viewed far more often than it's uploaded, so that difference adds up.
Moderation
Fails closed
Publishing is gated behind server-side checks that fail closed. The app re-encodes each photo into three JPEGs without EXIF or GPS (480, 1280 and 1920 px) and uploads them straight to Cloudflare R2 with create-only presigned URLs. When the app asks the server to publish, it checks that every object exists, decodes each JPEG under a pixel and memory budget, and sends the text and each image variant to OpenAI's moderation API in separate requests. Only then does one transaction write the post. A flagged image erases the upload; if the moderation API is down, nothing is published and the app can retry the commit without uploading again. The 975 tests span Swift, Node.js and Firestore rules.
Events
The city's clock
An event's date belongs to the event's city, not to the phone. Each city in the catalog carries its time zone, and the server turns the typed date and time into an instant in that zone. A wall-clock time that doesn't exist because the clocks jumped forward is rejected rather than quietly moved; one that happens twice because they went back resolves to the earlier instant. Presets like today and this weekend are computed in the city's zone too. An event is deleted at the local midnight that starts the second calendar day after its day, found by an hourly sweep. The expiry is derived, never stored, and runs as a worker rather than a Firestore TTL. Swift and Node implement the same rules.
History
Timeline
I started writing Unroute in February 2025, and it took almost a year and a half to publish. It's the first app I built that works end to end. Along the way I changed the language, the framework and the UI many times: I started with React and TypeScript, then moved to a native Xcode project in Swift. Each change taught me something new, which is a big part of why it took that long. It's out now, and I'm still actively developing and updating it.
Story
Why I switched from React to Swift
With React I had to test and check everything separately for Android and iOS, which was a lot of work. I only had an iPhone, so testing on Android was hard. I only had a Windows machine at the time, so I tested on iOS through Expo. Once I got a Mac, things became much easier, and I went native and released on iOS. I'm not planning an Android version for now; that depends on how well the app does on iOS.
Business
Monetization
There's nothing in the app that makes money. I never asked myself how I would earn money from it while building it; I just wanted to solve a problem I had myself and help people who have the same problem.
Challenge
The hardest part
The challenge I least expected was the legal side. An app where anyone can freely post photos, locations and even events comes with a lot of legal obligations, much more than I had imagined: complying with Turkish law and taking on responsibility for the content users post.
Lessons
What I learned
Since it was my first app, it taught me a lot. It gave me my technical foundations and showed me how hard the work behind the scenes really is, beyond the surface-level knowledge I had before. The most concrete things I learned through it were React, Expo, Firebase, and what App Store Connect requires before an app can be published.
The most important lesson, though, wasn't technical. I used to think the app itself is what makes an app successful, but it turns out that advertising and marketing matter most. That wasn't on my mind at all when I launched; I thought it would succeed on its own once it was out.
All in all, Unroute is both my first app and the one that has taught me the most in this field.