Skip to content

Data Flow

The practical flow in the @life-manager/db package:

query state
-> action hook
-> workflow resolution
-> mutation enforcement
-> local DB write
-> sync layer
TableKey Fields
work_projecttitle, salary, currency, folder_id, color
work_foldertitle, parent_folder (hierarchical)
work_time_entrystart_time, end_time, project_id, paid
work_project_tagproject-tag mapping
TableKey Fields
appointmenttitle, start_date, end_date, status (optionally linked to work)
TableKey Fields
bank_accounttitle, currency, saldo
single_cashflowamount, date, bank_account_id, contact_id, tag_id
recurring_cashflowamount, interval, start_date, bank_account_id
finance_projecttitle, start_amount (groups related cashflows)
finance_project_adjustmentadjustments to finance projects
finance_project_tagproject-tag mapping
TableKey Fields
tagreusable tags for categorization
contactcontacts for transactions
TableKey Fields
profilesid, username, full_name, email, avatar_url
notificationsystem notifications
  • work_project -> work_folder (hierarchical organization)
  • work_time_entry -> work_project (time tracking per project)
  • appointment <-> work_time_entry (optional linking)
  • single_cashflow -> bank_account, contact, tag
  • payout -> work_project (converts work to payment)
WhatImport from
PowerSync schema (AppSchema)@life-manager/db/schema
Supabase types (Tables, Enums, Constants)@life-manager/db/supabase
Domain types@life-manager/db/types/work, @life-manager/db/types/finance, @life-manager/db/types/system
Query hooks@life-manager/db/hooks/queries/*
Action hooks@life-manager/db/hooks/actions/*
Mutation hooks@life-manager/db/entities/<domain>/<entity>
Zod schemas@life-manager/db/schemas
PlatformPackageSQLite Backend
Web@powersync/webwa-sqlite
Mobile@powersync/react-native@powersync/op-sqlite

Both share the schema from @life-manager/db/schema.

  • Types auto-generated: packages/db/src/supabase.types.ts
  • Regenerate: bun run generate-types from root
  • Auth handled via @supabase/ssr for SSR compatibility