Documentation

Practical product docs for setting up, mapping, editing, and operating BaseBuddy.

Docs/Storage contract and UI

Storage contract and UI

See how BaseBuddy chooses editor controls from storage primitives, value kinds, semantic roles, and patch modes.

The rule

BaseBuddy picks the UI control based on the storage shape first.

textrendered control = base type control + placement adapter + semantic overlay

A semantic role can refine labels or workflow behavior, but it won't hide the real storage shape underneath.

Core concepts defines the storage contract, semantic role, and read-only states. Mapping fields and relations shows how those pieces appear when mapping real content fields.

Base type controlRendered controlPlacement adapterSemantic overlayMapped patch mode

Common storage placement

PlacementMeaningWrite behavior
Direct columnWhole value lives in one columnReplace that value
JSON pathValue lives inside json or jsonbPatch the path only
Composite fieldValue lives inside a known composite columnPatch the composite field when safe
Array valueWhole column is a listReplace the array
Array itemOne mapped field writes one list indexPatch that index
Foreign keyColumn points at one related rowReplace the foreign key
Join tableMany rows encode many selected valuesDiff join rows
Related helper rowSeparate row keyed by the post stores metadataUpsert or patch the helper value
Join rowSingle helper row per post stores one valueUpsert the helper row
Value-match relationStored value points at a related valueReplace the stored value
Polymorphic joinHelper rows point at multiple target typesEdit only with explicit discriminator rules
Derived read-onlyValue is computed or unsafeDo not write

Value kinds

Value kindDefault control
TextText input
Long textTextarea or rich text editor
MarkdownMarkdown-aware editor preserving mapped storage
NumberNumber input
BooleanToggle
EnumDropdown
Date or datetimeDate/time input
JSONStructured editor or JSON editor
RelationSingle or multi selector
MediaMedia picker
FileFile picker
Generated/systemRead-only display

Why this matters

Two fields can both be called "title" but need completely different write behavior. One might be a direct text column. Another might be the first item in an array. Another might live inside JSON. The UI can look the same, but the patch has to respect the storage placement.

That's why BaseBuddy stores the contract in the mapping instead of guessing from field names during save.

For Markdown and rich text, this is the difference between editing with a rich surface and silently changing storage formats. How to map Markdown content safely covers that specific case.

Unsupported shapes

Some shapes shouldn't be editable by default: system identifiers, unknown composites, trigger-managed values, views without write rules, opaque binary blobs, and polymorphic relations without an explicit discriminator contract.

When BaseBuddy can't prove a safe write path, the correct behavior is to mark it read-only or unsupported.

Safe editing model explains why this protects production data, and How to fix a field showing as read-only helps you inspect a specific field.