HeadlinesBriefing favicon HeadlinesBriefing.com

GolemUI: Decoupling Form Logic from Frameworks via JSON

Hacker News •
×

A team of open source developers released GolemUI, a library that generates dynamic forms from JSON definitions. By treating form layouts as data rather than hard-coded components, the engine allows developers to store, version, and diff form structures in a database. This approach separates the form's logic from the UI layer, enabling updates without new deployments.

Compatibility is a primary focus, as the same JSON definition renders across React, Angular, Vue, and Lit. The library includes 28 headless components styled with CSS variables, though developers can swap these for Material or Shoelace. A typed authoring layer called {gui.} simplifies the process by programmatically generating the underlying JSON, reducing boilerplate code.

Integration with AI is handled through a deterministic MCP that validates LLM output to ensure generated schemas remain functional. This reduces token usage by approximately 41% compared to traditional React Hook Form implementations. By supporting Zod and Valibot for validation, the engine handles the complex plumbing of accessibility and i18n out of the box.