Skip to content

Architecture

bambiui is a pnpm + Turborepo monorepo for CLI-first, source-distributed UI components.

core -> generator -> registry -> cli -> user project

packages/core contains internal DOM Protocol contracts, controllers, primitives, and tests. Controllers are vanilla TypeScript authoring inputs. They are not copied directly into user projects.

packages/generator parses internal contracts and generates framework-ready artifacts for React, Solid, Svelte 5, and Vue 3.

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.

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.

React, Solid, Svelte 5, and Vue 3 wrappers are generated from the same contracts. Framework wrappers should not add independent component behavior.