CONCEPTS FEATURE
Interactive HTML
Components dispatch backend events without leaving the SSR component model. A component declares its event contract; the server signs it and runs the handler.
Interactive HTML
The moment a page needs to do something — validate a field, toggle a state, submit an action — most teams escape into per-feature endpoints and hand-written fetch glue. That glue is a second interaction architecture, and it grows without a contract.
Semitexa keeps interaction inside the component model. A component declares its backend events with #[UiOn(part, event)], and the framework wires the whole round-trip.
The signed round-trip
On render, the server emits a signed, inert event manifest into the DOM — the handler method name and class never leave the server. One tiny capture-only runtime watches for matching events and posts exactly { ctx, dispatchId, payload } to POST /__ui/dispatch. The dispatcher verifies the signature, guards replays, runs the handler, and returns DOM patches scoped to the firing instance.
The result is interactivity with no escape hatch: no per-feature endpoint to secure, no client-held routing table to tamper with, no second framework owning interaction. The only thing a browser can do is ask the server — over one signed, replay-guarded channel — to run the handler the server already chose. Type in the field above and watch the server's reply patch back in.
How it works
A #[UiOn(part, event)] method is the handler for an event. The server emits a signed, inert event manifest into the DOM; one tiny capture-only runtime posts matches to POST /__ui/dispatch; the dispatcher verifies the signature, runs the handler, and returns DOM patches scoped to the firing instance. Type in the field below — each keystroke round-trips to the server and back.
Why it matters
Interactivity with no escape hatch: no per-feature endpoint to secure, no client-held routing to tamper with, no second framework owning interaction — just signed requests to run the handler the server already chose.