Offline-First Architecture: Why It's Non-Negotiable for West African Deployment
In markets where connectivity is unreliable, building offline-first isn't a nice-to-have — it's the difference between a tool that gets used and one that gathers dust. Here's our playbook.
In 2022, we deployed a health information system across 120 public health facilities in Ghana. Before we wrote a single line of code, we spent three days at facilities in the Brong-Ahafo region with our laptop, a mobile hotspot, and a test environment. What we found shaped every technical decision that followed.
The connectivity situation across many facilities was not intermittent — it was absent. Facilities in semi-urban areas might have 2G connectivity for two to four hours a day, depending on network load and weather. Facilities in rural catchment areas sometimes had no connectivity for days at a time. If our system required a live connection to function, it would fail the clinical staff who needed it most.
Offline-first is an architectural principle, not a feature. It means the application works completely and correctly without any network connection. When connectivity is available, it synchronizes — intelligently, efficiently, and without corrupting data. This is harder than it sounds, and most developers underestimate it.
The core technical challenge is conflict resolution. If a nurse in Accra and a nurse in Kumasi both update the same patient record while offline, and both subsequently sync, whose version wins? The naive answer — 'last write wins' — is medically dangerous. Our answer was a merge strategy that preserved all edits as distinct events, surfacing conflicts to a designated resolver rather than silently dropping data.
We chose IndexedDB as our local data store, with a custom sync engine that serialized operations as an append-only event log rather than state snapshots. This design meant that even a partial sync — if the connection dropped mid-transfer — left the database in a consistent state that could be cleanly resumed rather than rolled back.
Data compression was critical. A full patient record might contain scans, lab results, and clinical notes. Over a 2G connection with 50KB/s bandwidth, naive syncing would take hours. We implemented delta syncing — only transmitting what had changed since the last successful sync — and compressed payloads using gzip. Average sync payloads dropped by 85%.
The result was a system that worked everywhere, every time. Clinical staff adopted it quickly because it never failed them due to connectivity issues. Within six months of deployment, 96% of clinical interactions were documented digitally — a dramatic improvement from the paper-based baseline.
Our hard-won advice: if you're building for deployment in connectivity-constrained environments, start with offline-first as your primary design constraint, not an afterthought. Everything else — data models, sync protocols, UI patterns — flows from that foundational decision.
Chidinma Okafor
CTO
A member of the Parabolic Tech leadership team writing about technology, engineering, and building software for African organizations.
RELATED POSTS
What Building Software for African Governments Actually Teaches You
After delivering national-scale systems for public sector clients in Ghana and Nigeria, we've learned that government software has unique constraints — and unique rewards — that commercial projects rarely match.
Why Every Enterprise Client Needs a Design System Before They Think They Do
Design systems aren't just for big tech companies. For enterprises managing multiple products and teams, a design system is the difference between coherent software and digital chaos.
AI in African Fintech: The Practical Reality Beyond the Hype
Having deployed ML-based credit scoring for Nigerian banks, we share what actually works, what doesn't, and why AI in African finance looks different from what you read in tech media.
NEWSLETTER
Enjoyed this post?
Get our latest insights delivered to your inbox once a month.