04Case study
Parking Helper
Send your location on LINE and instantly see where there's a free space, what it costs and how long the drive is.

- 8TDX endpoints queried in parallel per city
- 2.5 kmsearch radius
- 5result cards per reply
- 10 / minwebhook rate limit per IP
The problem
Finding parking usually means hopping between a map app, a car-park app and government data to piece together where there's space, what it costs and how to get there. Parking Helper puts that inside LINE: send one location, get a ranked answer.
How it's used
1. Pick a mode
Type "car park" or "street parking" and the bot remembers which you want.
2. Share a location
Tap the quick reply to send your current location, or type an address or landmark.
3. Get the answer
Cards for the nearest 5 results with name, address, free spaces, pricing, driving distance and time, and one-tap Google Maps navigation.
Architecture
Key design decisions
Parallel, fault-tolerant queries per city
Reverse geocoding picks the city, then Promise.allSettled calls that city's TDX endpoints in parallel (car parks, facilities, live availability, rates; or road segments, availability, rates, charging hours) so one failing endpoint never sinks the rest.
De-duplicating across sources
TDX and Google Places results are merged, points within about 20 m are treated as the same place, and only those within 2.5 km are kept, sorted by distance.
Token caching
TDX uses OAuth client credentials; the access token is cached until 60 seconds before it expires.
Protecting API quotas
The webhook allows 10 requests per minute per IP. A lookup costs about 3 TDX calls and 5 Distance Matrix elements, which Google's free tier covers for thousands of users a day.
Degrade, don't fail
When TDX has no data the bot falls back to Taipei open data, and every reply carries a plain-text summary so results are readable even without cards.