I’ve at all times been fascinated by the server-driven strategy to internet growth (UI code runs on the server, the browser is additional skinny), and I experimented with it all through my profession.
There aren’t many server-driven stacks, they usually can’t compete with what the front-end JS ecosystem provides. I needed to alter that. It was rather more sophisticated than I initially anticipated and took greater than two years.
Layer 1: Templates
You might love JSX, chances are you’ll hate it, however the capacity to jot down HTML templates in code and deal with them like code is a must have for complicated internet UIs. I attempted templ, but it surely wasn’t versatile sufficient: it lacked options like HTML as an expression (so it may be saved to a variable or handed to a operate), and the LSP expertise wasn’t nice.
Meet GoX. It helps you to write HTML templates as typed Go expressions that compile to plain Go:
- Seamless editor help: a near-native language server expertise throughout .gox and .go information.
- Full templating toolbox: conditionals, loops, composition and reusable elements.
- Extensible rendering pipeline: templates compile to a stream of render jobs, processable with customized printers.
- templ suitable: gox.Elem implements Render(ctx, w) and drops in wherever a templ element is predicted.
Why not contribute to
templ? That was my unique thought, however once I checked out its code base, I noticed it had gone a totally totally different route in virtually each means.
Layer 2: The framework
Doorways is considerably much like LiveView(see the README for the variations). It helps you to construct reactive internet apps with out JavaScript or an API: the server is the applying runtime, and the browser is the distant renderer and enter layer. When the consumer presses a button, it triggers a Go operate:
<button (doorways.AClick{
On: func(ctx context.Context, _ doorways.RequestPointer) bool {
order.Pay(ctx)
return true
},
})>Pay</button>
Below the hood, it creates a non-public non permanent endpoint, scoped to this explicit occasion on this button for this explicit browser session.
It has each reactive state and DOM containers, and ships a ton of helpful options, like routing-free useful resource serving:
<img (doorways.ResourceLocalFS("./personal/chart.png"))>
Important architectural distinction to different stateful server-driven runtimes is non-blocking occasion dealing with with parallel rendering, and HTTP/3 prepared sync protocol with “zero-delay” connection restoration. Collectively it brings light-weight SPA consumer expertise.
Layer 3: Agent
Neui (github / doors-dev/neui) turns every consumer’s web page into an agent harness. You’ll be able to consider it as a extra highly effective however specialised model of CopilotKit.
The agent sees & operates the UI: Annotate what the agent can entry (hyperlinks, inputs, buttons), so the agent sees it and may also help the consumer with UI operations, and even automate them with scripting.
~>neui.Use{ Desc:"submit the shape" } <button>Submit</button>
or expose context knowledge for the agent:
<div class="card">
~neui.Information{Textual content: "the product proven within the card", Object: product}
...
</div>
Dynamically dispatched instruments, proper within the markup: Identical means as you render a button to the consumer, you give the agent a instrument. No endpoints or lifecycle administration wanted.
~(if consumer.IsAdmin() {
~neui.Device[Refund, Receipt]{
Identify: "refund",
Desc: "Refund the order",
Handler: orders.Refund,
}
})
Work surroundings: Remoted file workspace and sandboxed scripting (“code mode”) out of the field. Like a bit brother of your native coding agent.
Agentic apps: When a consumer wants one thing your UI doesn’t have, the agent builds it on demand, and it runs in your internet app’s shell.
Full chat expertise: Thread listing, historical past, message edits, search, a message queue and computerized compaction. Use it as is, customise it or fork it.
Batteries included: MCP connector, internet and .xlsx instruments, and a wealthy library of constructing blocks for generative apps.
AI use
Doorways and GoX have been constructed by hand initially; now I take advantage of Claude Code to take care of them. It took me a couple of yr to arrange the preliminary Doorways launch, plus yet another yr to stabilize + rebuild on GoX.
Neui’s basis is written by hand additionally: the core packages, the runtime mannequin, the chat, and the principle interfaces and protocol layer. From there I used Claude Code to complete it: spec-driven work on some packages and step-by-step edits on others. It took 3 months from the begin to the present state.
P.S. To be sincere, I cant make certain whether or not anyone wants it or not. My objective was to push the boundaries of expertise, and consequently I made issues accessible to Go builders that I’m certain no ecosystem presently provides. I hope somebody sees right here the potential to construct one thing higher than what the competitors does. And oh boy, they gained’t be dissatisfied.

