Plan: Mobile & Offline-Capable Client Application

On this page

Status

Planning — blocked on ADR-009 decision.

Context

Caseworkers need a client application that works on phones, laptops, and tablets in environments with unreliable connectivity (rural home visits, courthouses, vehicles). The application must provide offline access to assigned caseload data with the ability to record contacts, update assessments, and capture information during visits, syncing when connectivity returns.

See ADR-009: Mobile & Offline-Capable Client Application for the full architecture decision, options analysis, and recommendation.

Scope

  • Tauri 2.0 application (desktop + mobile) sharing code with CRAIG Rust workspace crates

  • SQLCipher encrypted local database for on-device storage

  • Bidirectional sync engine with field-level conflict resolution

  • Offline authentication with cached OIDC tokens and configurable hard expiry

  • Working set scoped to caseworker’s assigned cases (not full database replica)

Phases (Preliminary)

Phase 1: Foundation

  • Tauri workspace setup (craig-client crate)

  • SQLCipher local database with schema mirroring synced tables

  • Authentication flow (Keycloak OIDC via system browser, token caching)

  • Sync engine core (craig-sync crate): pull-only for assigned cases

  • Desktop builds (Windows, macOS) — validate on caseworker laptops

Phase 2: Offline Write

  • Contact notes: create/edit offline, queue for sync

  • Safety assessments: create/edit offline with mandatory sync flag

  • Case plan tasks: update status offline

  • Conflict detection and resolution UI (side-by-side diff)

  • Push sync on reconnect with retry queue

Phase 3: Mobile

  • iOS and Android builds via Tauri mobile

  • Biometric unlock (fingerprint/face)

  • Camera integration for document capture

  • Push notifications for case assignments and alerts (when online)

  • App store distribution pipeline

Phase 4: Polish

  • Attachment caching (view previously-opened documents offline)

  • Bandwidth-aware sync (defer large payloads on metered connections)

  • Admin dashboard for device management and remote wipe

  • Sync health monitoring and alerting

Prerequisites

  • ADR-009 decision accepted

  • Sync endpoints added to craig-cases, craig-placement (server-side)

  • version column added to synced tables

  • Tauri build infrastructure in CI

GitLab

  • Epic: TBD (create after ADR-009 accepted)

  • Labels: feat, craig-client, infrastructure

  • Priority: TBD — depends on agency deployment timeline

Edit this page · latest