Data & storage
What the software stores
Where data comes from, where it goes, and what it means to the application.
Stores
- Firestore:
users,community_posts,official_chat*,
accountability_*, user_feature_quotas, feedback collections.
- SharedPreferences: onboarding, streaks, fasting, quotas fallback,
notification prefs, video/article progress.
- Firebase Storage: food image upload/fallback.
- HomeWidget / App Group: widget snapshots (app group placeholder risk).
- Secure storage: installation tracking (dependency present).
Data flow
Paths
- Auth → Firebase Auth → profile doc
users/{uid}→ RevenueCat logIn. - Onboarding → local progress keys ↔ Firestore onboarding subdocs.
- Purchase → Superwall UI → RevenueCat purchase → Superwall status sync →
Firestore subscription mirror fields → congratulations / MainScaffold.
- Daily habits → local prefs + Firestore user/pledge/challenge docs →
HomeWidget bridge.
- AI features → device → Groq/OpenAI/Edamam/Spoonacular (API key names
only) → results stored in nutrition/chat UIs.
Which functionality touches each store
No data stores are declared by functionality records.