Local-first writes
Every edit is saved to SQLite and queued before any network call. A crash or a dead zone never loses work.
FieldSync lets technicians create inspections, checklists and photo reports with no connection, then synchronises them without silently overwriting a colleague's work.
Features
Basements, plants, rural sites. FieldSync assumes failure and is designed so failure is never visible in your data.
Every edit is saved to SQLite and queued before any network call. A crash or a dead zone never loses work.
An ordered outbox retries automatically on reconnect, with idempotent operations so replays are harmless.
Colleagues editing different fields merge automatically. Only real collisions need a human.
Conflicting edits are parked, never applied silently. Choose to keep yours or theirs.
Uploads run in their own queue. A rejected photo is parked with Retry or Remove.
An append-only log records author, version and whether a change was auto-merged.
How it works
Exactly-once delivery is impossible over an unreliable network, so every operation carries a UUID and the server makes replays harmless.
Each edit becomes an operation with a stable UUID, stored in the on-device outbox before anything touches the network.
The server locks the record, merges inside a transaction, logs the change and remembers the operation id.
Disjoint fields merge. Identical values are accepted. Different values become a conflict for the user to decide.
Lost responses are fine: replaying an operation returns the original result instead of applying it twice.
Conflicts
When two users change the same field while offline, FieldSync shows both versions side by side instead of picking a winner.
“Valve leaking, replace seal”
“Valve OK after tightening”
Stack and quality
| Mobile | React Native (Expo), TypeScript, SQLite, light and dark themes, Android APK and web build |
|---|---|
| API | NestJS, PostgreSQL, transactional merge with row locks, idempotency ledger |
| Security | Bearer token, validated inputs, verified photo content, non-root container, fail-fast production config |
| Quality | Real-PostgreSQL end-to-end tests, in-process sync simulations, CI, lint and format checks |
# Run the whole stack and watch a conflict happen
docker compose up -d --build
./demo/conflict-demo.sh
cd mobile && npx expo start
Architecture, API, security model and honest limitations are all in the repository.