Aube: a wake-up alarm that leaves the ringing to the iPhone
A personal iPhone alarm and sleep tracker. The web app no longer rings by itself: it drives the iOS Clock through Shortcuts, logs every event of the night offline, and turns the nights into trends. Built in October 2026: architecture, Cloudflare Worker and D1 database, Vue 3 PWA, and step-by-step guides for the Shortcuts that cannot be generated by code.
View the code on GitHub →The problem
The first version of Aube was a classic web alarm: the page played the sound itself. On iOS, that cannot be relied on. As soon as the screen locks, Safari suspends the page and the alarm never rings. A web app cannot schedule a system alarm either: there is no API for it. Keeping the screen on all night only moves the problem.
The solution
Give each part of the system the one job it does reliably, and keep anything critical out of the web page. - The iOS Clock rings, including in airplane mode. A Shortcut sets a dedicated alarm each evening instead of adding a new one every night. - Shortcuts carry the logic: bedtime, alarm set, snoozes, alarm stopped and getting up are appended to a local file, one line per event, with an ISO timestamp and its time zone. Two automations log snoozes and stops without any network. - In the morning, a Shortcut turns airplane mode off, waits for the network, sends the file to a Cloudflare Worker, and deletes it only once the Worker confirms. Any failure keeps the file. - The Worker and its D1 database are the source of truth. Sending the same file twice creates no duplicates, unreadable lines are kept aside instead of lost, and a single rule decides which night an event belongs to. - The Vue 3 PWA only triggers the Shortcuts and shows the trends: bedtime, wake-up and getting-up times, time in bed, snoozes, and a short morning check-in. It opens offline, in airplane mode, from its service worker.
What it shows
Accepting the limits of the platform instead of fighting them. Before writing code, I checked which Shortcuts actions actually exist, and the design follows from what they allow. The result is a system where the web app can fail without consequence: the alarm still rings, and no night is lost.



