Sophis is a Flutter nutrition tracker with local-first storage (SQLite + SharedPreferences).
- Install dependencies:
flutter pub get - Run app:
flutter run - Analyze:
flutter analyze - Run tests:
flutter test
Sophis now relies on native OS backup/restore to recover local data after uninstall/reinstall.
- App database (SQLite)
- SharedPreferences data
- App files in the backed-up app sandbox
- Secure storage restore is attempted; if key restoration fails, the app continues and the user can re-enter the key
- This is best-effort behavior from iCloud/Google backup, not a guaranteed restore for every reinstall.
- Restore usually requires the same platform account and backup to be enabled before uninstall.
- Debug/local development reinstalls are not a reliable signal of real restore behavior.
- Debug builds and local install/uninstall cycles often bypass normal cloud backup/restore timing.
- Production-like channels (Play release/internal testing, TestFlight/App Store) better represent real user restore behavior.
Use release-like builds when validating restore behavior.
- Install app and add representative data (goals, profile, food, water, weight, workouts, settings).
- Confirm OS backup is enabled.
- Trigger/allow device backup completion.
- Uninstall and reinstall the same app package/bundle.
- Open app and verify persisted data restored, including weight history.
- Verify app still starts if secure storage key restore fails (API key may require re-entry).
- Repeat with backup disabled to confirm expected clean-state reinstall behavior.