watershed Collaborative data structures for Gleam

← watershed · Component model

Give users
the parts.

These sheets answer one question: what if the user, not the author, decides what is on the page? The running example is a shared board: build it out of parts, wire it up, and save its arrangement in a workspace within the shared document.

Skip this section if your application ships a screen you lay out yourself. Start with the foundations for the document model every watershed app uses.

Component model

Optional · user-constructable apps

3 sheets. One example board, built, wired, and saved. The first two split in half: using the parts, then writing one.

  1. 01 Components and catalogs Let users, not the author, decide what is on the page: package each part of the app behind a versioned descriptor so it can be rebuilt from a saved document, and keep unlike parts in one catalog. Descriptor · Catalog · register · find · start
  2. 02 Ports and dispatch Let a user connect two parts that were written apart: a port is a named connection point a component publishes, typed while you write it, erased once it is stored, and checked again before every event it carries. Output · Input · EffectiveGraph · LocalIntent · Delivery
  3. 03 Workspaces and instances Save component instances, presentation order, and wiring in a workspace within your document — and reopen it safely next year, without deleting the parts this build cannot understand. ManifestEntry · Snapshot · Prepared · delete_instance

Need a fixed application screen instead? Return to the foundations, then follow the survey procedure.