Architecture
bambiui is a pnpm + Turborepo monorepo for CLI-first, source-distributed UI components.
Active flow
Section titled “Active flow”core -> generator -> registry -> cli -> user projectpackages/core contains internal DOM Protocol contracts, controllers, primitives, and tests. Controllers are vanilla TypeScript authoring inputs. They are not copied directly into user projects.
Generator
Section titled “Generator”packages/generator parses internal contracts and generates framework-ready artifacts for React, Solid, Svelte 5, and Vue 3.
Registry
Section titled “Registry”packages/registry contains generated public artifacts and CSS. The public registry.json is version 2 and may reference only files safe for direct CLI copying.
packages/cli publishes the bambiui executable. Commands such as init and add copy public registry files into the user’s application.
State model
Section titled “State model”Component state and styling use serializable data-* attributes. Do not put callbacks, objects, or functions into data-*.
Controlled mode and uncontrolled mode differ intentionally:
- Controlled controllers fire
bambi:<event-name>and do not mutate source state. - Uncontrolled controllers manage source state and fire events.
Framework parity
Section titled “Framework parity”React, Solid, Svelte 5, and Vue 3 wrappers are generated from the same contracts. Framework wrappers should not add independent component behavior.