saw a library that renders chat cards across slack, teams, discord and telegram from one typed catalog of components. the neat trick: the model can only pick components you defined, so it cannot invent a broken card, and validation rejects degraded specs instead of posting garbage.
good engineering, wrong shape for the app. it wants a javascript framework, token streaming, and chat targets. the inspire page is vanilla javascript with results arriving whole from a job. adopting the library means adding a framework to render blocks i would still write myself.
the pattern is worth stealing though. right now the page has two hand maintained renderers that disagree, one in the frontend and one in the export backend, same layout twice by hand. the plan: the model returns a title, a summary, tags, and a list of blocks, each block has a type and its own fields, and the frontend holds a map from type to render function. unknown blocks get skipped, never crash. the block types cover the real spread of content: palette, typography, spec table, part list, dimensions, image markers, steps, links, note. one catalog, one validator, and the renderer becomes a lookup table.