gospa Svelte Themes

Gospa

A high-performance Go framework for building reactive SPAs with server-side rendering, Svelte-style reactive primitives, and seamless WebSocket state synchronization. It brings file-based routing and real-time state management to the Go ecosystem using Fiber and Templ.

GoSPA

GoSPA Logo 1 GoSPA Logo 2

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.

Highlights

  • Native Reactivity - Rune, Derived, Effect primitives that work exactly like Svelte 5.
  • WebSocket Sync - Transparent client-server state synchronization with GZIP delta patching.
  • File-Based Routing - SvelteKit-style directory structure for .templ files.
  • Hybrid Rendering - Mix SSR, SSG, ISR, and PPR on a per-page basis.
  • Type-Safe RPC - Call server functions directly from the client without boilerplate endpoints.
  • High Performance - Integrated go-json and optional MessagePack for minimal overhead.

Quick Start

1. Install CLI

go install github.com/aydenstechdungeon/gospa/cmd/gospa@latest

2. Scaffold & Run

gospa create myapp
cd myapp
go mod tidy
gospa dev

3. A Simple Page

// 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>
}

Comparison

Feature GoSPA HTMX Alpine SvelteKit
Language Go HTML JS JS/TS
Runtime ~15KB ~14KB ~15KB Varies
Reactivity
WS Sync
File Routing
Type Safety

Documentation

Full guides and API reference are available at gospa.onrender.com, aydenstechdungeon.github.io/gospa or in the /docs directory.


Apache License 2.0

Top categories

Loading Svelte Themes