Back to browse
GitHub Repository

A state-layout mapping runtime where the server owns state and the client owns DOM projection. MPA pages with NDJSON streaming updates.

3 starsTypeScript

StateSurface – server-owned state and NDJSON streaming for MPA pages

by superlucky84·Mar 10, 2026·1 point·1 comment

AI Analysis

MidShip ItBold Bet

Yet another htmx/LiveView alternative in an already crowded server-UI space.

Strengths
  • NDJSON streaming for partial page updates avoids full hydration costs.
  • Four-concept model (Surface, Template, Transition, Action) keeps abstraction minimal.
Weaknesses
  • Author admits it's a prototype, not production-ready.
  • No clear differentiation from htmx, Hotwire, or Phoenix LiveView.
Target Audience

Full-stack developers exploring server-driven UI alternatives

Similar To

htmx · Phoenix LiveView · Hotwire

Post Description

Hi HN,

I built an experimental web runtime called StateSurface:

https://github.com/superlucky84/state-surface https://state-surface.subtleflo.com/

It explores a simple idea:

Server owns state. Client owns DOM projection. Pages are real MPA HTML, and in-page updates stream over NDJSON.

The model has four pieces: - Surface: HTML page shell with <h-state> anchors - Template: stateless TSX projection - Transition: server-side async generator yielding state frames - Action: declarative HTML trigger

This is not production-ready — it’s a prototype to explore whether server-owned state + streaming UI can be a useful alternative to SPA-heavy architectures.

Would love feedback, especially from people familiar with htmx, LiveView, Hotwire, or server-driven UI in general.

Similar Projects