# Lumi design Lumi is a small browser-first rendering layer. Its one responsibility is declarative DOM rendering. Application code describes what the DOM should show. Rendering finds, creates, moves, and updates the necessary nodes. ```text native HTML + ordinary JavaScript or TypeScript rules + a data snapshot | update(data) | minimal writes to the real DOM ``` Call `update(data)` to render a snapshot, then call it again when the snapshot changes. Data fetching, change detection, and update timing remain application concerns. This is not a framework around the browser. It is the missing mechanical step between plain data and persistent native DOM. Declarative updates work with native HTML, without relocating that HTML into JavaScript or imposing a state-management model. ## The problem it removes Without a rendering layer, application logic gradually becomes DOM logic: ```js const value = root.querySelector('.counter-value') const button = root.querySelector('.counter-increment') value.textContent = model.count button.disabled = model.count >= model.maximum button.addEventListener('click', () => { model.count += 1 value.textContent = model.count button.disabled = model.count >= model.maximum }) ``` This works, but the application now owns several unrelated concerns: - Which element displays each value. - Which DOM property must change. - When listeners are installed and removed. - Which updates must be repeated after every state change. - How nodes survive conditionals, positional list changes, and layout changes. The difficult part is not assigning `textContent` once. It is preserving the correct relationship between changing data and long-lived browser state as the page grows. Declarative JavaScript rules capture that relationship. Application code remains responsible for data and decisions. The browser remains responsible for the DOM and native behavior. Rendering provides the repetitive translation between them. ## Native HTML as an extensible substrate Let HTML describe the document. Let small, replaceable tools connect data or behavior to it. Rendering starts with HTML parsed by the browser, including native `