Installation

Prerequisites

Before installing, make sure you have:

  • An existing Convex project (run npx convex init if you do not have one).
  • A Vite-based bundler (Vite, SvelteKit, Next.js with Turbopack, etc.) — the embedded runtime uses import.meta.glob for module discovery.
  • convex ^1.32.0 as a peer dependency.

1. Install the Package

2. Install the Convex Component

The CRDT sync engine uses a Convex component for server-side delta storage. Install it with:

npx convex component add @robelest/convex-embedded

This registers the component in your convex.config.ts and makes components.embedded available in your generated API.

Package Exports

@robelest/convex-embedded ships multiple entry points so you only import what you need:

ExportEnvironmentDescription
@robelest/convex-embedded/browserBrowsercreateConvexClient factory, getResolveState, subscribeResolveState, getAuthState, subscribeAuthState, preload utilities
@robelest/convex-embedded/serverConvex backendembeddedTable, setup, remoteOnly
@robelest/convex-embedded/crdtConvex backendschema namespace (register, prose, counter, set, omit)
@robelest/convex-embedded/workerWeb Workerwa-sqlite worker entry point
@robelest/convex-embedded/clientBrowserInternal resolve engine (not part of the public API)
@robelest/convex-embedded/convex.configConvexComponent configuration
@robelest/convex-embedded/testTestTesting utilities

Most applications only need browser, server, and crdt.

Next Steps

Continue to the Quick Start to define your first embedded table, set up server bindings, and create a client.