Building for offline: how UTI-Diag handles zero-connectivity clinics
A quick tour of the architectural choices behind a tablet app that has to work fully offline, then sync when it finds a network.
Most healthcare software assumes there's a network. When the network drops, the app either shows an error or quietly loses your data. For a clinical officer collecting samples in a rural clinic in Senegal, neither is acceptable.
UTI-Diag was designed offline-first from the beginning. Here's how that actually plays out in the tablet build.
Local-first data model
Every action a clinical officer takes — enrolling a patient, scanning a pack, logging a Capitainer DUS result — writes to a local store on the tablet first. The UI shows the action as complete immediately. There's no spinner, no "pending sync" state that leaks into the flow.
Behind the scenes, a background worker watches the connection state. When a network reappears, it walks the queue and syncs everything in order to the central sample registry. Conflicts (rare, but possible if two techs edited the same case) are surfaced as a review task the next time someone opens the case, not as a modal that blocks work.
The "no orange dot" rule
Early prototypes had a small connectivity indicator in the corner — green for online, orange for offline, red for last-sync-failed. Field techs hated it. It made every screen feel like a system status page.
We removed it. The app now assumes offline is the default and promises the work is safe. The only time we show a network state is if a sync has been failing repeatedly for more than 24 hours, in which case a discreet banner surfaces on the home screen.
What syncs, and what doesn't
Nothing streams live. All sync happens in batches, triggered either by:
- Manual "sync now" from the settings menu (rarely used)
- App backgrounding, after work hours (most common)
- Fixed time-of-day check-in (default: 20:00 local time)
This is a deliberate choice. Continuous sync eats battery, and at these clinics battery is a harder constraint than bandwidth.
Storage limits
Tablet storage is finite. Once a patient case has been synced and seven days have passed without a follow-up, the case's images and raw scan data get evicted from the tablet — the case metadata stays, but the bulk data lives on the server only. If the tech needs to re-open an old case (rare), the app fetches it from the server if there's a connection, or shows a "requires connectivity" note.
The unlock
Offline-first isn't a feature. It's a permission slip. When the tech knows the app will handle the network — no matter what — they can put their whole attention on the patient in front of them. That's what we're actually building for.
New posts, in your inbox
A short email every two to three weeks. Product notes, regulatory context, field observations. Unsubscribe any time.