Datastar is a framework for hypermedia application development that enables the creation of reactive user interfaces using declarative HTML attributes. It focuses on server-driven state management, offloading application logic and state transitions to the backend to reduce frontend complexity.
The project distinguishes itself through real-time UI streaming, using Server-Sent Events to push incremental DOM patches and state changes over a single long-lived connection. It synchronizes frontend and backend state by applying partial JSON updates to a client-side signal store and employs morphing-based DOM reconciliation to update the view while preserving element state and focus.
The framework covers a broad set of capabilities, including signal-based reactive state, sandboxed expression evaluation for dynamic attribute and class management, and the ability to execute remote scripts delivered from the server. It also provides tools for binding browser events to JavaScript expressions and connecting reactive signals to web components.