Skip to content

JavaScript: Introduction

This reference documents kizunasync, the kizunasync/supabase adapters, and the kizunasync/web browser ports. Together they are the JavaScript surface for local reads, local writes, sync, and attachments against a Supabase project that kizunasync init has provisioned.

Version#

kizunasync 0.2.6-alpha.3 (Alpha). npm package kizunasync, import paths kizunasync, kizunasync/supabase, and kizunasync/web. See Installing.

What this reference covers#

The shortest path through the tree is Initializing, then Fetch data and Insert data. The client syncs on its own from its first use, and Sync covers the few cases that call it directly.

SectionPages
ConfigDefine config declares the synced tables, their buckets and attachment columns, and the options every run reads.
DatabaseFetch data, Insert data, Update data, Delete data, Using filters, Using transforms.
SyncSync, Pull once, Push once, Set bucket, Checkpoint, Outbox depth, Sync health, Reset.
Auth sessionSet access token.
RejectionsList rejections, Dismiss a rejection.
OverwritesList overwrites, Dismiss an overwrite.
EventsSubscribe to events.
AttachmentsAttach a file, Resolve a download, Get attachment status, Watch an attachment, Retry an attachment, Cancel an attachment, Remove an attachment, Vacuum attachments.
Supabase adaptersCreate the RPC remote, Create the Storage transfer, Upload with TUS, Create the Realtime wakeup, Create the document foreground, Recover an anonymous session, Wait with a deadline.
Browser driverOpen the browser driver, Browser connectivity, Browser file store, Build integration.
InspectorInspector.
TypesTypes.

The React and Vue bindings wrap this same client: see React: Introduction and Vue: Introduction. Expo and React Native replace the browser ports with Expo: Introduction.

What Supabase covers#

ConcernUse
Sign-in, sessions, and JWT refreshsignInWithPassword, whose session the adapters read before every pull and push
Row Level Security policiesRow Level Security, applied server-side when a queued write is pushed
Realtime channels behind the wake-up doorbellsubscribe, wrapped by Create the Realtime wakeup
Storage buckets outside the attachment pathupload, while attachment bytes travel through Create the Storage transfer

Found a problem? Edit this page on GitHub