Skip to content

v1.0.0 — FieldSync Offline-First Reference System

Latest

Choose a tag to compare

@Dieu-Merci-Ndenga Dieu-Merci-Ndenga released this 03 Nov 14:39
Immutable release. Only release title and notes can be modified.

🚀 Overview

Initial reference release of FieldSync, an offline-first inspection and operational platform engineered for unreliable/intermittent network environments.

This release includes the full core engine: local-first write architecture, continuous outbox queuing, guaranteed idempotent sync, field-level three-way merge algorithms, and explicit conflict resolution workflows.


Key Technical Capabilities

🔄 Sync Engine & Backend Reliability

  • Write-Ahead Local Outbox: Guaranteed local durability via SQLite prior to any network transport.
  • Idempotency Ledger: Payload tracking (opId) paired with PostgreSQL transaction logs to guarantee safe retry handling (at-least-once delivery mechanics).
  • Field-Level 3-Way Merge: Server-side deterministic conflict resolution logic (disjoint field auto-merge, identical value acceptance).
  • Conflict Isolation & Resolution: Parking engine for colliding field mutations with explicit user-facing resolution paths (Keep Mine / Keep Theirs).
  • Decoupled Binary Asset Pipeline: Isolated, non-blocking media queue with content-type validation and independent state recovery for photo payloads.
  • Cursor-Based Pull Engine: Incremental state synchronization tracking delta changes via backend transaction cursors.

📱 Mobile Architecture & UX

  • Cross-Platform Client (Expo / React Native): Native SQLite integration with fallback local storage adapters for web testing.
  • Resilient UI State Management: Real-time visual feedback for per-record sync status (synced, pending, conflict) and system-wide connectivity banners.
  • Soft Deletes & Tombstones: Complete data lifecycle handling with soft-delete tombstones and instant local undo operations.

🛠️ Included Deliverables

  • backend/: Fully tested NestJS REST API with PostgreSQL integration & end-to-end e2e suite.
  • mobile/: Expo React Native application targeting SDK 58 (Android APK build-ready via EAS).
  • demo/: Executable CLI integration script (demo/conflict-demo.sh) reproducing local offline queues, automatic merges, and field collisions.
  • site/: Zero-dependency static project showcase site deployment configuration (render.yaml).

⚠️ Known Limitations & Scope Bounds

  • Identity: Authenticated via single shared API_TOKEN + x-user-id header (no granular RBAC/multi-tenant auth layer).
  • Sync Engine: Single-operation resolution scope; character-level diffing for long-text fields is out of scope.
  • Database: Schema management utilizes ORM auto-synchronization (TypeORM) rather than migration scripts.

🧪 Verification & E2E Testing

Run the automated test suite against a live PostgreSQL instance:

docker compose up -d db
npm run build
npm run test:e2e
npm test --prefix mobile