Architecture decision
Why "just call the API once" was not enough.
On paper, an alert bot sounds simple. Call API, send message, done. Then real life comes in wearing slippers and says: duplicate alerts, missing coordinates, API timeouts, region boundary issues, Telegram failures and state tracking. So the system had to be boring in the best way: predictable, defensive and easy to monitor.
The build avoids unnecessary dependency weight and keeps the moving parts understandable. It uses concurrent scanning to reduce delay, a local state store for deduplication and retry metadata, and operational checks so we can see whether the worker is still healthy.
10-region Singapore scan grid
60-second polling cycle
Singapore-only filtering
7-day duplicate prevention
Telegram retry handling
Monitor status command
Waze location link
Dependency-free PHP implementation
Alert format
Useful, not noisy.
The Telegram message focuses on what matters: incident type, location, time and a map link for fast action.
Recent 24-hour snapshot
419 alerts delivered
Delivery quality
0 Telegram failures recorded