AFFiNE: An Open-Source, Self-Hosted Alternative to Notion and Miro
AFFiNE is an open-source workspace that merges documents, whiteboards, and databases into a single interface. Where most productivity tools force a choice between a text editor, a visual canvas, or a task board, AFFiNE treats all three as views of the same underlying data. It is local-first by default, fully self-hostable, and built on an extensible block-based editor framework called BlockSuite.
Core concepts
Documents, whiteboards, and databases
AFFiNE organizes work around three types of content that can coexist on the same canvas.
Rich documents support formatted text, Markdown syntax, code blocks with syntax highlighting, and embedded media. Infinite whiteboards allow shapes, drawings, diagrams, and freehand annotation without boundaries. Databases let you structure any collection of items as a table or Kanban board, and can be created from scratch or converted from sticky notes already on the canvas.
Edgeless mode
Edgeless mode is the feature that connects all three. When a document is switched to edgeless mode, it becomes a movable block on an infinite canvas. You can place an architecture diagram next to the API specification it describes, surround both with a Kanban board of related tasks, and embed a Figma file for the corresponding UI design, all in the same zoomable view.
This spatial organization is the primary advantage AFFiNE has over tools that keep these content types in separate files or apps.
Local-first and data ownership
AFFiNE stores data locally by default. Nothing is sent to a third-party server unless you explicitly configure cloud sync or self-hosted sync. You can work fully offline without losing functionality. The application is open-source under the MPL-2.0 license and can be deployed on your own infrastructure using Docker.
Collaborative syncing is handled by Conflict-free Replicated Data Types (CRDTs) through a framework called Y-Octo, with a Rust-based backend called OctoBase. This allows multiple users to make concurrent edits, including while offline, and have those changes merged correctly when connectivity is restored.
Self-hosting with Docker
Prerequisites
Self-hosting requires Docker and Docker Compose installed on the host machine.
Installation
Clone the AFFiNE repository:
Navigate to the self-hosting directory:
Start the services in detached mode:
After a minute or two, the instance is available at http://localhost:8080.
Creating a workspace
On first launch, open the workspace dropdown in the top-left corner, select Create workspace, give it a name, and set the workspace type to AFFiNE Self-Hosted Cloud. The workspace is now stored and managed entirely by your server.
Building a project dashboard
The combination of documents, diagrams, and databases is most useful when applied to a real workflow. The following example shows how these pieces fit together for an API development project.
Writing documentation
Creating a new document and writing an API specification works like any modern editor. Markdown headings, lists, and inline formatting are supported natively. Code blocks with syntax highlighting are added through the / command menu by selecting Code Block and choosing a language.
Visualizing architecture in edgeless mode
Switching the document to edgeless mode and zooming out reveals it as a block on an infinite canvas. The toolbar at the bottom of the canvas provides shape, pen, arrow, and text tools. An architecture diagram, such as an API gateway connected to an auth service and a database, can be drawn directly on the same canvas as the specification it describes, with no context switching required.
Converting sticky notes to a Kanban board
Sticky notes added to the canvas can be selected and converted to a database in a single step. Once converted, switching the database to Kanban view and adding columns like "To-Do," "In Progress," and "Done" gives you a task board that lives on the same canvas as the documentation and diagrams.
Embedding external content
The / command menu supports embeds for GitHub issues, Figma files, and other services. Pasting a URL creates a rich embed showing relevant metadata inline. The result is a single canvas containing the API spec, architecture diagram, task board, and any referenced designs or issues.
BlockSuite: the extensible editor framework
AFFiNE is built on BlockSuite, an open-source toolkit for building collaborative block-based editors. BlockSuite provides the page editor, the edgeless canvas editor, and all individual block types including code snippets, databases, and embeds.
Because BlockSuite is open-source and built on standard web components, developers can create custom block types. A custom block might fetch and render live data from an internal API, display a proprietary data visualization, or integrate with internal tooling. This makes AFFiNE extensible in ways that closed-source tools are not.
Comparison with similar tools
| Feature | AFFiNE | Notion | Miro | Obsidian |
|---|---|---|---|---|
| Data ownership | Local-first, self-hostable | Cloud-only | Cloud-only | Local-first |
| Offline mode | Full functionality | Limited | None | Full functionality |
| Whiteboard / canvas | Infinite, integrated | Limited | Core feature | Plugin-based |
| Databases | Integrated, Kanban support | Core feature | No | Plugin-based |
| Open source | Yes (MPL-2.0) | No | No | No |
| Extensibility | High (BlockSuite) | API, limited | API, limited | High (plugins) |
Notion's database features are currently more mature, with support for relations, rollups, and formulas that AFFiNE does not yet match. Miro's whiteboard is more polished as a standalone experience but offers no document or database functionality. Obsidian shares the local-first philosophy but relies on community plugins for whiteboarding and structured data, whereas AFFiNE includes these as core built-in features.
Current strengths and limitations
The unified canvas is the clearest reason to use AFFiNE over alternatives. The CRDT-based sync works reliably on self-hosted instances, and BlockSuite provides a real extensibility path for developers who want to build on top of the platform.
The main limitations at this stage are performance on very large canvases, which can exhibit lag or rendering issues; the relative immaturity of database features compared to Notion; and the absence of native iOS or Android apps, though the web interface functions on tablets.
Final thoughts
AFFiNE is most compelling for developers who want data ownership and offline capability alongside the visual and structural features that Notion and Miro offer separately. The self-hosted Docker setup is straightforward, and the BlockSuite framework gives it a credible path toward the kind of extensibility that a tool claiming to be a "knowledge operating system" would need.
The project is under active development. The GitHub repository tracks open issues, the roadmap, and contribution opportunities.