Architecture
How the core, extensions, adapters and docs fit together.
Layers
text
Your app (React / Vue / Svelte)
|
Framework adapter (@tlob/babloom-react | vue | svelte)
|
Editor core (@tlob/babloom-core)
- document model - commands
- selection - history
- extensions - serialization
|
Extensions -> starter-kit | image | link | placeholderMonorepo structure
text
babloom/
apps/
docs/ # documentation site
packages/
core/ # framework-agnostic editor
src/editor, document, commands, extensions,
selection, history, events, serialization
react/ # React adapter
vue/ # Vue 3 adapter
svelte/ # Svelte 5 adapter
examples/react | vue | svelte
pnpm-workspace.yaml
turbo.jsonDesign principles
| Name | Type | Description |
|---|---|---|
| Framework agnostic | core | Core must not depend on React, Vue or Svelte. |
| Extension first | extensions | Features are extensions, not hardcoded behaviour. |
| Document model | json | Structured JSON document of nodes and marks. |
| Commands | api | UI calls commands instead of mutating state. |
| Transactions | state | Changes flow through snapshots so history and collaboration are possible. |
| Upload abstraction | media | Image storage is delegated to a user-provided handler. |
| Framework parity | adapters | Every adapter exposes the same editor API. |
Document model
Blocks: paragraph, heading, blockquote, bullet list, ordered list, list item, image, horizontal rule. Inline: text with bold, italic, underline, strike, code and link marks.
json
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "Hello " },
{ "type": "text", "text": "world", "marks": [{ "type": "bold" }] }
]
}
]
}