Stew โ€” Hybrid Isomorphic

Cook your Go apps
with zero friction.

The opinionated Go meta-framework. .stew templates, file-based routing, and hybrid isomorphic Wasm.
Server and client, both compiled in Go.

$ go install github.com/ZiplEix/stew@latest
๐Ÿ“

File-Based Routing

Your pages/ directory is your router. Create @page.stew and your route is live. Zero configuration.

๐Ÿงฑ

Typed Components

Go components with structured Props and slots, importable directly into your templates.

โšก

Isomorphic Wasm

Write client-side Go in <goscript client> blocks. Automatically compiled to WebAssembly via TinyGo.

๐Ÿ”ฅ

Hot Morphing

Instant browser reload via SSE. Maintains focus, scroll position, and DOM state using idiomorph.

๐Ÿ”—

Built-in HTMX

Native server-side partial updates with HTMX. Stew handles partial rendering transparently.

๐Ÿงน

Clean Tracker

Stew tracks every generated file in .stew/. A stew clean performs a precise, risk-free cleanup.

Hybrid Architecture

One .stew file, two execution environments.

pages/@page.stew
<goscript>
    // โ† Executed on the SERVER (Native Go)
    title := "Hello"
    users := db.FindAll()
</goscript>

<goscript client>
    // โ† Compiled to WASM (TinyGo)
    count := 0
    wasm.OnUpdate(func() { ... })
</goscript>

<span class="token-tag"><h1></span>{{ title }}<span class="token-tag"></h1></span>
<span class="token-tag"><div</span> <span class="text-amber-300">bind:content</span>={{ count }}<span class="token-tag">></span>0<span class="token-tag"></div></span>
<span class="token-tag"><button</span> <span class="text-indigo-300">on:click</span>={{ count++ }}<span class="token-tag">></span>+<span class="token-tag"></button></span>
๐Ÿ–ฅ๏ธ Server โ†’ Native Go

Compiles to stew.page.go. SSR, DB access, and standard Go imports.

๐ŸŒ Client โ†’ WebAssembly

Compiled via TinyGo to .wasm. 60FPS reactivity loop with automatic DOM bindings.

๐Ÿ”’ Strict Isolation

Both contexts are isolated. Communication happens via JSON serialization (stew-pagedata).