GoSPA brings Svelte-like reactive primitives (Runes, Effects, Derived) to the Go ecosystem. It is a high-performance framework for building reactive SPAs with Templ, Fiber, file-based routing, and real-time state synchronization.
Rune, Derived, Effect primitives that work exactly like Svelte 5..templ files.go-json and optional MessagePack for minimal overhead.go install github.com/aydenstechdungeon/gospa/cmd/gospa@latest
gospa create myapp
cd myapp
go mod tidy
gospa dev
// routes/page.templ
package routes
templ Page() {
<div data-gospa-component="counter" data-gospa-state='{"count":0}'>
<h1 data-bind="text:count">0</h1>
<button data-on="click:increment">+</button>
</div>
}
| Feature | GoSPA | HTMX | Alpine | SvelteKit |
|---|---|---|---|---|
| Language | Go | HTML | JS | JS/TS |
| Runtime | ~15KB | ~14KB | ~15KB | Varies |
| Reactivity | ✅ | ❌ | ✅ | ✅ |
| WS Sync | ✅ | ❌ | ❌ | ✅ |
| File Routing | ✅ | ❌ | ❌ | ✅ |
| Type Safety | ✅ | ❌ | ❌ | ✅ |
Full guides and API reference are available at gospa.onrender.com, aydenstechdungeon.github.io/gospa or in the /docs directory.