AFFiNE is an all-in-one knowledge base and workspace designed for creative professionals, students, and teams who need to write, draw, and plan without switching between tools. It solves the fragmentation problem of modern productivity apps by unifying rich-text editing, visual whiteboarding, and database management into a single edgeless canvas. Built for users who value data ownership and seamless collaboration, AFFiNE is ideal for those tired of juggling Notion, Miro, and Airtable.
Technically, AFFiNE is powered by a stack of open-source components including Blocksuite for the editor, y-octo and YJS for CRDT-based real-time collaboration, and OctoBase — a Rust-built local-first database. It runs as a desktop app (Electron), web app, and mobile app, with full support for self-hosting and plugin extensibility. The architecture ensures data remains on your device by default while enabling real-time sync across devices and users.
What You Get
- Edgeless Canvas Editor - A unified workspace where rich text, sticky notes, shapes, embedded web pages, databases, and slides can be freely placed and connected on an infinite canvas without rigid layouts.
- AFFiNE AI Integration - AI-powered features that transform outlines into slides, summarize articles into mind maps, generate visual diagrams from text, and auto-complete task plans with one prompt.
- Local-First Architecture - All data is stored locally on your device by default, with optional real-time sync via encrypted cloud peers, ensuring full data ownership and offline-first functionality.
- Real-Time Collaboration - Multiple users can edit documents, whiteboards, and databases simultaneously with live cursor tracking and conflict-free synchronization powered by CRDTs (y-octo and YJS).
- Built-in Multi-View Databases - Create and visualize tables as kanban boards, calendars, galleries, or lists with linked properties, relations, and embedded views directly within the canvas.
- Self-Hosting Support - Full control over deployment with open-source code and documentation for running AFFiNE on your own server using OctoBase and Blocksuite as core dependencies.
- Template Library - Access 50+ pre-built templates for vision boards, Cornell notes, ADHD planners, itineraries, SOPs, and lesson plans, all editable and shareable within the app.
- Cross-Platform Apps - Native desktop apps for Windows, macOS, and Linux, plus web and mobile (iOS/Android) apps with synchronized data across all devices.
Common Use Cases
- Running a research knowledge base - A PhD student uses AFFiNE to link papers, draw concept maps, and store annotated PDFs in one place, with AI summarizing articles into mind maps for review.
- Managing product roadmaps - A product manager visualizes features on a whiteboard, links them to task databases, and shares live updates with engineers — all without switching from AFFiNE to Miro or Jira.
- Creating lesson plans and educational materials - A teacher builds interactive lesson plans with embedded videos, Cornell notes, and checklists, then shares editable templates with students.
- Building a personal wiki with visual connections - A freelance developer organizes code snippets, project notes, and API docs into a linked visual wiki, using the canvas to map dependencies between systems.
Under The Hood
Architecture
- Modular monorepo structure with clear separation between frontend core, blocks, gfx, and components, each encapsulated in dedicated packages with isolated stores and view extensions
- Domain-driven layered design: blocks handle UI, gfx manages rendering primitives, and core orchestrates state via Yjs with explicit dependency injection through service registries
- Strong type safety enforced via TypeScript with path aliases and strict module boundaries, ensuring clean separation between rendering, state, and persistence layers
- Native Rust backend integrated via WASM-ready crates for low-level storage and synchronization, leveraging SQLx and y-octo for persistent, collaborative data management
- Extensible plugin system using StoreExtension and ViewExtension patterns to dynamically augment features like Bookmark and Callout without modifying core logic
- Unified clipboard and serialization system that decouples data representation from UI rendering, enabling consistent cross-platform behavior
Tech Stack
- TypeScript-first monorepo built with @blocksuite and lit, powered by Vite and SWC for rapid development and React-like JSX with automatic runtime
- Rust backend utilizing SQLx for SQLite persistence, tree-sitter for language parsing, Typst for document rendering, and NAPI for Node.js bindings
- Cross-platform support via Electron and Capacitor, with native modules for file handling, media processing, and PDF/DOCX parsing
- Comprehensive testing suite with Vitest, MSW, Playwright, and Istanbul for unit, integration, E2E, and coverage testing
- Advanced tooling including oxlint, taplo, husky, and lint-staged to enforce code quality through automated linting, formatting, and pre-commit hooks
- Modular TypeScript projects with path aliases and vanilla-extract for type-safe, scoped CSS styling
Code Quality
- Extensive test coverage across unit, integration, and E2E layers, validating both UI interactions and low-level data transformations like Markdown diffing and HTML serialization
- Clear separation of concerns with isolated frontend logic in @blocksuite/affine-model and @blocksuite/store, and backend services structured with dedicated controllers and test utilities
- Robust error handling through custom error classes and structured validation, particularly in backend routes handling headers and static asset routing
- Consistent, descriptive naming conventions across domains that enhance readability and reduce cognitive load
- Strong type safety enforced throughout the codebase with precise interfaces for blocks, transformers, and request contexts, minimizing runtime errors
- Comprehensive linting and test automation integrated into CI/CD pipelines, including snapshot testing for complex state structures to ensure serialization fidelity
What Makes It Unique
- Native integration of collaborative whiteboard (Excalidraw) and document editing within a unified editor framework, enabling seamless transitions between structured content and freeform diagrams
- Proprietary block-based architecture with a unified command pipeline that allows granular manipulation of both text and graphical elements through a single interface
- Deeply embedded journaling system that auto-generates date-based documents with intelligent placeholders, transforming personal knowledge management into a structured, date-driven workflow
- URL-based deep linking that encodes selection state directly in shareable URLs, enabling precise sharing of partial content without server-side dependencies
- Decoupled, service-oriented architecture using dependency injection to enable modular feature development while maintaining consistent state across web and desktop editions
- Unified embedding system that abstracts provider-specific logic for diverse content (Bilibili, Spotify, Miro) into reusable, maintainable components