# The Nucleus Stack Rich HTML apps - implementing the novel [ASO architectural pattern](./adapter_state_orchestrator.md). Live demo: fully RESTful Todo app - under 50 lines of code, zero app JS, no build process. [Open the Todo App example app](./examples/todo-app/todo-app.html) β source: [HTML](./examples/todo-app/todo-app.html) Β· [Quark](./examples/todo-app/todo-app.quark) Β· [CSS](./examples/todo-app/todo-app.css) Your HTML __*is*__ the app! Drop-in custom elements that each have a single responsibility, then author CSS-derived rules that observe the page and react accordingly. The source of truth - your HTML - is what the browser paints.
No components, no virtual DOM, no second copy of application state tucked away in JS memory, and no build process.
## How it's different from existing UI solutions - **Back to the future πβ‘οΈ** Welcome back to building static HTML5 apps. A break from complex JavaScript apps that compile to HTML. - **Little to no JavaScript** You no longer need to write JS for the vast majority of UI cases. You may still call-out to your own pure functions for complex cases. - **Native++** It's real HTML. With a separate, synergistic guest: Quark. - **No magic** No special frameworks, build processes, rendering wizardry, or "HTML-in-my-JS" / "JS-in-my-HTML" DSLs. - **Progressively enhanced** Drop into existing static/server-side-rendered sites. Nucleus elements and Quark can also be used independently. - **Fully composable** Templates, templating, behavior, and custom logic are all decoupled & robust. - **Reactive State Machine** A simple, reliable, declarative syntax for your business logic - Quark. - **No reconciliation tax** No large memory copies of state/DOM to be rebuilt, diffed against the DOM, recompiled with every state change. - **Lightweight** All Nucleus elements + Quark + Neutron have a smaller footprint (just over ~50kb compressed) than some UI framework cores alone. To see it running in a production-grade app, see [Wrenfield](https://wrenfield.excom.dev) - a fictional, full-featured ecommerce site with SSG, SPA, web AR/3d models, WebAuthn, View Transitions, touch gestures, and more. Try it on mobile to get a native-like experience. Wrenfield was built with no app JS and no UI build process. ## What's in the stack - **NucleusKit elements** A growing catalog of drop-in custom elements, including: drawers, tabs, tables, lazy views, forms, routing, passkeys, data fetching, and more. - **Quark** Like CSS, for document mutation. Select elements, bind data, stamp lists, wire events, and drive state transitions with simple rules instead of imperative code. - **Valence.css** Semantic, classless CSS that caters to both native and custom elements, with themes, light/dark schemes, and design tokens. Designed for easy drop-in. Optional. - **Neutron** The small JS factory used to author the elements above. Reach for it only when the NucleusKit catalog lacks what you need. Optional. Every piece stands alone. Use one element on an existing site, or compose the whole stack into a full single-page app. `nucleus-kit` bundles it all behind one import; if you find you only use a handful of elements, install those packages Γ la carte instead (`@excom/content-drawer`, `@excom/quark-sheet`, β¦) and skip the rest. ## Why teams pick it - **Significantly less app code** This is possible for two primary reasons. First, because NucleusKit elements are fully composable, configurable, and controllable, they will likely be compatible with the desired experience of most applications that use them; there is a low likelihood you will need to build your own. Secondly, Quark enables the majority of customization without needing to invite JavaScript. - **No components** There is no "component" concept in this architecture. This allows application pieces to be maximally reusable and composable, as there is no home to entrap logic with a tightly coupled view. - **One source of truth** Live markup _is_ the primary application state, so an entire family of bugs ("the UI disagrees with the model") cannot exist. - **Fully inspectable** Open devtools and the entire application is in front of you: every value, every binding, and every transition. The state is the document/DOM, so all is plainly transparent to see, alter, and debug in your inspector. - **Accessible by default** Declarative & ARIA state is the state... not a mirror someone forgot to update. - **Human and machine friendly** Inspect this site to see its declarativeness. No more `