Skip to main content

Introduction

Genetik is a JSON-driven UI ecosystem: schema-defined blocks, flat content trees, and a plugin-based renderer for CMS, LLM-driven UIs, and dynamic applications.

Core ideas​

  • JSON as source of truth — UI structure and configuration live in data, not only in code.
  • Schema-first — A single schema defines what's allowed; it drives validation, tooling, and rendering.
  • Flat content model — Content is a flat map of nodes by id plus one entry id; slots reference children by id. Easy to patch, merge, and reason about.
  • One content model, many consumers — The same content can power editors, headless APIs, static site generation, and LLM-generated UIs.

Packages​

All packages are under the @genetik scope. The docs reference the ones currently in this repo:

PackageRole
@genetik/schemaBlock types, config schemas, slots. Build-time plugin API.
@genetik/contentFlat content model, validation, normalization (inline → flat).
@genetik/patchesStructured mutations: add/remove/reorder nodes, update config.
@genetik/rendererFramework-agnostic core: content + schema + component map → UI.
@genetik/renderer-reactReact binding for the renderer.
@genetik/editorEditor mutations and schema plugin.
@genetik/editor-reactReact editor UI: palette, canvas, config panel.
@genetik/context-eventsPage context and context overrides for blocks.

See the Packages section for full reference.

Tutorial​

To build a small content editor (block palette, visual canvas, JSON mode, and preview) step by step, follow the Tutorial. You can try the result in the Playground.