AFFiNE

repository·canary·Indexed 13 days ago

https://github.com/toeverything/affine

An open-source, local-first workspace that merges document editing and visual whiteboarding into a single 'hyper-fused' platform. Built on a block-based architecture, it provides a privacy-focused alternative to Notion and Miro. The documentation covers the BlockSuite ecosystem, including extension providers for stores and views, the @blocksuite/std standard library, and the @blocksuite/std/gfx graphics API for managing visual elements and geometry.

Tokens
434.4K
Snippets
1.4K
Records
2.1K
Agent score
99%

What's inside AFFiNE

  1. Overview of BlockSuite Playground Apps

    canary

    The blocksuite/playground/apps directory contains the application entry points used for the BlockSuite playground online site. These applications serve two primary purposes:

    1. Comprehensive Examples: They demonstrate the full capabilities of the BlockSuite framework through real-world application implementations.
    2. E2E Testing Entry Points: They act as the starting points for executing End-to-End (E2E) test cases within the BlockSuite ecosystem.
  2. What is AFFiNE

    canary

    AFFiNE is an open-source, local-first, and privacy-focused workspace designed as an alternative to Notion and Miro. It functions as a hyper-fused platform that merges document editing (Docs) with an edgeless visual whiteboard (Canvas).

    Key capabilities include:

    • Merged Docs and Whiteboard: Place any building block (rich text, sticky notes, embedded web pages, databases, shapes, etc.) on an edgeless canvas.
    • Multimodal AI: Integrated AI for generating outlines, slides, mind maps, and prototypes.
    • Local-first & Collaborative: Users own their data locally while supporting real-time synchronization and collaboration across web and cross-platform clients.
    • Extensible: Supports self-hosting and is built on the Blocksuite framework.
  3. Overview of the docs-search module

    canary

    The docs-search module manages the synchronization between the document engine and the search indexer. It performs two primary functions:

    1. Subscribing to updates: It listens for changes occurring within the doc engine.
    2. Indexing content: It writes updated document content into the indexer to enable search and aggregation capabilities across the documentation.
  4. Overview of BlockSuite

    canary

    BlockSuite is a content editing tech stack designed for the web. It serves as a toolkit for building editors and collaborative applications. The ecosystem is built around three core pillars:

    1. Headless Editor Framework: A vanilla framework that allows you to design and build diverse editing interfaces without being tied to a specific UI.
    2. Extensive Components: A set of highly interoperable components built on top of the framework to help construct complex editor user interfaces.
    3. CRDT-Native Collaboration: Built with Conflict-free Replicated Data Types (CRDT) at its core, supporting native document streaming and conflict resolution for collaborative environments.
  5. What is the BlockSuite Framework?

    canary

    BlockSuite is a toolkit for building editors and collaborative applications. It functions as a UI component library built on a minimized vanilla framework runtime. Because all BlockSuite components (including editors) are native web components, they are framework-agnostic and can be easily integrated into React, Vue, or other popular frameworks.

    Key Capabilities

    • Reuse Editors: Use prebuilt editors like PageEditor (block-based document editor) and EdgelessEditor (graphics/canvas editor).
    • Extend Editors: Customize and enhance editors using a rich set of BlockSuite components.
    • Build from Scratch: Use the underlying vanilla framework to create entirely new editor types.
    • Multimodal Content: Support different view modes (text, slides, mind maps, etc.) using a consistent framework.
    • Collaboration-Ready: Built-in support for real-time collaboration and decentralized data synchronization using CRDT technology.
  6. Use the auto-generated GraphQL client

    canary
    The packages/common/graphql package provides an auto-generated GraphQL client specifically designed for interacting with the affine.pro backend. This client is intended to be used by developers building integrations or services that require type-safe communication with the AFFiNE GraphQL API.
  7. Use AFFiNE Command Abstractions for CMD-K

    canary
    The @affine/core package provides command abstractions designed for the AFFiNE framework. These abstractions are specifically intended to power the 'CMD-K' (command palette) functionality. The design pattern is heavily inspired by the VSCode Command Abstractions, allowing for a structured way to register, execute, and manage commands within the application.