Mincha Time
First version in about a monthA reminder app for prayer times. The user gets a notification before the relevant window closes wherever they happen to be, without setting anything up again each day. What you see from the outside is a notification arriving on time. What it takes is a send engine that fires on the right minute, every day, for every location.
- Prayer times come from the Hebcal zmanim API. Notifications go out through Firebase Cloud Functions, Firestore and FCM.
- There is no task queue. A function runs once a minute and checks whether a Firestore document exists for the current minute. Documents are keyed hour_minute, so 13:47 is the document 13_47. If it is not there, the run does nothing.
- Users are grouped by rounded latitude and longitude, so the zmanim API is called once per location per day instead of once per user. Each run also writes tomorrow's document for that group, so the schedule advances one day at a time instead of being precomputed.
- Two separate and independent ways to stop receiving: a permanent off switch and a same-day snooze. Both get checked before every send.