Overview
Kuzenbo is built as a Bun workspace monorepo with strict package boundaries enforced via Turborepo tags. This architecture ensures clean separation between UI packages, build tooling, and internal dependencies.Repository layout
The monorepo follows a clear structure with apps and packages:Package categories
Kuzenbo packages fall into three categories:UI packages
User-facing component libraries:@kuzenbo/core
Primary UI component library with buttons, inputs, dialogs, and layouts.
@kuzenbo/charts
13 production-ready chart components built on Recharts.
@kuzenbo/notifications
Toast and notification system with multiple viewport positions.
@kuzenbo/date
Calendar, date picker, and date range components.
@kuzenbo/ai
AI-specific UI components for chat, completions, and tool outputs.
@kuzenbo/code
Code editor, syntax highlighting, and code snippet primitives.
@kuzenbo/datatable
Advanced data table with sorting, filtering, and pagination.
@kuzenbo/tiptap
Rich text editor built on Tiptap with markdown support.
Platform packages
Foundational runtime and tooling:@kuzenbo/theme
Theme runtime, semantic tokens, and 75+ prebuilt color themes.
@kuzenbo/styles
Optional baseline global styles for focus rings and scrollbars.
@kuzenbo/hooks
Standalone React hooks with no UI dependencies.
@kuzenbo/storybook
Shared Storybook configuration (internal only).
Experimental packages
Future-focused tooling (not yet published):@kuzenbo/cli
CLI for scaffolding and code generation.
@kuzenbo/mcp
Model Context Protocol integration.
Package boundaries
Kuzenbo enforces strict boundaries to maintain clean architecture:Core boundary rules
@kuzenbo/hooks is standalone
Must not import
@kuzenbo/core or any UI packages. Keeps hooks lightweight and framework-local.Boundary enforcement
Boundaries are verified via Turborepo tags:- Package imports respect tag boundaries
- No circular dependencies exist
- Internal packages aren’t imported by external code
Build architecture
Build tooling
Kuzenbo uses modern ESM-only builds:TypeScript bundler for all package workspaces.
No CommonJS output. Targets modern bundlers and runtimes.
Declaration files (
.d.ts) generated automatically.Multi-entry packages
Some packages export multiple entry points:package.json
@kuzenbo/core: Multiple UI component subpaths@kuzenbo/charts: Per-chart subpaths (ui/line-chart,ui/bar-chart)@kuzenbo/theme: Theme provider and CSS exports
CSS asset handling
CSS files are copied during build:tsdown.config.ts
Release architecture
Kuzenbo uses lockstep versioning with manual releases:Version management
Changesets for versioning
All packages share the same version number. Use Changesets to track changes:
Release channels
Kuzenbo supports two release channels:Production releases from
main branch. Used for final versions.Pre-release versions from
main branch. For testing before stable.Publishable packages
Only an allowlist of packages is published: Published:@kuzenbo/core@kuzenbo/charts@kuzenbo/theme@kuzenbo/styles@kuzenbo/hooks@kuzenbo/notifications
@kuzenbo/storybook(internal)@kuzenbo/website(internal)@kuzenbo/ai(blocked until promoted)@kuzenbo/code(blocked until promoted)@kuzenbo/datatable(blocked until promoted)@kuzenbo/date(blocked until promoted)@kuzenbo/tiptap(blocked until promoted)@kuzenbo/cli(placeholder)@kuzenbo/mcp(placeholder)
Trusted Publishing
Releases require GitHub Actions withid-token: write:
.github/workflows/release.yml
Documentation runtime
The docs site runs on Next.js 16 App Router:File-based routing
Documentation manifest
Navigation and metadata live indocs-manifest.ts:
docs-manifest.ts
MDX content
Docs are authored as MDX with route-localcontent.mdx files:
content.mdx
Development workflow
Run the monorepo locally:Install dependencies
Start dev server
Run the docs site with HMR for all packages:Run Storybook
Quality gates
Run all checks before committing:Scoped tasks
Run tasks for specific packages:Toolchain
Kuzenbo uses modern tooling:Bun
Runtime, package manager, and test runner. Version 1.3.9.
Turborepo
Monorepo orchestration and caching. Version 2.8.7.
React
UI framework. Version 19.2.4.
Next.js
App framework for docs site. Version 16.1.6.
TypeScript
Type system. Version 5.9.3 with
tsgo compiler.Ultracite
Linter and formatter using
oxlint and oxfmt.Design policies
Kuzenbo follows strict conventions:Component structure
One component per file inpackages/*/src/ui/<component>/:
Export contracts
Exported components must have matching props types:Import style
Use direct named imports:Color primitives
Use semantic tokens, not raw Tailwind classes:Cursor primitives
Usecursor-clickable token:
Testing strategy
Kuzenbo uses Bun’s native test runner:Test files
Place tests alongside source:Naming convention
*.spec.ts*.spec.tsxtests/directories__tests__/directories
Running tests
Best practices
Respect package boundaries
Respect package boundaries
Never import across boundary violations. Run
bun run boundaries to verify compliance.Use workspace protocol
Use workspace protocol
Reference local packages with
workspace:* in package.json:Keep public API minimal
Keep public API minimal
Only export what consumers need. Internal utilities should not be exported from package index.
Document breaking changes
Document breaking changes
Use Changesets to document breaking changes:
Related documentation
Theme runtime
Learn about the theme package architecture.
Charts
Understand chart package internals.