Show HN: GolemUI – Declarative Form Engine (golemui.com)
We recently released GolemUI, an Open Source library to generate forms dynamically from JSON definitions, with a typed layer to simplify authoring.
This library has a lot to offer. These are the main characteristics:
1. A JSON engine. The form is governed by a JSON definition that you can store in a DB, version, diff, or generate it with LLMs as a validated JSON.
2. We provide also 28 headless components (and growing) that you can style with CSS variables. We offer APIs so you can drop in Material, Shoelace, or your own components.
3. A DX typed authoring layer on top to write forms programmatically, that generates JSON. So you don't have to write it.
4. The same definition can render the UI components in React, Angular, Vue, Lit, or Vanilla JS.
5. We also have a deterministic MCP that has tools for to validate the model's output, generate JSONs or code, and ensure that the definition returned by the LLM is always valid.
You can find more information here:
Happy to hear any feedback from you and answer any questions!
25 comments
[ 3.6 ms ] story [ 38.1 ms ] threadI’m sorry, maybe it’s shallow, but that makes me close the tab.
https://news.ycombinator.com/newsguidelines.html
This idea for JSON -> form has existed for a decade, one example: https://github.com/eclipsesource/jsonforms
I haven't looked at Golem specifically, but every other approach I've seen breaks down for complicated UIs. User-friendly validation and conditional forms require procedural logic. Invariably the declarative format (JSON in this case) ends up with up with a bunch of programming constructs.
P.S. I genuinely don't want to hate on the work of motivated devs, creating something useful for the community, and trying to share it. That's a great thing, and we want more of it!
But when some asshat comes in with an ai slop library that's redundant with a dozen other solutions (all of which people actually use in production to solve problems) ... and claims that they are creating new paradigms ... it feels to me like that makes things harder for every real new contribution.
All the stuff we want is signal, and crap like this just adds ego-based noise that blocks the signal.
Can you simplify how form dynamism works? I skimmed the docs and saw 'states', but it didn't immediately click how it works.
Do we build a tree of rules outside of the components? Are states attached to each component, bottoms-up, and then the form tree is managed by the library?
If states didn't click initially that's fine, you can still cover a lot of ground using inlined expressions: https://golemui.com/dx/features/states/inline-when/
Basically you can nest the states, so you can build a tree of states that way.
Or you can leverage the DX to have fully reactive components.
If I use Tailwind, BEM or Boostrap, how hard it will be to customise? Flowbite have a few pre-made UI.
Shoelace UI is based on Web Components, now that it got bigger:
https://webawesome.com/docs/components/
GolemUI looks like a nice open source version of this idea.
Thank you!
All of those are fixable of course, and the idea is neat! It's just a bit of a rough showcase, at least on Firefox.