Edge Mode active: data sealed locally
Platform concept · Offline architecture

Edge Mode.

Rail corridors are not WiFi cafés. Tunnels, cuttings, and remote stretches drop signal constantly. Edge Mode is ParallaxOS's offline-first architecture — every operation that matters in the field continues to work when the network is unavailable.

Brutalist by design. When connectivity drops, a full-width Safety Orange banner activates at the top of every screen: EDGE MODE ACTIVE: DATA SEALED LOCALLY. This is not a subtle icon. The user has the right to know loudly that they are operating offline.

The architecture

Offline-first with optimistic sync. The mobile and tablet apps run on WatermelonDB (a SQLite-backed reactive database for React Native). Every data write is local-first and always succeeds.

  1. All data writes go to local WatermelonDB first (always succeeds, no network round-trip).
  2. The sync engine pushes changes to the Supabase backend whenever connectivity is available.
  3. Conflict resolution: last-write-wins, with full audit-trail preservation (no silent overwrites — both versions are retained in the audit log).
  4. Every offline write is cryptographically sealed locally with SHA-256 to prevent tampering.
  5. The Edge Mode banner activates automatically when the network is unavailable.

What works offline

  • View all worker data, rosters, compliance records (synced before going offline)
  • Complete pre-start checklists (sealed locally, synced on reconnect)
  • Clock on / off with GPS stamp (stored locally with timestamp, synced on reconnect)
  • Capture photos and evidence (stored locally, synced on reconnect)
  • Complete D&A testing forms (sealed locally, chain-of-custody preserved)
  • View cached documents (pre-synced per job — SWMS, network rules, induction packs)
  • Pre-Start AI agent — Phi-3 Mini on-device model handles basic queries

What requires connectivity

  • Sync data to the server (handled in background when signal returns)
  • Send messages to other users
  • Push to Avetta API
  • RIW real-time verification
  • Full Claude API queries (the Pre-Start agent's on-device fallback covers basic cases)

The cryptographic seal

Every record captured offline — pre-start, timesheet, D&A test, incident, photo — is hashed with SHA-256 at the moment of capture, locally. The hash includes:

// SHA-256 input for an offline pre-start submission
{
  "worker_id": "WK-00471",
  "shift_id": "SH-2026-02-14-J001-001",
  "timestamp_iso": "2026-02-14T21:43:18+11:00",
  "gps": { "lat": -32.2569, "lng": 150.8893, "acc": 4.5 },
  "answers": [ .../* checklist answers */ ],
  "device_id": "ios-9F2A...8C71",
  "app_version": "1.4.2"
}

The resulting hash and the device's local secret-keyed signature are stored alongside the record. On sync, the server verifies the signature against the device's registered public key. Tampered records are rejected and flagged in the audit log.

Sync conflict resolution

When two devices update the same record while offline (e.g. two supervisors approve a timesheet), conflict resolution is last-write-wins by server-received timestamp. Both versions are preserved in the audit log so an ONRSR auditor or HSEQ manager can see exactly what happened.

Compliance gates run on the server-side at sync time as well as on-device — if a record sealed offline would breach a rule when synced, the record is accepted (the field action already happened) but a flag is raised for supervisor review.

The banner

The Edge Mode banner is a deliberate brutalist design choice. It is:

  • Full-width, top of screen, above all other UI
  • Safety Orange (#FF6B00) on white text, all caps, monospace font
  • Always visible while offline — cannot be dismissed
  • Replaced with a green "Synced" toast for 3 seconds when connectivity returns and queue drains

This is intentional: a worker recording a D&A test on a paper form in 2024 knew the test was on paper. A worker recording the same test in an app should know with equal certainty that the data is locally sealed and not yet synced.

Engineering test — tunnel scenarios

During engineering test, a simulated worker completed a pre-start, clocked on, performed an 8-hour shift, recorded an incident, and clocked off — all while in a 3km cutting with no LTE signal. Six minutes after exiting the cutting, the device synced 19 records to the backend. Server-side validation accepted all 19; the SHA-256 signatures matched the device key. Total data lost: zero.

Edge Mode is not a feature flag — it is the default architecture. The platform behaves the same way whether you are in HQ or two kilometres into a tunnel.