Building an Offline-First App With React Native and Firebase
When the power goes out on a schedule, a generator runs every day — and it comes with a maintenance schedule: oil, filters and spark plugs, all by engine hours. Most portable generators have no hour meter, so I built Generator Tracker: a one-tap Start/Stop logbook with fuel tracking, maintenance reminders and monthly charts. The code is open source (MIT): https://github.com/yuri-val/GeneratorTracker
This post isn't about the app itself, but about the part that turned out to be the most interesting engineering problem: sync for an app people use precisely when there's no connection.
Stack
- Expo SDK 57, React Native 0.86, React 19.2, TypeScript.
- AsyncStorage as the local store; Firebase Auth + Firestore for optional sync.
- iOS: native SwiftUI forms via @expo/ui and system tabs with Liquid Glass. Android: Material 3. Web stays on React Native Paper.
Principle 1: the phone is the source of truth
During a blackout mobile internet...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE