Technical · 6 of 8

Field capture, offline, and location proof

A tablet on site queues what it captures, replays it when it has signal, and the same database rules apply when it lands.

The queue

The field app holds captured actions — satisfy a step, clock in or out, raise or close a deficiency — in an IndexedDB queue on the device, each with a client-generated UUID that doubles as its idempotency key. When the device has a connection the queue replays in order; a refusal from the database (a reading out of range, a step already satisfied) is mapped to plain English and shown against the item rather than silently dropped. Photographs upload to storage first and the record references the stored path.

Location proof

Where a project turns it on, clock-ins and evidence for restricted equipment carry the device's position, and the server recomputes the distance to the site's geofence — the client never asserts 'I was there', it sends coordinates and the database decides. The threshold is set per organization.

QR codes are doorways
Each asset and location has a QR code that resolves to its record; scanning is rate-limited and logged as an event.
Signatures
A signature step stores a signature certificate — who, when, what was signed — not a picture alone.
Nothing bypasses the gate
A queued action replays through the same server action as a live one. There is no offline-only path.
Where to verify
  • · src/lib/field-queue-core.ts and test/field-queue.test.mjs
  • · db/034 (proximity), db/037 (offline clock)
  • · test/location-proof.test.mjs, test/geo-attendance.test.mjs

File names refer to the codebase. A customer under agreement can be walked through any of them.