F+Foldkit Plus
HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Remote

Guides

foldkit-remote

  • Overview
  • Find what you need
  • If you know TanStack Query, TanStack DB or fate
  • Which state belongs here?
  • How the read loop works
  • Full walkthrough: one entity, one Surface
  • Routing Remote's Messages
  • RemoteData: what does the Model know right now?
  • When it does not do what you expect
  • Normalized entities and selections
  • Reading, policies, and prefetch
  • Queries and pagination
  • Mutations and optimistic state
  • Live data
  • Retention and garbage collection
  • Persistence and hydration
  • Server rendering: Remote.resume
  • How the server packages fit
  • Clients and transports
  • Introspection
  • Testing what a reader sees: Trace
  • Testing that a prediction is the truth: Law
  • Advanced: the kernel
  • Boundaries: what Remote manages vs. your app
  • Limits
  • See also

foldkit-remote-server

  • Overview
  • How a read resolves
  • Queries
  • Mutations
  • Live data
  • Authentication vs authorization
  • Compose and validate the server
  • Hardening
  • A backend held in memory
  • Over a MessagePort
  • Over plain JSON
  • Over fetch (Workers)
  • When the server fails
  • Diagnostics
  • Reference semantics: evaluate and the conformance suite
  • See also

foldkit-remote-drizzle

  • Overview
  • Put the Source behind RemoteServer
  • The binding is the shared schema
  • Binding a foldkit-entity domain
  • Which rows a principal may see
  • Field authorization stays in RemoteServer
  • Singular relations
  • Collection relations
  • Windowed collection relations
  • Query connections
  • Computed fields
  • Mutations
  • Compose the server
  • Testing a binding
  • Diagnose the first read
  • When the database fails
  • Diagnostics
  • Cloudflare D1

foldkit-remote-domain

  • Overview
  • Choose between Domain and SQL backends
  • How a write flows from page to View and back
  • Handle a View that lags behind its write
  • Import a Domain command without a declared Write
  • Test a page against an in-memory Domain model
  • Pre-read on the server for SSR
  • Bind paged lists and one relations
  • Lower a declared Write into an Aggregate
  • Failure modes and current limits
  • Reference

Server-derived state

  • Overview
  • How they fit together
  • What is normalized
  • Requirements and observation
  • Mutations and live data
  • One owner per datum
  • Persistence and recovery
  • When not to use Remote
  • Worked examples and limits

Declared writes

  • Overview
  • Who owns what
  • How one row version decides everything
  • A first precondition: publishing a draft
  • Pinning guards to the written revision
  • Concurrent increments and decrements
  • Computed field assignments
  • What every row holds: an invariant
  • What every change holds: a transition invariant
  • Enforcing a postcondition with becomes
  • Operation IDs and retries
  • A write ledger
  • Optimistic previews in the browser
  • Asking before sending: Data.can
  • Checking the prediction against the server
  • Failure and recovery

An event-sourced domain behind Remote

  • Overview
  • Rows or Events
  • Who owns what
  • The loop
  • Three ways a Command meets a declared write
  • The shortest whole path
  • What the page can and cannot predict
  • One reservation, all the way round
  • When it goes wrong
  • Where lowering stops
  • Testing it
  • Limits

API

foldkit-remote

  • foldkit-remote
  • foldkit-remote/filter
  • foldkit-remote/live
  • foldkit-remote/outbox
  • foldkit-remote/overlay
  • foldkit-remote/persistence
  • foldkit-remote/port
  • foldkit-remote/testing
  • foldkit-remote/why

foldkit-remote-server

  • foldkit-remote-server
  • foldkit-remote-server/port
  • foldkit-remote-server/fetch

foldkit-remote-drizzle

  • foldkit-remote-drizzle
  • foldkit-remote-drizzle/pg

foldkit-remote-domain

  • foldkit-remote-domain
  • foldkit-remote-domain/imported
  • foldkit-remote-domain/lower
  • foldkit-remote-domain/server
  • foldkit-remote-domain/testing

Open source, MIT
Foldkit 0.170 · Effect 4

Remote / foldkit-remote-domain/imported

RejectionFields

type · packages/remote-domain/src/imported/describe.ts:62

type RejectionFields<A extends AnyApi> = {
  readonly [Command in CommandNameOf<A>]?: {
    readonly [Tag in RejectionTagOf<CommandOf<A, Command>>]?: string
  }
}

The form key each Rejection shows beside, by command and Rejection tag.

Previousfoldkit-remote-domain/imported

Edit on GitHub ↗

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

FoldkitEffectGitHub

Menu

HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Remote

Guides

foldkit-remote
  • Overview
  • Find what you need
  • If you know TanStack Query, TanStack DB or fate
  • Which state belongs here?
  • How the read loop works
  • Full walkthrough: one entity, one Surface
  • Routing Remote's Messages
  • RemoteData: what does the Model know right now?
  • When it does not do what you expect
  • Normalized entities and selections
  • Reading, policies, and prefetch
  • Queries and pagination
  • Mutations and optimistic state
  • Live data
  • Retention and garbage collection
  • Persistence and hydration
  • Server rendering: Remote.resume
  • How the server packages fit
  • Clients and transports
  • Introspection
  • Testing what a reader sees: Trace
  • Testing that a prediction is the truth: Law
  • Advanced: the kernel
  • Boundaries: what Remote manages vs. your app
  • Limits
  • See also
foldkit-remote-server
  • Overview
  • How a read resolves
  • Queries
  • Mutations
  • Live data
  • Authentication vs authorization
  • Compose and validate the server
  • Hardening
  • A backend held in memory
  • Over a MessagePort
  • Over plain JSON
  • Over fetch (Workers)
  • When the server fails
  • Diagnostics
  • Reference semantics: evaluate and the conformance suite
  • See also
foldkit-remote-drizzle
  • Overview
  • Put the Source behind RemoteServer
  • The binding is the shared schema
  • Binding a foldkit-entity domain
  • Which rows a principal may see
  • Field authorization stays in RemoteServer
  • Singular relations
  • Collection relations
  • Windowed collection relations
  • Query connections
  • Computed fields
  • Mutations
  • Compose the server
  • Testing a binding
  • Diagnose the first read
  • When the database fails
  • Diagnostics
  • Cloudflare D1
foldkit-remote-domain
  • Overview
  • Choose between Domain and SQL backends
  • How a write flows from page to View and back
  • Handle a View that lags behind its write
  • Import a Domain command without a declared Write
  • Test a page against an in-memory Domain model
  • Pre-read on the server for SSR
  • Bind paged lists and one relations
  • Lower a declared Write into an Aggregate
  • Failure modes and current limits
  • Reference
Server-derived state
  • Overview
  • How they fit together
  • What is normalized
  • Requirements and observation
  • Mutations and live data
  • One owner per datum
  • Persistence and recovery
  • When not to use Remote
  • Worked examples and limits
Declared writes
  • Overview
  • Who owns what
  • How one row version decides everything
  • A first precondition: publishing a draft
  • Pinning guards to the written revision
  • Concurrent increments and decrements
  • Computed field assignments
  • What every row holds: an invariant
  • What every change holds: a transition invariant
  • Enforcing a postcondition with becomes
  • Operation IDs and retries
  • A write ledger
  • Optimistic previews in the browser
  • Asking before sending: Data.can
  • Checking the prediction against the server
  • Failure and recovery
An event-sourced domain behind Remote
  • Overview
  • Rows or Events
  • Who owns what
  • The loop
  • Three ways a Command meets a declared write
  • The shortest whole path
  • What the page can and cannot predict
  • One reservation, all the way round
  • When it goes wrong
  • Where lowering stops
  • Testing it
  • Limits

API

foldkit-remote
  • foldkit-remote
  • foldkit-remote/filter
  • foldkit-remote/live
  • foldkit-remote/outbox
  • foldkit-remote/overlay
  • foldkit-remote/persistence
  • foldkit-remote/port
  • foldkit-remote/testing
  • foldkit-remote/why
foldkit-remote-server
  • foldkit-remote-server
  • foldkit-remote-server/port
  • foldkit-remote-server/fetch
foldkit-remote-drizzle
  • foldkit-remote-drizzle
  • foldkit-remote-drizzle/pg
foldkit-remote-domain
  • foldkit-remote-domain
  • foldkit-remote-domain/imported
  • foldkit-remote-domain/lower
  • foldkit-remote-domain/server
  • foldkit-remote-domain/testing

Open source, MIT
Foldkit 0.170 · Effect 4