Offline-first maintenance tracking with Flutter, Drift and Laravel
September 8, 2026 · 1 دقائق قراءة
MTracker helps industrial teams track machine fleets: running hours, service intervals, service logs and history. Much of that work happens on the shop floor, where the connection is unreliable, so the app is offline-first.
The phone owns a real database
Every device keeps a local SQLite database through Drift. Screens read from and write to that database, never straight to the network, so the app is fast and fully usable with no signal.
Sync is a background job
A Laravel API is the shared source of truth for the company. Local changes are queued and pushed when a connection is available, and remote changes are pulled back in. The UI reacts to the local database, so synced data appears without any special handling.
Roles and companies
A company can have several users with admin and user roles. Permissions are enforced on the server; the app reflects them in the UI so people only see actions they can take.
Lessons
- Decide early how conflicts resolve when two people edit the same record offline.
- Show sync state honestly: saved on this device and synced are different things.
- Keep migrations for the local schema versioned and tested, because every install carries its own database.