Coder Social home page Coder Social logo

goal-driven / blocksuite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toeverything/blocksuite

0.0 0.0 0.0 17.91 MB

๐ŸŽจ BlockSuite is the toolkit for composing collaborative editing applications.

Home Page: https://blocksuite.io

License: Mozilla Public License 2.0

Shell 0.04% JavaScript 0.12% TypeScript 99.58% CSS 0.15% HTML 0.08% Vue 0.02%

blocksuite's Introduction

BlockSuite

BlockSuite logo and name

Codecov Checks Status Issues Closed NPM Latest Release NPM Nightly Release Open in StackBlitz Join Discord


Overview

BlockSuite is an open-source toolkit for diverse content editing. It allows you to compose your collaborative editing applications. This repository contains two essential parts:

By using BlockSuite, you can:

  • Reuse and extend block-based editors, like document editor and whiteboard editor.
  • Define custom blocks that could be shared across these editors.
  • Synchronize editor states over different providers (IndexedDB, WebSocket, BroadcastChannel, etc.) while automatically resolving merge conflicts.
  • Support document snapshot, clipboard, and interoperability with third-party formats through a universal data transforming model.
  • Fully construct your own block-based editor from scratch.

The major packages in BlockSuite include the following:

  • @blocksuite/store: CRDT-driven block state management, enabling editors to have built-in conflict resolution and time travel capabilities.
  • @blocksuite/block-std: The standard toolkit for working with editable blocks, including selections, events, services, commands and more.
  • @blocksuite/lit: The default view layer for rendering blocks and widgets as web components. It's built on top of lit and the headless block-std, and could be replaced by alternative frameworks.
  • @blocksuite/virgo: Atomic rich text component used in BlockSuite. Every editable block could hold its own virgo instances, leveraging the store to reconcile the block tree.
  • @blocksuite/blocks: Editable first-party blocks under the affine scope. The default AFFiNE editors are simply different implementations of the affine:page blocks.
  • @blocksuite/presets: The ready-to-use editors composed by blocks.
  • @blocksuite/playground: Default editor playground with local-first data persistence and real-time collaboration support.

Why BlockSuite?

  • ๐Ÿงฌ CRDT-Native Collaboration: At the heart of BlockSuite is its native use of CRDTs (Conflict-free Replicated Data Types) as the single source of truth for data flow. This design sets it apart from traditional editors that often graft on real-time collaboration. By integrating CRDTs at its core, BlockSuite inherently supports advanced features like time travel (undo/redo) and automatic conflict resolution. This means smoother, more reliable collaborative editing without the need for additional layers or complex integrations.
  • ๐Ÿงฉ Rich Text Orchestration Across Blocks: BlockSuite diverges from the conventional monolithic rich text edit model. It enables each block to support its own atomic rich text component. This allows for granular control and flexibility in editing, which is especially powerful in complex documents where different sections require varied formatting and features.
  • ๐ŸŽจ Reusable Blocks Across Editors: BlockSuite provides great interoperability of custom blocks across different editor types (document, whiteboard, etc.). This allows for a more consistent and efficient use of blocks, simplifying the development process by enabling the same block to function seamlessly in various editing environments.
  • ๐Ÿ”Œ Plug-and-Play Data Synchronization: BlockSuite simplifies data synchronization with its provider-based approach. Connecting an editor instance to a provider automatically enables data synchronization. It supports incremental data sync, meaning only the changes are transmitted, enhancing efficiency and performance. It eliminates the need for explicit requests or complex synchronization logic, streamlining DX and ensuring data consistency across collaborative environments.

๐Ÿšง BlockSuite is currently in beta, with some extension capabilities still under refinement. Hope you can stay tuned, try it out, or share your feedback!

Getting Started

To learn how to start using BlockSuite, visit blocksuite.io.

Resources

Building

See BUILDING.md for instructions on how to build BlockSuite from source code.

Contributing

BlockSuite accepts pull requests on GitHub. Before you start contributing, please make sure you have read and accepted our Contributor License Agreement. To indicate your agreement, simply edit this file and submit a pull request.

License

MPL 2.0

blocksuite's People

Contributors

doodlewind avatar lawvs avatar himself65 avatar flrande avatar zqran avatar saul-mirone avatar regischen avatar zuoxiaodong0815 avatar donteatfriedrice avatar fundon avatar fourdim avatar qishaoxuan avatar zzj3720 avatar thorseraq avatar doouding avatar saikasakura avatar alt1o avatar devlzl avatar diamondthree avatar jimmfly avatar ayushagrawal-a2 avatar darkskygit avatar innei avatar pengx17 avatar rajeevdash007 avatar zhengjitf avatar fi3ework avatar perfectpan avatar pionxzh avatar catsjuice avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.