Why Aegis

You have a server that renders HTML and you want parts of the page to be alive: a search box, a form with validation, a table, a cart. The usual answer is a bundler, a component framework and a second rendering stack. Aegis is the other answer, and its neighbours are the other libraries that live inside server HTML.

Aegis Alpine Petite-Vue htmx Stimulus Lit
Build step none none none none none (or a bundler) usually a bundler
Size, gzip 30 KB islands + templates (7 KB signals, 93 KB everything) 15 KB 6 KB 14 KB 11 KB 16 KB
Server HTML adopted as is; swap() morphs fragments; islands survive swaps directives on the markup directives on the markup swapped as strings controllers on the markup replaced by shadow DOM
Reactivity signals, computeds, effects; glitch-free, batched proxy + directives proxy + directives none (server round-trip) none (imperative) properties → re-render
Templates html`` in JavaScript, parsed once, CSP-safe; keyed list() x-for / x-text in HTML v-for / {{ }} in HTML HTML from the server targets in HTML html`` (lit-html)
Data resource(): cache, revalidation, ETag, offline, optimistic patches none none requests per attribute none none
Forms Constraint Validation, schemas, 422 mapping, wizards, drafts none none server-side none none
Navigation Navigation API router, boost() for server pages, View Transitions none none hx-boost Turbo none
Dev warnings 60+ codes: what / why / fix, source position none none none none none

The honest reading of the table: Alpine and Petite-Vue are smaller and fine for a dropdown; htmx is the right call when the server can render every state; Aegis is for the pages where you would otherwise reach for a component framework — a table with search and paging, a form with server errors, a cart, an admin screen — and want to keep the server templates.

Aegis is not a React replacement. If you have a single-page application, a React team and a component ecosystem you rely on, stay there. The comparison that matters for Aegis is “bundler + framework + data library on top of a server app” against “one file inside the server app”, and the same todo list is 18 lines in Aegis, 22 in React and 18 in Vue: see it side by side in the playground (tab “vs React / Vue”).

Edit this page on GitHub