Guides server-first hypermedia architecture using Datastar, SSE streaming, and server-driven UI patterns. Covers CUBE CSS, web components, templating, and event architecture for building hypermedia applications.
Ships in preferences-web-platform-and-deployment. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This guide covers server-first hypermedia architecture for building web applications where the backend is the source of truth for both application state and UI rendering.
Primary paradigm: Server-driven UI - the server generates HTML fragments and pushes them to the browser via Server-Sent Events (SSE), eliminating client-side state management complexity.
Core philosophy (Tao of Datastar):
Contrast with SPA architectures:
Server → HTML → Browser native DOMServer → JSON → Client framework → Virtual DOM → RenderThis paradigm complements functional domain modeling by maintaining clear effect boundaries: pure domain logic (sync), application orchestration (async/SSE), and infrastructure (I/O).
Side effects should be explicit in type signatures and isolated at boundaries to preserve compositionality.
In Rust (Ironstar), the async/sync boundary is the effect boundary: if a function is async, it performs I/O; if sync, it is pure.
The Decider pattern (fmodel-rust) enforces this structurally: decide and evolve are pure synchronous functions; all I/O occurs at the axum/Zenoh boundary.
| File | Description |
|---|---|
| 01-architecture.md | Server-first philosophy, effect boundaries, HATEOAS principles, anti-patterns (client-side reactivity duplication, WASM SPAs, optimistic updates) |
| 02-sse-patterns.md | SSE protocol fundamentals, event types (PatchElements, PatchSignals), connection lifecycle, reconnection resilience, lag handling, resource cleanup |
| 03-datastar.md | Datastar framework patterns: signal system, data attributes, backend actions, SDK event types, ReadSignals pattern, real-time updates |
| 04-css-architecture.md | CUBE CSS methodology, composition primitives (Every Layout), design tokens with Open Props, cascade layers, light-dark() theming, container queries, PostCSS configuration, Light DOM requirement |
| 05-web-components.md | Thin wrapper pattern for third-party libraries (charts, editors, maps), vanilla vs Lit, morph exclusion, event design, memory cleanup |
| 06-templating.md | Type-safe server-side templating, lazy vs eager evaluation, ID strategy for morphing, security (escaping, sanitization), testing patterns |
| 07-event-architecture.md | Event sourcing with SSE, CQRS pattern for hypermedia, event log as authority, real-time projections |
| 08-analytics-data-serving.md | DuckDB analytics via async-duckdb in axum handlers, query result serialization for SSE, predicate pushdown from UI interactions, httpfs remote data access, cache strategy |
Choose hypermedia when:
For standalone documents (no server):
When the document is self-contained and does not need server state (experiments, presentations, visualizations), see preferences-hypermedia-documents for the standalone authoring patterns that share the same design system and progressive enhancement approach.
Reconsider when:
Hypermedia frameworks: Datastar, htmx, Turbo (Hotwire)
Backend SDKs (Datastar): Go, Rust, PHP, Python, .NET, Ruby, Java, Kotlin, TypeScript, Clojure
CSS architecture: Open Props (design tokens), Open Props UI (copy-paste components)
Web component approaches: Vanilla web components, Lit (for complex lifecycle management)
Templating (by language):
Reference implementations:
Ironstar (sciexp/ironstar) is the canonical Rust integration of algebraic DDD with hypermedia architecture.
It demonstrates the Decider pattern (fmodel-rust) for pure domain logic, embedded infrastructure (SQLite event store, Zenoh pub/sub, DuckDB analytics, moka cache), Open Props + CUBE CSS cascade layer architecture, hypertext lazy templates with datastar-rust SSE events, and Idris2 formal specifications for domain model verification.
See the repo's CLAUDE.md for the authoritative architectural context.
Stario (Bobowski/stario) is an illustrative Python 3.14+ framework for Datastar integration.
It demonstrates the Go-style handler pattern (Context, Writer) -> None, declarative HTML element functions, data/at Datastar attribute helpers, and the Relay in-process pub/sub system for broadcasting events across SSE connections.
preferences-web-platform-foundations - shared vocabulary: 15 web platform properties, capability ladder, paradigm routingpreferences-hypermedia-documents - standalone document authoring (presentations, experiments, visualizations) without a server backendpreferences-architectural-patterns - onion/hexagonal architecture, effect boundariespreferences-domain-modeling - functional domain modeling, smart constructorspreferences-railway-oriented-programming - Result-based error handlingpreferences-distributed-systems - event log authority, CQRS, idempotency patternspreferences-data-modeling - materialized views, DuckDB/DuckLake patternspreferences-rust-development - Rust-specific patterns (integrates with Datastar-Rust/hypertext)preferences-typescript-nodejs-development - TypeScript patterns for Node.js backendsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hypermedia, server-driven-ui, datastar, sse, server-side-rendering
6 skills in this plugin
/preferences-cloudflare-wrangler-referenceCloudflare wrangler comprehensive reference for Workers, D1, R2, and KV configuration. Load when working with Cloudflare deployment or wrangler.toml./preferences-hypermedia-documentsStandalone hypermedia document authoring with Open Props, CUBE CSS, progressive enhancement, inline SVG, MathML, scroll-snap presentations, and Lit web component islands for imperative contexts. Load when creating HTML documents, slide presentations, interactive experiments, data visualizations, or SVG diagrams without a server backend./preferences-react-tanstack-ui-developmentReact and TanStack UI development patterns including component design, routing, and state management. Load when working with React components or TanStack libraries./preferences-web-platform-and-deployment:preferences-hypermedia-developmentfrom preferences-web-platform-and-deployment
npx claudepluginhub cameronraysmith/vanixiets --plugin preferences-web-platform-and-deploymentOther plugins' skills for the same job