How dan2dev/nuclo works
Nuclo is a lightweight, type-safe DOM framework centered on explicit updates to real DOM nodes. The principal workflow is to build UI with element and state-dependent builders, mutate ordinary JavaScript state, then call update() to synchronize registered values. Its broader capabilities include keyed lists, conditional rendering, atomic CSS, server rendering, hydration, and a DOM polyfill. The repository also includes a project scaffolder and full-stack proof-of-concept apps. Internal links below are limited to documented behavior or source-index references; unsampled implementation details are not inferred.
Main entry points: runtime.ts Keyed lists · render.ts Client rendering · factory.ts Element builders · reactive-text.ts Reactive values
Components 18
UI Construction
- Element builders
packages/nuclo-core/src/element/factory.ts - Attributes and events
packages/nuclo-core/src/element/attributes.ts - Conditional blocks
packages/nuclo-core/src/when/runtime.ts - Keyed lists
packages/nuclo-core/src/list/runtime.ts
Update Runtime
- Reactive values
packages/nuclo-core/src/update/reactive-text.ts - Update registry
packages/nuclo-core/src/update/registry.ts - Update scopes
packages/nuclo-core/src/update/scope.ts - Lifecycle hooks
packages/nuclo-core/src/element/lifecycle.ts - DOM utilities
packages/nuclo-core/src/shared/dom.ts
Rendering
- Client rendering
packages/nuclo-core/src/render.ts - String rendering
packages/nuclo-core/src/ssr/render-to-string.ts - Hydration
packages/nuclo-core/src/hydration.ts - DOM polyfill
packages/nuclo-core/src/polyfill/index.ts
Styling
- Atomic CSS
packages/nuclo-core/src/style/engine.ts
Project Setup
- Project scaffolder
packages/create-nuclo/src/create-nuclo.mjs
Other components
- App developer
- Browser DOM
- SSR host
Connections 20
- App developer → Element builders: builds UI
README.md - Element builders → Attributes and events: applies attributes
- App developer → Update registry: calls update
README.md - Update registry → Reactive values: reevaluates values
README.md - Reactive values → Browser DOM: updates DOM
README.md - App developer → Conditional blocks: declares conditions
README.md - App developer → Keyed lists: declares lists
README.md - Keyed lists → Update scopes: uses scopes
packages/nuclo-core/src/list/runtime.ts - Keyed lists → Lifecycle hooks: checks registrations
packages/nuclo-core/src/list/runtime.ts - Keyed lists → DOM utilities: cleans removed nodes
packages/nuclo-core/src/list/runtime.ts - Client rendering → Hydration: claims existing nodes
packages/nuclo-core/src/render.ts - Client rendering → Lifecycle hooks: flushes mounts
packages/nuclo-core/src/render.ts - Client rendering → DOM utilities: removes stale nodes
packages/nuclo-core/src/render.ts - App developer → Client rendering: mounts component
README.md - SSR host → String rendering: renders HTML
README.md - String rendering → Hydration: provides markup for
README.md - SSR host → DOM polyfill: loads polyfill
- App developer → Atomic CSS: defines styles
README.md - App developer → Project scaffolder: requests project
README.md - Project scaffolder → App developer: creates starter
README.md