Engineering

Offline-first is a queue, not a slogan

12 November 2026 · Software by Design

A care worker documents a visit in a basement flat with no signal. A kiosk terminal keeps stamping while the site Wi-Fi is down. "Works offline" is easy to print on a feature list, what matters is exactly what happens to those records, and what can never happen to them.

The outbox, specified

When the network drops, our companion apps do not hold stamps "in memory" and hope for the best. Each pending stamp goes into an encrypted queue on the device, AES-GCM ciphertext in local storage, the key in the platform's secure store, capped at 32 entries so a broken connection cannot silently grow an unbounded backlog. The queue is first-in, first-out, and it drains when connectivity returns without the user doing anything.

Encryption at rest is the unglamorous part that matters: a stamped time is personal data. "It was only on the phone for an hour" is not an answer to a stolen device.

Why the server, not the phone, decides what counts

Replaying queued stamps is where offline features usually lie. A retry can arrive twice; two queued actions can reach the server out of order. So each stamp carries a client request id and the real timestamp, when it happened, not when it arrived. The server claims the request id before applying anything, which makes a duplicate retry a no-op instead of a double stamp. Same id but different content? That is a 409 conflict, not a silent overwrite. And compliance is evaluated against the moment the stamp happened, a queued clock-in at 07:02 counts at 07:02, inside the skew window the organisation configures (24 hours by default, hard ceiling 72).

The kiosk variant solves a harder version of the same problem: no personal login at the device. Badges are resolved from a bounded, encrypted NFC identity cache, capped at 500 entries, seven-day TTL, so a terminal outage does not turn into a queue at the door.

The limit we put on ourselves

Offline tolerance is a window, not a lifestyle. Stamps older than the configured skew stop replaying and surface for a person to resolve, because a week-old "clock-in" appearing out of nowhere is exactly how time records lose credibility. And when someone signs out with stamps still pending, the app says so, wait or discard, your choice, said plainly.

This is what "offline-first" means in our apps: not that the UI opens without a signal, but that the audit trail survives one. ArbeitszeitCheck mobile and terminal, and CareCheck, ship this today.