canmi21/seam

Rendering is a protocol, not a render-time computation.

41

stars

830

commits

TypeScript

primary language

Sep 10, 2026

updated

seamjs.com
codegen
ctr
injection
lowering
protocol
skeleton

README

SeamJS

Seam is a protocol that separates rendering from runtime. SeamJS is the framework that implements it — stitching together existing tools (Vite, TanStack Query, TanStack Router) where they already work, and building custom pipelines (skeleton extraction, injection engine, CLI) where they don't.

How It Works

Traditional SSR calls renderToString on every request — your entire component tree is re-evaluated, a virtual DOM is built, and the result is serialized. Even in a pure TypeScript stack, this costs ~100-300ms per page.

SeamJS moves that work to build time:

  1. Build timerenderToString runs once. The output is diffed into an HTML skeleton with typed slot markers
  2. Request time — the server resolves data loaders, then the engine fills slots via AST-based injection (~1ms)
  3. Client — hydrates the known skeleton and takes over

No component tree at request time. No virtual DOM. No renderToString. The rendering cost becomes negligible — only your data loaders matter.

This is compile-time rendering (CTR). It works with any backend language because the server never imports UI code — it only performs data injection on a pre-built template. Rust, TypeScript, and Go all share the same engine and the same protocol.

What You Get

LayerDetails
FrontendReact: client bindings, TanStack Router, filesystem router, i18n, TanStack Query, ESLint plugin
BackendRust (Axum) / TypeScript (Hono, Bun, Node) / Go (Gin, Chi, net/http) — symmetric APIs, same protocol
Proceduresquery, command, subscription, stream, upload — codegen, namespaces, context, invalidation, JTD
TransportHTTP RPC, batch RPC, SSE, WebSocket channels, stream SSE, multipart upload
RenderingCTR (compile-time), SSR (HTML slot injection), SSG (hybrid modes)
CLIbuild, generate, dev, pull, clean — virtual modules, loadBuild(), head metadata

Getting Started

Pick a standalone server example and run it:

# TypeScript (Bun)
cd examples/standalone/server-bun && bun run src/index.ts

# Rust (Axum)
cd examples/standalone/server-rust && cargo run

# Go (net/http)
cd examples/standalone/server-go && go run .

For a fullstack example with React frontend, see the GitHub Dashboard — same UI running on three interchangeable backends.

Examples

Documentation

ArchitectureUI Layer / Logic Layer / Transport Layer

ProtocolSlot / Sentinel / Manifest / Subscription / Channel / Skeleton Constraints

DevelopmentBuild commands, test matrix, prerequisites

Roadmap

Soild, Svelte and Vue frontends. Tauri and Electron desktop adapters. Serverless deployment mode. Island Mode; See the full roadmap.

The seam protocol is open — any language that serves HTTP can be a backend. PRs for new UI frameworks, backend languages, and transport adapters are welcome.

Community

License

MIT License © 2026 Canmi

Contributors

canmi21

824 commits

grtsinry43

1 commits

canmi21/seam

Rendering is a protocol, not a render-time computation.

41

stars

830

commits

TypeScript

primary language

Sep 10, 2026

updated

seamjs.com
codegen
ctr
injection
lowering
protocol
skeleton

README

SeamJS

Seam is a protocol that separates rendering from runtime. SeamJS is the framework that implements it — stitching together existing tools (Vite, TanStack Query, TanStack Router) where they already work, and building custom pipelines (skeleton extraction, injection engine, CLI) where they don't.

How It Works

Traditional SSR calls renderToString on every request — your entire component tree is re-evaluated, a virtual DOM is built, and the result is serialized. Even in a pure TypeScript stack, this costs ~100-300ms per page.

SeamJS moves that work to build time:

  1. Build timerenderToString runs once. The output is diffed into an HTML skeleton with typed slot markers
  2. Request time — the server resolves data loaders, then the engine fills slots via AST-based injection (~1ms)
  3. Client — hydrates the known skeleton and takes over

No component tree at request time. No virtual DOM. No renderToString. The rendering cost becomes negligible — only your data loaders matter.

This is compile-time rendering (CTR). It works with any backend language because the server never imports UI code — it only performs data injection on a pre-built template. Rust, TypeScript, and Go all share the same engine and the same protocol.

What You Get

LayerDetails
FrontendReact: client bindings, TanStack Router, filesystem router, i18n, TanStack Query, ESLint plugin
BackendRust (Axum) / TypeScript (Hono, Bun, Node) / Go (Gin, Chi, net/http) — symmetric APIs, same protocol
Proceduresquery, command, subscription, stream, upload — codegen, namespaces, context, invalidation, JTD
TransportHTTP RPC, batch RPC, SSE, WebSocket channels, stream SSE, multipart upload
RenderingCTR (compile-time), SSR (HTML slot injection), SSG (hybrid modes)
CLIbuild, generate, dev, pull, clean — virtual modules, loadBuild(), head metadata

Getting Started

Pick a standalone server example and run it:

# TypeScript (Bun)
cd examples/standalone/server-bun && bun run src/index.ts

# Rust (Axum)
cd examples/standalone/server-rust && cargo run

# Go (net/http)
cd examples/standalone/server-go && go run .

For a fullstack example with React frontend, see the GitHub Dashboard — same UI running on three interchangeable backends.

Examples

Documentation

ArchitectureUI Layer / Logic Layer / Transport Layer

ProtocolSlot / Sentinel / Manifest / Subscription / Channel / Skeleton Constraints

DevelopmentBuild commands, test matrix, prerequisites

Roadmap

Soild, Svelte and Vue frontends. Tauri and Electron desktop adapters. Serverless deployment mode. Island Mode; See the full roadmap.

The seam protocol is open — any language that serves HTTP can be a backend. PRs for new UI frameworks, backend languages, and transport adapters are welcome.

Community

License

MIT License © 2026 Canmi

Contributors

canmi21

824 commits

grtsinry43

1 commits

Languages

TypeScript

36.9%

Rust

33.0%

WebAssembly

12.9%

Go

12.7%

JavaScript

2.6%

Shell

1.5%