Skip to content

Core Concepts

User Action -> Component -> Hook/Store -> PowerSync (local SQLite) -> Supabase (cloud)
|
Offline: works locally
Online: auto-syncs to cloud

TanStack DB + PowerSync provides full offline functionality with automatic conflict resolution. Components never talk to Supabase directly — all reads/writes go through PowerSync collections.

Both web and mobile share the same schema from @life-manager/db/schema, but use platform-specific PowerSync backends:

PlatformPackageSQLite Backend
Web@powersync/webwa-sqlite
Mobile@powersync/react-native@powersync/op-sqlite
  • @life-manager/db (packages/db/) — PowerSync schema, Supabase-generated types, domain types. Shared between web and mobile.
  • @life-manager/shared (packages/shared/) — Shared constants, helper utilities, hooks, i18n locales, and utility functions.