← ALL_LOGS

Offline-first architecture for hotel staff apps

Hotel wifi is not like office wifi. It’s spread across hundreds of rooms, back-of-house corridors, laundry facilities, and stairwells with varying signal quality in each. Staff tools used in these environments need to work when the network doesn’t.

Most hotel apps are built as if they’re running in a data centre. They make a network request, wait for a response, and display the result. When the network is slow or absent, they show a spinner. When the spinner times out, they show an error. The person holding the phone is standing in a linen closet on floor 14 with a cart full of towels.

The architecture that works

The right mental model is: the device is the source of truth, the server is the sync target.

Every operation updating a room status, marking a task complete, logging a maintenance issue writes to a local store first. The operation succeeds immediately, from the user’s perspective. A background sync layer then propagates those writes to the server when connectivity allows.

This means the app is always responsive. The network is an implementation detail, not a dependency.

The local store

For React Native, expo-sqlite gives you a real SQLite database on-device. It’s fast, it’s transactional, and it handles the data volumes a housekeeping operation produces without breaking a sweat.

The schema mirrors your server schema closely enough to make sync straightforward, but doesn’t need to be identical. Local tables can carry extra metadata sync status, conflict flags, timestamps that the server doesn’t need to store.

The sync layer

The sync layer has two jobs: pushing local mutations to the server, and pulling server updates to the device.

Push is simpler: maintain a queue of unsynchronised mutations, process them in order when connectivity returns, retry with exponential backoff on failure.

Pull is where it gets interesting. You need to decide: does the device get a full copy of the dataset, or a scoped copy (just today’s assignments, just this floor)? For a housekeeping app, a scoped pull makes sense a floor supervisor doesn’t need the entire property’s room inventory on their phone.

Conflict resolution

When two devices modify the same record while offline, you have a conflict. The simplest resolution strategy that works in practice: last-write-wins, with a conflict log that a supervisor can review.

This is not theoretically perfect. But in a housekeeping context, conflicts are rare (two people are unlikely to update the same room at exactly the same time), and when they occur, a human reviewing the log and correcting the record is the right outcome anyway.

What most hotel apps get wrong

They treat offline as an edge case to handle after launch. Retrofitting offline support into an app designed around network requests is painful and usually incomplete.

Design for offline from day one. Make network connectivity an enhancement, not a requirement. Your users will be in linen closets on floor 14.