I'm an 11th grader in Korea, and for the past year I've been building OWN SHARK on my own: an assistant where you say "somewhere open right now that sells painkillers" and it answers with places that are open now, ranked by real walking time.
Here's how it works under the hood, and the bugs that cost me the most time.
The problem
Map apps answer "what's near me". At 11pm I needed "what's open, and how many minutes on foot". The closest pharmacy on the map was closed; the next one had shut down months ago.
Stack
- FastAPI (Python 3.13) for the API
- SQLite with an R*Tree index for "places within N metres" queries
- Valhalla + OSRM, self-hosted, for real pedestrian routes
- Capacitor Android app (a WebView over the API)
- One CPU pod on RunPod runs all of it: API, Valhalla and OSRM in a single container
Ranking by walking time, not distance
- The R*Tree pulls candidates in a 1.5 km box. If nothing is open there, it widens to 3 km, then 5 km, and the reply says that it widened.
- Shops that are closed or shut down get filtered out (more on that below).
- The survivors go to the routing engine for actual walking minutes, and the list is sorted by that.
Straight-line distance is misleading next to rivers, rail lines and big apartment blocks. A shop 300 m away can be a 12-minute walk.
"Open now" is harder than it looks
Korean public data is great but patchy. Lots of places have no opening hours at all. So the rule is simple: if we don't have the hours, the app never says "open". It says the hours aren't confirmed and suggests calling first.
Shops that vanish from the weekly government business list aren't deleted. They're marked closed with a gone_since date, so other tables that reference them don't break.
The 255 m bug
Seoul's licensing datasets give coordinates in a Korean TM projection. I read them as EPSG:2097, and every vet clinic landed about 255 m from where it really was. Close enough to look right on a map, wrong enough to send someone down the wrong street. The correct CRS for that data is EPSG:5174. Now it's pinned in code.
Making the AI say "I don't know"
This was the hardest part. Every reply goes through one exit function that checks for claims we can't back up: "open" without hours, a place name that isn't in our data, and so on. If the bot can't find something, it says "I couldn't find it" instead of inventing a similar-sounding place.
Anything involving money (payments, bookings, cancellations) stops at a screen with the details filled in. The user presses the last button.
Where it is now
Pre-launch, covering Seoul and Gyeonggi. I'd love feedback from other devs:
- Would you trust an assistant more if it often says "not confirmed"?
- Any tips for keeping self-hosted Valhalla + OSRM light on one CPU box?
Waitlist (the page is in Korean; 1 month free at launch): https://kqts5p68vrcer3-8000.proxy.runpod.net/pre?src=devto
Top comments (0)