explaingit

toeverything/blocksuite

5,820TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A TypeScript toolkit for building block-based editors and collaborative web apps, with real-time multi-user sync built in from the start, ships a Notion-style document editor and a canvas-based whiteboard editor as ready-to-use components.

Mindmap

mindmap
  root((repo))
    What it does
      Editor building toolkit
      Real-time collaboration built in
      Grew from AFFiNE project
    Editor Components
      PageEditor block-based
      EdgelessEditor canvas
      Works with any framework
    Core Technology
      CRDT document state
      Yjs library
      TypeScript codebase
    Features
      Custom block types
      Markdown and HTML export
      Multi-instance sync
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a Notion-style block-based document editor for your web app with real-time collaborative editing included

USE CASE 2

Create a canvas-based whiteboard that combines freeform drawing with rich text editing

USE CASE 3

Add multi-user collaborative editing to any web application without building conflict resolution from scratch

USE CASE 4

Define custom block types for specialized editors like code notebooks, design docs, or structured forms

Tech stack

TypeScriptYjsWeb ComponentsCRDT

Getting it running

Difficulty · moderate Time to first run · 30min

Works as standard web components with React, Vue, or plain JS, but real-time sync requires configuring Yjs providers for your transport layer.

No license details provided in the explanation, check the repository directly before using in production.

In plain English

BlockSuite is a toolkit for building text editors and collaborative applications on the web. It is not a finished editor product that end users run directly. Instead, it is a set of building blocks that developers use to construct editors, in the same way that a word processor company might use an underlying editor framework rather than writing all the text-handling logic from scratch. The project grew out of AFFiNE, an open-source knowledge base application, and was eventually split out as a standalone project when it became clear it had value beyond its original home. The relationship is similar to how the code editor inside Visual Studio Code was eventually released separately as the Monaco Editor. BlockSuite ships two ready-to-use editor components. The PageEditor is a block-based document editor similar to what you would find in tools like Notion. The EdgelessEditor is a canvas-based editor that combines freeform drawing and graphics with the same rich text capabilities as the PageEditor. Both are implemented as web components, which means they work with any web framework, including React, Vue, or plain JavaScript, without requiring any particular setup. At its core, BlockSuite uses a technology called CRDT (specifically the Yjs library) to manage document state. CRDT is a data structure designed for situations where multiple people edit the same document at the same time. Because the framework uses it from the ground up rather than as an add-on, real-time collaboration is built into every document by default rather than being layered on afterward. Other capabilities include support for defining custom block types, importing and exporting documents in formats like Markdown and HTML, and synchronizing document state across multiple editor instances. The project is written in TypeScript and is actively developed, though the README notes it is still in an early stage.

Copy-paste prompts

Prompt 1
I want to embed the BlockSuite PageEditor into my React app to create a Notion-like document editor. Show me the minimal setup code and how to initialize a document.
Prompt 2
How do I enable real-time collaborative editing in BlockSuite so two users can edit the same document at the same time? What does the Yjs sync setup look like?
Prompt 3
I want to create a custom block type in BlockSuite for embedding code snippets with syntax highlighting. Walk me through defining the block schema and its rendering component.
Prompt 4
How do I export a BlockSuite document to Markdown and import a Markdown file back into the editor programmatically?
Prompt 5
I am building with the BlockSuite EdgelessEditor. How do I add shapes and text to the canvas from code, and how do I read back the current canvas state as JSON?
Open on GitHub → Explain another repo

← toeverything on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.