Overview
Discover what makes AFFiNE powerful
AFFiNE Community Edition is a self‑hosted, privacy‑first KnowledgeOS that fuses rich text editing, free‑form canvas drawing, and relational databases into a single data model. At its core the application exposes every piece of content—pages, blocks, assets—as an immutable entity stored in a local or cloud‑backed database. The UI is built with modern web technologies, while the backend runs as a lightweight Node.js service that can be deployed behind any reverse proxy or container orchestrator.
Hyper‑merged canvas
Multi‑modal AI integration
Offline‑first persistence
Real‑time collaboration
Overview
AFFiNE Community Edition is a self‑hosted, privacy‑first KnowledgeOS that fuses rich text editing, free‑form canvas drawing, and relational databases into a single data model. At its core the application exposes every piece of content—pages, blocks, assets—as an immutable entity stored in a local or cloud‑backed database. The UI is built with modern web technologies, while the backend runs as a lightweight Node.js service that can be deployed behind any reverse proxy or container orchestrator.
Key Features
- Hyper‑merged canvas – Any block type (text, table, diagram, embedded web page) can be placed on an edgeless canvas and linked to other blocks via bi‑directional links.
- Multi‑modal AI integration – Built‑in prompt engine that augments writing, diagramming, and data analysis without leaving the editor.
- Offline‑first persistence – Uses a local SQLite store for single‑user mode and a PostgreSQL/SQLite hybrid for multi‑tenant deployments, ensuring data is always available.
- Real‑time collaboration – WebSocket‑based CRDT engine that synchronizes changes across multiple clients with conflict resolution.
Technical Stack
| Layer | Technology |
|---|---|
| Frontend | React + TypeScript, Vite bundler, Redux‑Toolkit for state, Monaco/ProseMirror for rich text |
| Backend | NestJS (TypeScript) REST & WebSocket API, TypeORM ORM |
| Database | SQLite (local), PostgreSQL (cloud) – schema‑less JSONB columns store block trees |
| Containerization | Docker images for affine-server and affine-web; Helm chart for Kubernetes |
| CI/CD | GitHub Actions with Apple Silicon runners (Runblaze) for fast builds |
Core Capabilities
- Extensible API – Exposes CRUD endpoints (
/api/v1/blocks,/api/v1/assets) and a GraphQL gateway for advanced queries. - Plugin SDK – JavaScript/TypeScript plugin system that allows developers to add custom block types, UI panels, or automation hooks.
- Webhooks – Trigger external services on events such as block creation, page deletion, or database updates.
- Export/Import – Supports JSON/YAML dumps and Markdown conversion for migration or backup.
Deployment & Infrastructure
- Self‑hosting – Run the Docker stack on any Linux, macOS, or Windows host; optional Docker‑Compose files are provided.
- Scalability – Horizontal scaling achieved by separating the web server from the database; stateless API instances behind a load balancer.
- High‑availability – PostgreSQL can be clustered (Patroni, Patroni‑Postgres) and Docker Swarm/Kubernetes provide rolling updates.
- Observability – Prometheus metrics exposed on
/metrics; logs are JSON‑structured for ELK/Graylog ingestion.
Integration & Extensibility
- Plugin ecosystem – Third‑party plugins can register new block types, UI components, or data processors via a simple JSON manifest.
- OAuth & SSO – Supports OpenID Connect for enterprise authentication; can be plugged into LDAP or custom auth providers.
- Custom connectors – REST and GraphQL endpoints allow integration with external knowledge bases, CI/CD pipelines, or AI services.
Developer Experience
- Configuration – Environment variables control database URL, feature flags, and API prefixes; no hard‑coded secrets.
- Documentation – Comprehensive API reference on
docs.affine.pro, with code samples and schema definitions. - Community – Active Discord channel, GitHub discussions, and a growing set of contributors; all code is MIT‑licensed.
Use Cases
| Scenario | Why AFFiNE? |
|---|---|
| Internal wiki | Unified editing and diagramming in one place; offline mode for field teams. |
| Product design | Drag‑and‑drop UI mockups, link to spec pages, and embed prototype links. |
| Research labs | Store experimental data tables linked to notes; export to LaTeX or Markdown. |
| Agile teams | Real‑time collaboration on sprint backlogs, Kanban boards, and meeting notes. |
Advantages Over Alternatives
- Performance – CRDT engine with minimal bandwidth; local SQLite keeps latency low for single users.
- Flexibility – No vendor lock‑in; full control over data schema and storage backend.
- Licensing – MIT license allows commercial use without royalties, unlike proprietary SaaS offerings.
- Extensibility – Plug‑in SDK and open APIs make it trivial to add domain‑specific functionality.
AFFiNE Community Edition offers developers a powerful, self‑hosted platform that blends document editing, canvas creativity, and database power into a single coherent system. Its modern stack, robust API surface, and active community make it an attractive choice for any organization looking to build a custom knowledge base or collaborative workspace.
Open SourceReady to get started?
Join the community and start self-hosting AFFiNE today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Tags
Explore More Apps
ShellHub
Centralized SSH gateway for edge and cloud devices
Open Source Social Network (OSSN)
Build a vibrant, multilingual community platform
OpenTrashmail
Disposable email service with web UI, API, RSS and hooks
Isso
Self‑hosted commenting server like Disqus
LMS
Self-hosted music streaming with rich metadata and discovery
LedgerSMB
Open-source ERP for small‑to‑medium businesses