Offline-first mobile · 2024–2026

Intervento App

A Flutter app for field operations that works without a network and synchronises reliably afterwards.

Back to all projects
Role
Architecture, app development, sync design
Timeframe
2024–2026
Context
Responsible for the app and sync; embedded in the Intervento team
Technologies
FlutterDartBlocget_itsqfliteSQLiteRESTSocket.IOFirebaseMBTilesNFC / BLEWhisperHeimdallSentryOffline-First

In the field, the network is often gone. Intervento App still has to work: capture data locally, keep state and write it back consistently later. I designed both the app and the sync architecture from the ground up.

01

Context

Response teams work in basements, tunnels, vehicles and peripheral areas. An app that requires connectivity is unusable there.

At the same time, no data may be lost or duplicated when several devices work on the same incident.

02

My contribution

  • Built the Flutter app and its architecture: Bloc, get_it, sqflite and Firebase.
  • Designed the local data model with 87 SQLite tables and the field-level sync outbox.
  • Implemented the 21-dataset initial snapshot, delta pull, idempotent push and multi-device fan-out.
  • Built upload and download queues for files and media with dedicated retry budgets.
  • Hardened socket repair, token refresh and the 30-day offline rule for field use.
  • Added 235 tests covering retry, reconnect and SQLite failure paths.
  • Extended the app beyond offline sync: offline maps (MBTiles/vector tiles), on-device Whisper GGML, NFC/BLE with AES encryption, respiratory monitoring, QR guest upload, dynamic forms and signatures, and four languages (DE/EN/FR/IT).
03

Architecture & delivery

  • Flutter and Dart with Bloc for state, get_it for dependency injection and sqflite as the local SQLite database.
  • Local writes create a field-level diff in the sync log; the app sends it FIFO and idempotently to the mobile REST API.
  • The server remains the source of truth: it applies changes transactionally and fans them out to other devices and collaborating organisations.
  • The app pulls deltas in order, applies them in one SQLite transaction and keeps the local state for the next offline operation.
  • Files and media use separate upload and download queues; conflicts are resolved field by field with last-write-wins.
System design Offline first, consistent afterwards
On device
Server
Flutter App Bloc · get_it
SQLite 87 tables · WAL
Sync outbox field-level · FIFO
REST API push · pull · delta
Sync journal per-device fan-out
PostgreSQL source of truth
File queues upload · download
S3 / MinIO files · media
I/O Mutations Push Uploads Retry budget

The app writes locally to SQLite, puts field-level changes into the outbox and sends them FIFO to the REST API. The server applies them idempotently through the sync journal.

Design decisions
  • Field-level outbox instead of whole records: smaller deltas, fewer conflicts.
  • Retry budgets, 4xx drops and a poison log prevent blocked synchronisation.
  • After 30 days offline the app requires a fresh sign-in.

Scroll horizontally to see the full design.

04

The hard parts

01

Conflicts as the normal case

Several devices can change the same record. Field-level diffs merge different edits; for the same column, the last processed change deliberately wins. That last-write-wins decision keeps the system simple without pretending to have a heavy CRDT layer.

02

Idempotency and ordering

Retried requests after timeouts must not create duplicates, and dependent changes must arrive in the right order. The outbox therefore works FIFO, the server upserts idempotently and the app coalesces concurrent sync calls.

03

Testability without a network

Offline behaviour is hard to verify by hand. Retry budgets, rejected 4xx responses, poison logs, SQLite deadlocks and reconnect paths are reproduced in 235 tests with in-memory databases and stub APIs.

05

Outcome

  • An app that remains usable in the field without connectivity and captures data locally.
  • Synchronisation that stays consistent through drops, retries and parallel devices.
  • A durable foundation for further mobile field features.

Contact

Let's talk about the next role.

I am looking for a position where I can take responsibility for systems and teams as a tech lead, software architect or senior full-stack engineer. Ideally where reliability, data and real-world workflows meet.