Skip to content
STACK IT FAST

AFFiNE vs AppFlowy

Architecture comparison 2 projects Built from source-audited deep dives

Both are local-first Notion alternatives built on CRDT documents. AFFiNE is a TypeScript and React app on the BlockSuite editor, with Rust native modules and a NestJS + PostgreSQL server that syncs Yjs updates; AppFlowy is a Flutter app whose logic lives in an in-process Rust core, syncing through the separate AppFlowy Cloud project.

AFFiNE
TypeScript · NOASSERTION
AppFlowy
Dart · AGPL-3.0
Updated
2026-09-26

Which one should you pick?

Pick AFFiNE if…
  • You want docs, whiteboard and database views on one document model
  • Your team works in TypeScript and React
  • You want to self-host the sync server from the same repository
Pick AppFlowy if…
  • You want a native Flutter client with its logic in Rust
  • You want AI chat over your documents that runs locally against Ollama
  • Single-user use with nothing to host is enough for you

Side by side

Attribute AFFiNE AppFlowy
Written in TypeScriptRust DartRust
License NOASSERTION AGPL-3.0
Frontend ReactTypeScriptBlockSuiteYjsvanilla-extract FlutterDartAppFlowy Editoreasy_localization
Backend & APIs NestJSGraphQLSocket.IORustOpenTelemetry RustTokioProtocol BuffersDart FFIWebAssembly
Data & persistence PostgreSQLPrismaRedisSQLiteS3 SQLiteCRDT (collab)Tantivy
Infrastructure & deploy DockerKubernetesRenderSentry DockerCodemagic
Key decisions
  • One CRDT document model for docs, whiteboard and tables
  • Local-first storage, with the server as a sync peer
  • Rust for the hot paths, exposed through napi-rs and uniffi
  • Flutter UI on top of a Rust core, joined by FFI and protobuf
  • Local-first storage in SQLite with CRDT documents
  • The editor is its own open-source package
Audited 2af3077 · 2026-09-17 5cf3a36 · 2026-09-17

How they differ

Client

AFFiNE is a React app whose editor is BlockSuite, built on Lit web components and Yjs; a single web core is reused by the web, Electron and Capacitor shells. AppFlowy is a Flutter app with flutter_bloc for state; the Dart code never touches storage or the network directly but sends protobuf events over FFI to the flowy-* Rust crates.

Storage and sync

AFFiNE persists documents locally (SQLite through Rust on desktop and mobile, IndexedDB in the browser) and syncs Yjs updates over Socket.IO to a NestJS server that stores them in PostgreSQL through Prisma, with Redis for caching and multi-instance rooms. AppFlowy stores data in SQLite through Diesel and models it with collab-* CRDT crates, so the same data can sync through AppFlowy Cloud without a rewrite.

Native code and AI

AFFiNE uses Rust for hot paths and exposes it through napi-rs to Node and Electron and through uniffi to mobile. AppFlowy’s backend is Rust in-process on a Tokio runtime, and its flowy-ai crate embeds ollama-rs and a local vector store so chat over documents can run on the desktop.

Architecture diagrams

AFFiNE Open SVG
AFFiNE architecture diagramWeb app → Server (GraphQL); Web app → Doc sync (Yjs updates); Desktop & mobile → Local store (local-first); Desktop & mobile → Doc sync (Yjs updates); Server → PostgreSQL (Prisma); Doc sync → Redis (adapter); Server → Blob storage (blobs); Server → Native modules (hot paths)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGEWeb appReact · BlockSuiteDesktop & mobileElectron · CapacitorServerNestJS · GraphQLDoc syncSocket.IONative modulesRust · napi-rsLocal storeSQLite (nbstore)PostgreSQLPrismaRediscache · pub/subBlob storageS3-compatibleGraphQLYjs updatesYjs updateshot pathsPrismaadapterblobslocal-first
AppFlowy Open SVG
AppFlowy architecture diagramAppFlowy app → dart-ffi (events); AppFlowy Editor → dart-ffi (document ops); dart-ffi → Rust core (dispatch); Rust core → SQLite (persist); Rust core → Collab CRDTs (documents); Rust core → Local AI (chat · retrieval); Rust core → Search (index); Collab CRDTs → AppFlowy Cloud (sync)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGEEXTERNALAppFlowy appFlutter · DartAppFlowy Editorblock editor packagedart-ffiprotobuf over FFIRust coreflowy-* crates · TokioLocal AIflowy-ai · OllamaSearchflowy-search · TantivySQLiteDiesel · sqlite-vecCollab CRDTscollab-* cratesAppFlowy Cloudoptional syncdispatcheventsdocument opschat · retrievalindexsyncpersistdocuments

Frequently asked questions

Do AFFiNE and AppFlowy work offline?

Yes. AFFiNE stores documents in SQLite through its Rust nbstore crate on desktop and mobile, and in IndexedDB in the browser, with the server acting as a sync peer. AppFlowy stores everything on the device in SQLite and models content with CRDT crates, so offline use is the default.

What do I need to self-host AFFiNE or AppFlowy?

AFFiNE ships a self-host compose setup and images for its NestJS server, which needs PostgreSQL and Redis, plus a persistent disk or S3-compatible storage for uploaded blobs. AppFlowy is a client application; teams that want sync run AppFlowy Cloud, a separate server project.

Which license does each use?

AppFlowy is AGPL-3.0. For AFFiNE, GitHub reports the license as "Other" while package.json declares MIT and both LICENSE and LICENSE-MIT files exist, so check both files before reusing code.