Framework UI: Nuxt UI primary, server-rendered optional
Status
Section titled “Status”Accepted.
2026-10-14 (shared Nuxt UI ruling); the optional server-rendered module was specified on 2026-11-02.
Context
Section titled “Context”A framework that serves business applications needs a front end. The first Java work built a server-rendered kit (JTE templates and Datastar) with component specifications and golden fixtures. On 2026-10-13 the Go framework was designed with a different choice: Nuxt UI v4 on Vue 3 and Vite, in strict TypeScript, built to static files and embedded in the binary. The next day the question was whether Java and Go should each carry their own UI or share one.
Applications differ. Some want rich client-side pages with generated, typed API clients. Others want server-rendered pages and no JavaScript build.
Decision
Section titled “Decision”- One backend-agnostic Nuxt UI package is the primary UI of both frameworks. It talks to a typed JSON API whose OpenAPI document the framework emits, and either backend can serve it. Static serving and the OpenAPI document are shared contracts, not Go or Java sketches.
- Server-rendered UI is optional and secondary. Java renders with JTE (
framework-ui) and Go with templ (the separate modulego/ui). Both render the same markup from the same component specifications, held together by shared fixtures. - The Go server-rendered module is its own Go module, so templ, a Markdown renderer, a sanitiser and compression libraries stay out of the core. Its packages that are plain
net/httpcan be used without the framework, which is how the platform’s console uses it. - Server-rendered pages carry strict rules: every value is escaped, URL schemes are checked, expression values that become code are validated and refused when unsafe, and unknown variants fail instead of defaulting.
- The Datastar adapter and the component fixtures are not part of the Go core; they belong to the optional module.
Consequences
Section titled “Consequences”Good:
- One UI codebase, typed from the handler to the form, for both languages.
- Teams that do not want a JavaScript toolchain still have a supported path.
- The platform and the framework share the same server-rendered kit code.
Bad:
- Two UI approaches to maintain, with the optional one needing its own fixtures and security tests.
- The primary package is linked by path from a repository checkout; it is not published.
- The kit has to be kept in step in two languages for the optional route.
Alternatives considered
Section titled “Alternatives considered”| Alternative | Why not |
|---|---|
| Server-rendered only | Weak for rich applications; no typed client from the API description. |
| A separate UI per language | Duplicated work and drift between the two frameworks. |
| No UI in the framework | Every application would rebuild sessions, admin pages and form conventions. |