convex-chat
Concepts

Architecture

Separate application authority from reusable chat invariants.

The component is deliberately independent from a consuming application's identity, relationships, tenancy, and product rules.

Your client


Public host functions       authenticate and derive the actor


convex-chat component       enforce membership and chat invariants

    └── host-managed storage for attachment bytes

Host application responsibilities

  • Authenticate every public caller.
  • Derive scopeId and subjectId from trusted application data.
  • Decide whether a relationship may create a conversation.
  • Apply tenancy, moderation, and product policy.
  • Authorize attachment uploads and resolve download URLs.

Component responsibilities

  • Maintain chat-local membership and access.
  • Allocate deterministic per-conversation sequence numbers.
  • Make sends idempotent under retries and reconnects.
  • Maintain monotonic read watermarks and exact unread counts.
  • Enforce revision checks for message edits and deletion.

Host table IDs cross the boundary only as opaque strings. The component never queries or interprets your users table.

On this page