The most important architectural decision we make at Bitosoft is not which framework to use or which cloud provider to deploy to. It is: what happens when the internet goes down?
In Masindi, in Gulu, in a rural health centre outside Mbale — the answer to that question determines whether software is useful or just an expensive frustration.
The Offline-First Principle
Offline-first does not mean "works without internet as a backup." It means internet is treated as an enhancement, not a requirement. The application is designed from the ground up to store data locally, operate fully, and then synchronise with a server when connectivity becomes available.
This is a fundamentally different design philosophy from typical web applications.
How We Implement It
Local Storage First
Every write operation goes to local storage before it goes anywhere else. On mobile, this means SQLite on the device. On web apps, we use IndexedDB with a service worker.
// Write locally first
await localDB.save('flock_record', data);
// Queue for sync — don't wait for it
syncQueue.push({ table: 'flock_record', record: data });
Sync Queue Architecture
Changes accumulate in a sync queue. When connectivity is detected, the queue flushes to the server. We handle conflicts with a "last write wins" approach for most fields, and with manual resolution prompts for financial records.
Status Indicators
Users always know their connectivity state. A subtle indicator — a coloured dot in the corner — shows:
- 🟢 Online and synced
- 🟡 Online, syncing...
- 🔴 Offline — working locally
The PWA Approach
For our web-based products, we use Progressive Web App (PWA) technology. Users can install the app to their home screen, and a service worker caches all assets and API responses.
The result: a web app that loads in under a second even with zero connectivity.
Lessons from the Field
After deploying offline-first software across Uganda, we have learned:
- Users adapt their behaviour — they learn to check sync status before shutting down; make this visible and easy
- Conflict resolution is hard — keep business rules simple enough that conflicts are rare
- Battery matters as much as connectivity — background sync should be gentle on battery; aggressive sync kills adoption
The Bigger Picture
Offline-first is not just a technical choice — it is a statement about whose reality your software is built for. We believe technology should work where people actually live, not where infrastructure planners hope they will eventually live.
That principle shapes everything we build.
Questions about offline-first architecture? Reach out to our engineering team.
Leave a Comment