Most new business software is built cloud-first. The browser talks to an API, the API talks to a database in a data centre, and the whole thing assumes a fast, always-on connection.
That assumption breaks in a lot of the world. In Pakistan, scheduled power cuts (load-shedding) take the office router down several times a day. Mobile data runs out. A shop at the edge of a city may have one bar of signal at the counter. When a cloud ERP can't reach its server, it can't raise an invoice, and the business either stops selling or goes back to paper and types everything in again at night.
We build RBTERP, an ERP and accounting system for small and mid-sized businesses, and we made it offline-first for exactly this reason. This article is about what "offline-first" means for business software, the trade-offs, and the design rules we think matter. It's written for developers, but no specific stack is required.
What offline-first means here
Offline-first is not "works offline sometimes". It means the local copy is the source of truth for daily work, and the network is an optional extra.
In RBTERP's case that's concrete: the application is installed on a Windows computer in the office and keeps its database file on that computer. Sales, purchasing, inventory, bank and cash, payroll and the financial reports all run locally. Nothing has to make a round trip to a remote server before an invoice is saved.
A useful test, and the one we tell buyers to run in any demo: unplug the router, then raise an invoice, receive stock and print a trial balance. If any of those fail, the app is cloud-first with an offline cache, not offline-first.
Why it matters more for accounting than for most apps
Some apps can tolerate going read-only for a while. Accounting can't:
- Transactions are continuous. A counter makes sales all day. A queue of "pending" invoices that will sync "later" is a queue of things that can go wrong.
- Numbers must balance at every moment. Double-entry bookkeeping means every posting has equal debits and credits. A half-synced state where the stock moved but the ledger entry didn't is a real error, not a cosmetic one.
- Users are not technical. A shopkeeper won't resolve a sync conflict dialog. They need the screen to just work.
So for this domain we prefer one authoritative local database per business over many devices with eventual consistency.
Offline does not mean single-user
The usual objection is that local software means one person on one PC. It doesn't have to.
The computer that holds the data can serve it over the office network, so other computers and tablets in the same building sign in at the same time. Users, roles and permissions still apply, and an audit trail records who did what. (Details: multi-user access on your office network.)
Architecturally this is a classic client-server setup on a LAN instead of the internet. You keep a single source of truth, so there are no merge conflicts, and you lose very little when the internet goes down, because the internet was never in the path.
Where the network still belongs
Offline-first doesn't mean never online. Some features talk to the outside world by definition:
- sending an email (a scheduled report, an invoice to a customer)
- submitting a digital invoice to the tax authority
- downloading a software update
The design rule we follow: those features need a connection only while they run, and nothing else waits for them. If the email server is unreachable, the invoice is still saved and printable; the send can be retried. Network calls sit at the edges, never in the middle of posting a transaction.
The hard part: data safety moves to the user
In a cloud product, the vendor handles backups. Offline-first hands that responsibility to the customer, so the software has to make it easy. Three habits cover most of it, and the product should push users toward all three:
- Back up every day, with one copy off-site. Even a USB drive taken home is a big improvement.
- Test a restore occasionally. An untested backup is a hope, not a backup.
- Protect the machine. A Windows password, current antivirus, and a UPS so a power cut doesn't interrupt a write.
From a developer's point of view, that means:
- a one-click backup that produces a single, self-contained file
- a restore path a non-technical user can follow
- writes that are safe against sudden power loss (transactions, not half-written files)
Trade-offs, honestly
Offline-first is not free. You give up some things a cloud product does well:
| You gain | You give up |
|---|---|
| Works through power and internet cuts | Easy access from anywhere, on any device |
| Fast local screens, no server round trip | Vendor-managed backups |
| Data stays on the customer's premises | Instant updates rolled out to everyone at once |
| No mobile data used for daily work | Simple multi-city setups |
For a business with staff in many cities on their own devices, and nobody to look after a computer, cloud may well be the better fit. For a trader, distributor or factory in a place where the lights go out, offline-first is the difference between selling and not selling.
Takeaways for developers
- Decide where the source of truth lives before anything else. For transactional, must-balance data, one authoritative local database beats many eventually-consistent replicas.
- Keep network calls at the edges (email, tax submission, updates), retryable, and never blocking a save.
- If you push data ownership to users, build backup and restore into the product, not into a help article.
- Test the way your users live: with the router unplugged.
If you want to see how this plays out in practice, the full guide is here: Offline ERP and accounting software.
I'm Talha Ansari, founder of RBTERP. Questions about offline-first design are welcome in the comments.
Top comments (0)