Prototypes Prototype docsP11 · Docs and assistant
Offline inspections (P8)
DocsPage 9 of 30

Offline inspections (P8)

A checklist with photos that works with no network and syncs when the network comes back.

Working offline

A service worker keeps the app on the device, so it opens with no network. With a network each file is fetched fresh and the copy is updated; without one the copy is used.

Changes and the queue

Every edit is a field change with a time, stored on the device at once and put in a queue. Photos are shrunk on the device to 960 pixels. Each field has its own pause while typing, so typing in the next field never drops the last one.

Sync

When the network is there, the queue is sent. The server keeps every change and answers with the changes from other devices since the last sync. For each field the change with the newest time wins, on the server and on every device, so an edit made offline is kept unless someone changed the same field later.

Previous: Whistleblower channel (P7). Next: Booking (P9).

How Prototype docs is built

The pages are written in Markdown and built into these pages and an index of 154 sections. The assistant answers from the index, and every answer names the sections it was taken from.