Mirror / foldkit-mirror

Limits

  • A mirror is last-write-wins. Two tabs writing one KV document do not converge; use foldkit-sync when ordering and convergence matter.
  • Arrays and objects use JSON in the URL by default; provide a codec for a more readable representation.
  • Two different mirror kinds may observe the same Model field. That is not two owners; cold-load precedence follows the URL -> KV -> initial rule above.
  • A URL mirror only touches the keys it owns. It composes with a Foldkit router's route.query(schema) when they use different keys.
  • A cookie is sent with every request to its path, and browsers keep about 4 KB of one: mirror a few small fields there, not a document.
  • Mirror stores have no durable operation log, conflict resolution, or multi-device synchronization.

See also