Skip to content

Custom fields: JSON Schema field groups + MetaStore API #162

@tayebmokni

Description

@tayebmokni

Summary

Implement the JSON Schema-driven custom fields ("meta box") system: field-group registration, server-side validation against posts.meta or sidecar columns, and the typed MetaStore API plugins use to read/write meta.

Design reference

  • docs/01-core-cms.md §9 (The Meta Box / Custom Fields Problem)
  • docs/01-core-cms.md §9.2 (JSON Schema-driven field groups)
  • docs/01-core-cms.md §9.4 (Storage: meta / sidecar / column)
  • docs/01-core-cms.md §3.5 (Plugin-extensible meta API)

Acceptance criteria

  • field_groups registry table created (id, title, applies_to, namespace, schema JSONB, origin)
  • internal/content/fields.Register(group) parses + validates the JSON Schema on register
  • On posts insert/update, every applicable field group's schema is validated against incoming data; storage routes to posts.meta, sidecar, or column per the storage.kind
  • MetaStore interface implemented per §3.5: Get, Set, Delete, Query with constrained predicate language (eq, gt/lt, exists, in)
  • Built-in field types supported: string, text, richtext, markdown, integer, number, boolean, date, datetime, time, select, multiselect, attachment, gallery, reference, taxonomy, repeater, group, url, email, color, geo, json
  • Per-namespace write authorization: a plugin can only write keys under its own meta_namespace
  • Integration test: register a field group with sidecar + meta fields; create a post; verify both routes persist and the JSON Schema validation rejects bad input

Dependencies

#14, #22

Complexity

XL

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiGo HTTP API serverarea:plugin-sdkPlugin SDK (Go/Rust/TS)needs-designBlocked on a design decisionphase:P1-cms-corePhase 1 — CMS Corepriority:P1Important — should land in phaseskill:goGo programmingtype:featNew feature or implementation task

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions