Skip to content

API Reference ​

Kora.js is a set of focused packages. Each owns one layer of the offline-first stack.

Which packages do I need? ​

You are buildingInstall (with the @beta tag)
A React appkorajs, @korajs/react
A Vue or Svelte appkorajs, @korajs/vue or @korajs/svelte
A sync server@korajs/server
Sign-in, organizations, MFA@korajs/auth
A Tauri desktop app@korajs/tauri in addition
Sync tests@korajs/test (dev dependency)

korajs gives you createApp, defineSchema, t, migrate, op and the types you write apps with; it depends on @korajs/core, @korajs/store, @korajs/merge, @korajs/sync and @korajs/devtools. create-kora-app sets all of this up.

Packages ​

korajs               The app API (createApp, defineSchema, t, op, types)
  @korajs/core       Schema, types, operations, hybrid logical clock, the record fold
  @korajs/store      Local storage (SQLite WASM on OPFS, IndexedDB, native SQLite), queries
  @korajs/merge      Constraint and referential checks; the deprecated pairwise merge
  @korajs/sync       Sync engine, protocol v2, transports, encryption keyring, presence
  @korajs/devtools   Instrumentation, the DevTools panel and overlay
@korajs/server       Self-hosted sync server
@korajs/auth         Authentication, sessions, MFA, organizations, RBAC
@korajs/react        React bindings
@korajs/vue          Vue bindings
@korajs/svelte       Svelte bindings
@korajs/tauri        Native SQLite for Tauri desktop apps
@korajs/test         In-process multi-device sync tests
@korajs/cli          The kora command (create, dev, migrate, deploy, studio, ...)
create-kora-app      npx entry point of `kora create`

Reference pages ​

PageContents
CoredefineSchema, field builders, atomic ops, the HLC, operations, the fold, version vectors, scopes, migrations, blobs
StoreCollections, queries, subscriptions, transactions, sequences, adapters, blobs
MergeConstraint checks, referential integrity, rich-text helpers
Syncapp.sync, status types, SyncEngine, transports, protocol constants, encryption, presence
ServercreateProductionServer, KoraSyncServer, stores, the route context, auth providers, validation
AuthAuth client, sync binding, passkeys, the auth server, sessions, MFA, organizations, RBAC, OAuth
ReactKoraProvider, createKoraHooks, useQuery, useMutation, useSyncStatus, rich text, presence
Vue / SvelteThe same bindings for Vue and Svelte
DevToolsThe complete event catalog, Instrumenter, panel building blocks
TestcreateTestNetwork, TestDevice, TestServer, convergence assertions
CLIEvery kora command and flag
Error CodesEvery error code with its cause and fix