F+Foldkit Plus
HomeLearnPackagesComponentsDemosGitHub ↗

Sync

Guides

foldkit-sync

  • Overview
  • Is this the right package?
  • The model in one equation
  • Sixty seconds: say what is shared
  • Run it in the browser
  • The server
  • Serving from a Durable Object
  • What makes a Message durable
  • What to show the user
  • Growing the application
  • Testing without a browser or a server
  • When things go wrong
  • Advanced: the replica

foldkit-durable

  • Overview
  • The model
  • Install
  • Sixty seconds, with foldkit-sync
  • Using Durable directly
  • What append guarantees
  • Validation and authorization
  • Reading history
  • External effects and the crash gap
  • Retention
  • Services, codecs, errors, metrics
  • On Cloudflare D1 (d1: true)
  • Limits

Replicated state

  • Overview
  • Choose the owner first
  • The model
  • 1. Declare what is shared
  • 2. The client
  • 3. The server: an exchange over the journal
  • 4. What the user sees, and what waits for the server
  • One edit, end to end
  • When things go wrong
  • What you still own
  • See it working

Editing server data

  • Overview
  • When to use it, and who owns what
  • The mental model
  • A sixty-second path: one column
  • What each call does, and does not
  • Build outward
  • Failure and recovery

API

foldkit-sync

  • foldkit-sync
  • foldkit-sync/journal
  • foldkit-sync/entity
  • foldkit-sync/do
  • foldkit-sync/remote

foldkit-durable

  • foldkit-durable
  • foldkit-durable/core

Open source, MIT
Foldkit 0.168 · Effect 4

Sync / foldkit-sync/do

DocumentHostContext

interface · packages/sync/src/do.ts:42

interface DocumentHostContext {
  readonly storage?: unknown
}

The sliver of a Durable Object the host uses: state for the journal to open with.

Members

DocumentHostContext.storage#

property · packages/sync/src/do.ts:43

readonly storage?: unknown
Previousfoldkit-sync/do

On this page

  • storage

Edit on GitHub ↗

This site is a Foldkit Plus application, rendered at build time with foldkit-ssr. Its source

FoldkitEffectGitHub