Architecture
Everything uses one shared backend for account-bound product state across web, Apple, Android, Windows, and future clients.Backend Boundary
Convex is the product backend and source of truth for users, areas, projects, tasks, devices, sync, AI actions, AI request metadata, and feature flags. Clerk is the identity provider. Clients authenticate with Clerk, then call Convex using the Convex JWT template. Vercel AI SDK calls run inside Convex Node actions. Platform clients call authenticated Convex actions for AI features; provider keys and model routing stay behind the backend boundary.Platform Clients
Platform apps should keep fast local UI state, but durable task data belongs to Convex once the app is signed in. Native stores are treated as caches and migration sources, not independent backends.Data Flow
- Client authenticates with Clerk.
- Client calls
sync.initializeto upsert the user and register the installation. - Existing local records migrate through
sync.importSnapshotwith stableclientIdvalues. - Ongoing reads use reactive queries, cursor pagination, full-text search, or
sync.changesfor incremental reconciliation. - Ongoing writes use owner-scoped Convex mutations.
- AI flows call authenticated Convex actions, which use Vercel AI SDK and then return drafts, summaries, or created task IDs.