Edmir Soares
Edmir Soares

[MOBILE_01] · Personal project · API sync on the roadmap

Route Monitoring

Real-time route tracking with background location and offline-first sync.

  • React Native
  • Expo
  • SQLite
  • Drizzle
  • Task Manager
Source code on GitHub (opens in a new tab)
Route Monitoring screens in dark mode with orange accents: live tracking, sync status and settings.

[01] Problem

Record a route continuously, with the screen off, the app minimized or no signal, without losing points.

[02] Solution

  • Two location sources: watchPositionAsync in the foreground and a TaskManager background task registered before any screen renders.
  • Every point is saved to SQLite (Drizzle ORM, Zod at the insert boundary) with a status: UNSENT to PENDING to SENT, back to UNSENT on failure.
  • Sync on demand or every 60 s while tracking.
  • Leaflet and OpenStreetMap inside a WebView: no map API keys or billing. The map updates through injected messages, without reloading.
  • Feature-Sliced Design: code organized by domain, not by file type.

[03] Result

  • Recording continues with the screen off or the app in the background.
  • The local sync queue is done; integration with a server API is the next step.

[04] Architecture

  1. GPS
  2. TaskManager
  3. SQLite · Drizzle
  4. Sync queue
  5. REST API (roadmap)