Skip to content
Agencei
Demonstrative project

Field teams and service companies

Demo project: React Native mobile app with a Node.js API

This project is presented for demonstration purposes: it illustrates how we design and deliver, without corresponding to an identified client.

Context

This demo project illustrates our approach to cross-platform mobile development. It does not come from a client engagement: it is an application we maintain to show, on a concrete case, the technical choices we recommend.

The modelled case is an application for field teams (technicians, delivery drivers, surveyors) who receive jobs, fill in reports with photos and must be able to work in areas without network coverage.

The app is published on iOS and Android from a single code base, and a Node.js API centralises data and notifications.

Problem

Field applications often fail on three points: they do not work without a network, they lose entries when synchronisation conflicts occur, and every fix requires going back through the app stores.

Local storage, synchronisation and the update strategy therefore need to be designed from the start rather than bolted on afterwards.

Constraints

  • A single code base for iOS and Android, with native rendering and performance.
  • Full offline operation for browsing and data entry, with synchronisation as soon as the network returns.
  • Reliable push notifications for new jobs and schedule changes.
  • Fixes deployable without a new store submission when only the JavaScript code changes.
  • Reproducible, signed builds that do not depend on a developer's workstation.

Architecture

The app is built in React Native with Expo and TypeScript; navigation, camera and geolocation access go through Expo modules.

A local SQLite database stores jobs and reports; a synchronisation queue records changes made offline and replays them to the API.

The Node.js API (Fastify) exposes REST endpoints with token authentication; PostgreSQL, accessed through Prisma, stores the data with a version number on every record for conflict detection.

Push notifications are sent through the Expo notification service, triggered by the API when a job is created or modified.

EAS Build produces the iOS and Android binaries in the cloud, and EAS Update delivers JavaScript code updates directly to devices (OTA).

Solution

The app's data layer is designed around offline mode: all reads come from SQLite, and all writes are first recorded there with a locally generated identifier. A synchronisation module then sends the changes to the API, in order, with retries on failure.

Conflicts are detected on the API side thanks to the version carried by every record. The default rule keeps the most recent change, but some fields (a job's status, for example) apply explicit business rules, and unresolved conflicts are reported to the user.

Push notifications are used to signal an event and trigger a background synchronisation; they never carry sensitive data. Device tokens are managed by the API and invalidated at logout.

Builds are produced by EAS Build with separate profiles (development, staging, production) and OTA updates are published per channel, which makes it possible to test a fix on staging devices before rolling it out to everyone.

Outcome

  • The app remains usable without a network: browsing, data entry and photo capture work, and synchronisation resumes automatically.
  • Synchronisation conflicts are detected and handled according to explicit rules rather than silently overwritten.
  • JavaScript code fixes are delivered through OTA updates, without a new app store review.
  • iOS and Android binaries are built reproducibly in the cloud, with profiles and secrets separated per environment.
  • Push notifications are triggered by the API's business events and do not depend on manual sending.

Improvements achieved

  • Add differential synchronisation to reduce the volume exchanged on slow connections.
  • Encrypt the local SQLite database for use cases handling sensitive personal data.
  • Integrate automated end-to-end tests on simulators into the EAS pipeline.
  • Add a web dashboard for dispatchers, sharing the same API.
  • Support biometrics for unlocking the app.

Screenshots

Screenshots will be added once the project is published.

Tell us about your project

Describe your need in a few lines: we come back to you with a first analysis and the next steps.