ToonUI
Deeper Architecture

Package Architecture

Understand how the ToonUI packages fit together and which one to adopt first.

ToonUI is split by responsibility, not by marketing.

That is a GOOD thing.

It keeps server concerns, rendering concerns, and tooling concerns from bleeding into each other.

Package map

PackageResponsibilityBest for
@toon-ui/coreProtocol, catalog, parser, validation, prompts, events, messagesServer-side contract
@toon-ui/toon-uiMain client package with default adapterFastest integration path
@toon-ui/reactExplicit React runtime and adapter APIsDesign-system ownership
@toon-ui/promptsPrompt helpers onlyCustom prompt composition
@toon-ui/cliValidation and AST toolingCI, fixtures, debugging

Default architecture

Most teams should start here:

server -> @toon-ui/core
client -> @toon-ui/toon-ui

Why:

  • minimal setup
  • clean defaults
  • fast path to a real product integration

Explicit architecture

Use this when the frontend team needs full rendering control:

server -> @toon-ui/core
client -> @toon-ui/react
adapter -> your components

Why:

  • explicit adapter ownership
  • tighter design-system integration
  • stricter coverage guarantees

How to choose

Choose @toon-ui/toon-ui if you want speed

Best when:

  • you want a working system quickly
  • the default adapter is acceptable
  • you may customize only a few components later

Choose @toon-ui/react if you want control

Best when:

  • your team already owns a component system
  • rendering standards matter a lot
  • missing coverage should be explicit

Architecture principle

The package split reflects the actual system design:

  • the server teaches the language
  • the client renders the language
  • the host app owns behavior
  • tooling validates the language

That is the real architecture.

Next step

  1. @toon-ui/core
  2. @toon-ui/toon-ui
  3. @toon-ui/react

On this page