genui

Generative UI: a model composes a view out of a FIXED registry of React components, naming component ids and typed props — never markup, never CSS, never code. The bounded registry IS the containment story: eight components, each declaring a closed set of props, so there is no style, className or dangerouslySetInnerHTML for generated output to travel through. Compositions are validated twice on purpose — in Go before they are stored and served, and again in the frame before they are rendered, because "the host already checked it" is the assumption that turns one bug into a rendered payload. The model runs HOST-side in Go: the frame receives a finished tree over the postMessage bridge, holds no credentials, and keeps connect-src 'none', so a composer that could call a model could never also send it the document. Generated controls may only fire actions the host explicitly allow-listed. Async by design: a placeholder, then the finished view; no tokens streamed into the DOM.

v0.1.0sandboxed iframe

Install and mount

go get github.com/DonaldMurillo/gofastr-plugins@v0.5.0

import "github.com/DonaldMurillo/gofastr-plugins/genui"

app.RegisterPlugin(genui.New())

Isolation

Runs in an opaque-origin iframe

The frame never gets allow-same-origin, so it cannot reach host cookies, the database, or the host DOM. It talks to the host only over the versioned postMessage bridge, limited to the capabilities listed below.

Manifest

Plugin version
0.1.0
Framework compat
>=0.28.0
Isolation
sandbox-iframe-opaque
Sandbox tokens
allow-scripts
Capabilities
genui:compose, theme:read
Optional capabilities
none
CSP additions
none
Route prefix
/__gofastr/plugin/genui
Entry
/__gofastr/plugin/genui/genui.html
Schema
genui-v1
Min height
360px

All plugins