{"id":45844022,"url":"https://github.com/aydenstechdungeon/gospa","last_synced_at":"2026-04-23T18:01:07.740Z","repository":{"id":340247373,"uuid":"1163802692","full_name":"aydenstechdungeon/gospa","owner":"aydenstechdungeon","description":"A high-performance Go framework for reactive SPAs with SSR, Svelte-like reactivity, real-time WebSocket sync, and file-based routing using Fiber and Templ.","archived":false,"fork":false,"pushed_at":"2026-04-21T04:20:36.000Z","size":284658,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T06:42:05.497Z","etag":null,"topics":["fiber","framework","fullstack","go","golang","isr","ppr","reactivity","real-time","realtime","spa","ssg","templ","web","webframework","websockets"],"latest_commit_sha":null,"homepage":"https://gospa.onrender.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aydenstechdungeon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-22T06:59:26.000Z","updated_at":"2026-04-21T04:20:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aydenstechdungeon/gospa","commit_stats":null,"previous_names":["aydenstechdungeon/gospa"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/aydenstechdungeon/gospa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fgospa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fgospa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fgospa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fgospa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aydenstechdungeon","download_url":"https://codeload.github.com/aydenstechdungeon/gospa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fgospa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32191873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T15:28:30.493Z","status":"ssl_error","status_checked_at":"2026-04-23T15:28:29.972Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fiber","framework","fullstack","go","golang","isr","ppr","reactivity","real-time","realtime","spa","ssg","templ","web","webframework","websockets"],"created_at":"2026-02-27T01:09:33.886Z","updated_at":"2026-04-23T18:01:07.734Z","avatar_url":"https://github.com/aydenstechdungeon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoSPA (Alpha)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/9e9d126d-8c91-465a-a5c0-968e41c095fb\" width=\"128\" height=\"128\" alt=\"GoSPA Logo 1\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/338c5be2-9ce1-4f7a-a389-bfe176c6a9d6\" width=\"128\" height=\"128\" alt=\"GoSPA Logo 2\"\u003e\n\u003c/div\u003e\n\nGoSPA (Go Spa and Go S-P-A are the only valid pronunciations)  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.\n\n## Table of Contents\n\n- [GoSPA (Alpha)](#gospa-alpha)\n  - [Table of Contents](#table-of-contents)\n  - [Highlights](#highlights)\n  - [Quick Start](#quick-start)\n    - [0. Prerequisites](#0-prerequisites)\n    - [1. Install CLI](#1-install-cli)\n    - [2. Scaffold \\\u0026 Run](#2-scaffold--run)\n    - [3. A Simple SFC](#3-a-simple-sfc)\n  - [Comparison](#comparison)\n  - [Recommended Production Baseline](#recommended-production-baseline)\n  - [Documentation](#documentation)\n  - [Accessibility (A11y)](#accessibility-a11y)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Highlights\n\n- **Native Reactivity** - `Rune`, `Derived`, `Effect` primitives that work exactly like Svelte 5.\n- **WebSocket Sync** - Transparent client-server state synchronization with GZIP delta patching.\n- **SFC System** - Single File Components (`.gospa`) with scoped CSS and Go-based logic.\n- **File-Based Routing** - SvelteKit-style directory structure for `.templ` and `.gospa` files.\n- **Hybrid Rendering** - Mix SSR, SSG, ISR, and PPR on a per-page basis.\n- **Type-Safe RPC** - Call server functions directly from the client without boilerplate endpoints.\n- **High Performance** - Integrated `go-json` and optional MessagePack for minimal overhead.\n\n## Quick Start\n\n### 0. Prerequisites\n- **Go 1.26.0+** (matches `go.mod`; use a current stable toolchain)\n- **Node.js Tooling**: **Bun** is preferred for the client-side build process (zero-config JS bundling, CSS extraction). **pnpm** and **npm** are supported as fallbacks using `esbuild`, but Bun remains the recommended choice for maximum performance.\n- **`JWT_SECRET`**: Ensure this environment variable is set for production authentication contexts (when using the Auth plugin).\n\n### 1. Install CLI\n```bash\ngo install github.com/aydenstechdungeon/gospa/cmd/gospa@latest\n```\nor\n```bash\ngo run github.com/aydenstechdungeon/gospa/cmd/gospa@latest\n```\n\n### 2. Scaffold \u0026 Run\n```bash\ngospa create myapp\ncd myapp\ngo mod tidy\ngospa doctor\ngospa dev\n```\nor\n```bash\ngo run github.com/aydenstechdungeon/gospa/cmd/gospa@latest create myapp\ncd myapp\ngo mod tidy\ngo run github.com/aydenstechdungeon/gospa/cmd/gospa@latest doctor\ngo run github.com/aydenstechdungeon/gospa/cmd/gospa@latest dev\n```\n\n\u003e For local client/runtime tooling, **Bun is strongly preferred**. The GoSPA CLI provides fallbacks for `pnpm` and `npm` using `esbuild`, but Bun's integrated bundler is the authoritative development target.\n\n### 3. A Simple SFC\n```svelte\n// islands/Counter.gospa\n\u003cscript lang=\"go\"\u003e\n  var count = $state(0)\n  func increment() { count++ }\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cbutton on:click={increment}\u003e\n    Count is {count}\n  \u003c/button\u003e\n\u003c/template\u003e\n\n\u003cstyle\u003e\n  button { padding: 1rem; border-radius: 8px; }\n\u003c/style\u003e\n```\n\nGoSPA automatically compiles this to a reactive Templ component and a TypeScript hydration island.\n\n## Comparison\n\n| Feature | GoSPA | HTMX | Alpine | SvelteKit | MoonZoon |\n| :-- | :--: | :--: | :--: | :--: | :--: |\n| **Language** | Go | HTML | JS | JS/TS | Rust |\n| **Runtime** | ~15KB | ~14KB | ~15KB | Varies | ~27KB |\n| **App Speed** | Very High | High | High | Very High | Very High |\n| **DX Speed** | High | Very High | Very High | High | Moderate |\n| **Reactivity** | ✅ | ❌ | ✅ | ✅ | ✅ |\n| **WS Sync** | ✅ | ❌ | ❌ | ✅ | ✅ |\n| **File Routing** | ✅ | ❌ | ❌ | ✅ | ❌ |\n| **Type Safety** | ✅ | ❌ | ❌ | ✅ | ✅ |\n\nGoSPA Docs page (gospa.onrender.com - free hosting)\n\u003cimg width=\"693\" height=\"29\" alt=\"Screenshot_20260415_184459-1\" src=\"https://github.com/user-attachments/assets/ae973cae-26fc-4ebf-9290-7be3b966d286\" /\u003e\n\nSvelteKit Docs page (svelte.dev/docs/kit/introduction)\n\u003cimg width=\"687\" height=\"25\" alt=\"Screenshot_20260415_184329\" src=\"https://github.com/user-attachments/assets/8cc0b88d-3b61-49ae-92cf-aa0e289e6f19\" /\u003e\n\n\n## Recommended Production Baseline\n\nStart from `gospa.ProductionConfig()` and tighten only what your app needs:\n\n```go\nconfig := gospa.ProductionConfig()\nconfig.AllowedOrigins = []string{\"https://example.com\"}\nconfig.AppName = \"myapp\"\n```\n\nFor prefork deployments, add external `Storage` and `PubSub` backends so state and realtime traffic stay consistent across workers.\n\nDynamic HTML (`data-bind=\"html:*\"` and stream HTML chunks) is escaped by default in the runtime. If you need to render raw HTML, only use trusted server-controlled content.\n\n## Documentation\n\nExplore the full GoSPA documentation:\n\n- Source of truth policy: `docs/**` is canonical; website docs pages (`website/routes/docs/**`) must mirror this content and route taxonomy.\n- When in doubt, update `docs/README.md` first, then sync website routes and search index.\n\n- [**Reactive Primitives**](docs/reactive-primitives.md) - `Rune`, `Derived`, `Effect`, and `EffectScope`.\n- [**State Management**](docs/state-management.md) - Server-to-client state synchronization.\n- [**File-Based Routing**](docs/routing.md) - Layouts, pages, and rendering strategies.\n- [**Route Parameters**](docs/params.md) - Dynamic route segments.\n- [**Remote Actions**](docs/api/remote-actions.md) - Type-safe RPC between client and server.\n- [**WebSocket \u0026 Real-time**](docs/api/websocket.md) - High-performance state sync.\n- [**Server-Sent Events**](docs/api/sse.md) - Lightweight real-time notifications.\n- [**Plugin Architecture**](docs/plugins.md) - Extending the framework.\n- [**DevTools \u0026 Debugging**](docs/devtools.md) - Error overlays and HMR.\n- [**Client Runtime**](docs/internals/runtime.md) - Tiered runtime internals.\n- [**API Reference**](docs/api.md) - Fiber and Client API details.\n\n## Accessibility (A11y)\n\nBuilding accessible SPAs is a first-class citizen in GoSPA:\n\n- **Live Announcer**: Use `GoSPA.announce(\"Message\")` to trigger screened reader notifications.\n- **Focus Management**: Built-in utilities for focus trapping and restoration during navigation.\n- **ARIA Helpers**: Lightweight helpers for managing ARIA attributes and roles reactively.\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).\n\n## License\n\nGoSPA is licensed under the [Apache-2.0 license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenstechdungeon%2Fgospa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faydenstechdungeon%2Fgospa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenstechdungeon%2Fgospa/lists"}