Offline with sync

Local-first logging with a cloud backup layer next.

Nutrixa should never feel blocked by a bad connection. The backend plan is to keep device storage as the source of fast daily use, then sync signed-in data whenever the network is available.

Recommended architecture

Device cache + sync queue + user database

The app can save locally first, mark unsynced records, upload changes when online, then reconcile server updates by user account and timestamp.

Phase 1

Auth and account records

Email login, sign in with Apple, secure sessions, and private per-user data tables.

Phase 2

Syncable app data

Meals, goals, weights, recipes, planned recipes, shopping progress, and manual list items.

Phase 3

Conflict handling

Use updated timestamps, deleted markers, and clear merge rules for edits from multiple devices.

Phase 4

Web dashboard

Let users review account status, manage privacy settings, and later view selected progress data.

Data To Sync First

  • Meal plan entries
  • Weight logs
  • User profile and macro goals
  • Saved recipes
  • Weekly planner and shopping list state

Data To Treat Carefully

  • Apple Health data permissions
  • Location-based restaurant lookups
  • Photos or profile images
  • Friend sharing preferences
  • Deleted account records

Good Backend Fits

  • Supabase for SQL, auth, and fast admin visibility
  • Firebase for iOS-friendly auth and realtime sync
  • Cloudflare Workers and D1 if you want to keep the stack close to this site