AFFiNE is an open-source, local-first knowledge base and workspace designed as a privacy-focused alternative to Notion and Miro. It unifies documents, whiteboards, tables, and embedded content into a single edgeless canvas where every element—text, shapes, databases, slides, and web embeds—is a movable block. Built with TypeScript and Rust, AFFiNE prioritizes user ownership of data by defaulting to local storage while supporting real-time collaboration across devices. The platform targets creative professionals, knowledge workers, and teams who need a flexible, no-code environment to plan, write, visualize, and organize ideas without vendor lock-in or cloud dependency.
Unlike traditional note-taking apps, AFFiNE treats all content as atomic blocks that can be freely arranged on a canvas, enabling fluid workflows from brainstorming to documentation. With built-in AI capabilities via AFFiNE AI and a growing ecosystem of templates, themes, and plugins (via Blocksuite), it empowers users to build personalized knowledge systems without switching between tools. Its self-hosting support and open architecture make it ideal for privacy-conscious individuals and organizations seeking full control over their data.
What You Get
- Hyper-fused canvas editor - Combine rich text documents, whiteboard drawings, tables, embedded web pages, and slides on a single edgeless canvas with drag-and-drop blocks that retain interactivity.
- Local-first data storage - All content is saved locally by default, ensuring user ownership and privacy; optional real-time sync allows collaboration without cloud dependency.
- Real-time collaborative editing - Multiple users can edit the same document or canvas simultaneously with live cursor tracking and change synchronization across web and desktop clients.
- AFFiNE AI integration - AI-powered tools to convert outlines into slides, summarize articles into mind maps, generate task lists from notes, and create visual prototypes with text prompts.
- Self-hosting capability - Deploy AFFiNE on your own infrastructure using Docker or source builds; follow official documentation to run the full stack locally.
- Template library - Access 50+ pre-built templates for vision boards, lesson plans, ADHD planners, SWOT analysis, and Cornell notes to jumpstart your workflow.
- Extensible via Blocksuite - Extend functionality using the open-source Blocksuite framework to build custom blocks, themes, and integrations.
Common Use Cases
- Building a personal knowledge base with visual organization - A researcher organizes papers, quotes, and diagrams on an AFFiNE canvas, linking related notes with clickable blocks and using AI to auto-generate summaries.
- Creating team project dashboards for remote teams - A product team uses AFFiNE to combine task boards (like Trello), documentation (like Notion), and whiteboard sketches (like Miro) in one shared workspace with real-time updates.
- Problem: Juggling multiple apps for notes, tasks, and visuals → Solution: AFFiNE - Users tired of switching between Notion for docs, Miro for diagrams, and Airtable for databases consolidate everything into a single editable canvas with linked blocks.
- DevOps teams managing documentation and architecture diagrams - Engineers store system diagrams, runbooks, and API specs in AFFiNE with embedded code snippets and live-updating tables for incident response workflows.
Under The Hood
AFFiNE is a collaborative document editing platform built with a modular, block-based architecture that supports rich text, visual, and data-driven content in a unified framework. It emphasizes extensibility and cross-platform compatibility through its integration of multiple languages and UI abstractions.
Architecture
This project adopts a modular monolithic design with clear separation of concerns and layered components. The architecture supports scalable block-based development while maintaining a cohesive structure across frontend and backend systems.
- Uses a block-based component model that enables flexible content composition
- Implements layered design principles to isolate core logic from UI rendering
- Supports both edgeless and document modes with unified schema handling
Tech Stack
Built as a modern web application, the project leverages a multi-language tech stack with TypeScript and Rust at its core. It integrates extensive frontend frameworks and backend tools to support collaborative editing across platforms.
- Primarily built with TypeScript and Rust, utilizing React and Preact for UI
- Relies on Blocksuite and AFFiNE frameworks for collaborative editing capabilities
- Employs Vite, Webpack, and monorepo tooling for development and build processes
- Integrates Playwright, Vitest, and Ava for comprehensive end-to-end and unit testing
Code Quality
Code quality is generally solid, with a strong emphasis on testing and linting practices. The codebase shows moderate consistency in style and naming, with some areas requiring improvement in error handling and organization.
- Comprehensive test suite covers various block types and content conversion scenarios
- Error handling is applied consistently but lacks advanced propagation in some cases
- TypeScript usage ensures type safety and improves code clarity
- Some technical debt is present in error handling and code modularity
What Makes It Unique
AFFiNE distinguishes itself through its innovative approach to content modeling and cross-platform support, combining multiple technologies in a flexible and extensible architecture.
- Implements a modular block system that unifies rich text, visual elements, and data views under one schema
- Supports multi-language runtime integration including TypeScript, Rust, Swift, and Kotlin for performance flexibility
- Offers extensible schema and adapter framework enabling easy import/export from various formats
- Provides cross-platform UI abstraction with shared components for consistent rendering across environments