Docs
Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.
Docs is an open-source, real-time collaborative editing platform built with Django and React, designed for public organizations and teams to create, organize, and share structured knowledge with live collaboration, granular access control, and full data ownership.
At its core, Docs combines a Django REST Framework backend with a standalone Yjs/HocusPocus WebSocket collaboration server and a Next.js frontend powered by BlockNote.js. Documents are organized in hierarchical trees using the Materialized Path pattern, supporting infinite subpages, full-text search via optional OpenSearch integration, and import/export to common formats including DOCX, ODT, PDF, and Markdown.
Version 5.x introduced native AI writing assistance powered by Mistral and OpenAI via pydantic-ai, with AI responses mapped directly to BlockNote document operations rather than raw text. The platform also supports document printing, import from DOCX and Markdown files, inline comments and reactions, document version history, and a mobile-responsive layout. A feature flag system (django-waffle) allows operators to enable or disable capabilities per deployment.
Docs is a joint initiative by the French DINUM and German ZenDiS governments, and is licensed entirely under MIT — with an optional PUBLISH_AS_MIT=true build that strips GPL-licensed BlockNote XL packages for organizations requiring strict license compliance.
What You Get
- Real-time collaborative editing - Multiple users edit simultaneously with live cursors, presence indicators, and conflict-free CRDT synchronization powered by Yjs and HocusPocus over WebSocket.
- Block-based editor with slash commands - A Notion-style block system powered by BlockNote.js lets users insert headings, lists, code blocks, tables, callouts, and embedded media using intuitive slash commands.
- Hierarchical document tree - Organize pages into unlimited subpage hierarchies with drag-and-drop reordering, emoji icons, favorites, and a collapsible left-panel navigation.
- AI writing tools - Built-in AI assistance for rewriting, summarizing, translating, and fixing typos — powered by Mistral or OpenAI via pydantic-ai, with feature flag control per deployment.
- Export and import interoperability - Import DOCX and Markdown files; export documents to .docx, .odt, .pdf, and print-ready formats for distribution and archival.
- Granular access control - Per-document permissions for individuals and teams with role-based access (owner, editor, reader), invite-by-email, and link-sharing with configurable reach and role.
- Full-text search - Indexed document search powered by optional OpenSearch integration with access-aware result filtering so users only see documents they can reach.
- Inline comments and version history - Thread-based comments with reactions on any block, plus document versioning to browse and restore past states.
Common Use Cases
- Government agency knowledge base - A public agency deploys Docs on Kubernetes to centralize internal policies, onboarding guides, and interministerial procedures with OIDC authentication and audit-ready access control.
- Open-source project documentation - A developer team uses Docs for collaborative RFCs, API references, and contributor guides, with Markdown export for static site publishing and real-time editing during sprints.
- Research lab shared notebooks - A university research group edits experiment notes and data interpretations simultaneously in Docs, using subpages to organize by project and full-text search to locate references across hundreds of documents.
- Remote team internal wiki - A distributed company uses Docs as a self-hosted Notion replacement for meeting notes, SOPs, and team handbooks, with granular sharing so each department controls its own documents.
Under The Hood
Architecture
Docs uses a three-tier architecture: a Django REST Framework API backend, a standalone HocusPocus/Yjs WebSocket collaboration server (y-provider) written in TypeScript, and a Next.js frontend using BlockNote.js. The y-provider is an independent Express/WebSocket service that authenticates every incoming connection against the Django backend before allowing collaboration — ensuring that permission checks are enforced at the real-time layer, not just the HTTP layer. Document hierarchy is implemented using the Materialized Path (MP_Node) pattern via treebeard, enabling efficient subtree queries for nested page trees without recursive joins. The frontend follows a feature-sliced design with each capability (doc-editor, doc-tree, doc-comments, doc-export, doc-versioning) self-contained under src/features/docs/. State management is cleanly separated: Zustand handles UI and broadcast state, TanStack Query manages server cache, and Yjs operates as the CRDT layer for collaborative document state.
Tech Stack The backend runs Python 3.13 on Django 5.x with Django REST Framework, Celery with Redis for async task processing, PostgreSQL as primary storage, and optional OpenSearch for full-text document indexing. The collaboration server is Node.js 22 using HocusPocus 3.4.4 and Yjs over WebSocket. The Next.js 15 frontend uses BlockNote.js 0.51.4 (built on ProseMirror/TipTap), Mantine for UI components, and La Suite’s Cunningham design system for government-grade accessibility compliance. AI features support both Mistral and OpenAI via pydantic-ai with Langfuse for AI observability. Storage uses any S3-compatible backend (tested with MinIO). Deployment targets include Kubernetes with official Helm charts, Docker Compose, Scalingo, and community-supported Nix and YunoHost packages.
Code Quality
The backend has granular per-operation test files organized around individual API actions (one file per endpoint behavior) using pytest and factory_boy, covering unit, integration, and permission-boundary cases. The frontend includes extensive Vitest unit tests with Testing Library and 30 Playwright end-to-end specs covering complex UI flows including accessibility compliance. Error handling is explicit throughout — custom domain exception classes, documented security advisories with CVE tracking, and CORS proxy endpoint validation hardened against SSRF. TypeScript strict mode is applied across the frontend; the backend enforces data integrity by calling full_clean() before every model save. CI uses GitHub Actions with separate workflows for frontend lint/test/build, backend pytest, and e2e Playwright runs, with coverage reporting integrated.
What Makes It Unique
Docs stands apart through its government-grade design system integration (La Suite / Cunningham), making it one of the few open-source knowledge tools designed explicitly for public sector accessibility compliance (WCAG, RGAA). Its dual-mode AI architecture uses pydantic-ai to orchestrate Mistral and OpenAI providers, with AI responses mapped directly to BlockNote document block operations (update/add/delete) rather than raw text — enabling structured, reversible AI edits within the collaborative editing context. The PUBLISH_AS_MIT=true build flag lets operators exclude GPL-licensed BlockNote XL packages (PDF export, DOCX export, multi-column layout, AI) for strict MIT compliance, a distinctive affordance for public sector deployments with legal constraints. Permission enforcement is layered: the Django API guards HTTP operations while the y-provider re-validates every WebSocket collaboration session against backend permissions, preventing unauthorized real-time access even for users who know a document UUID.
Self-Hosting
Docs is released under the MIT License, one of the most permissive open-source licenses available. You are free to use, modify, distribute, and sell the software without restriction, with no copyleft obligations on your own application code. One important caveat: certain advanced features — PDF export, DOCX export, multi-column layout, and AI writing assistance — rely on BlockNote’s XL packages, which are licensed under the GPL. If you require a fully MIT-compliant build, the project provides a PUBLISH_AS_MIT=true build flag that excludes these packages, giving your legal team a clean bill of health.
Self-hosting Docs requires meaningful infrastructure: a PostgreSQL database, a Redis instance (for Celery task queues and caching), an S3-compatible object store for document attachments, an OIDC identity provider for authentication, and separate processes for the Django backend, Next.js frontend, and the y-provider WebSocket server. The maintainers’ recommended production method is Kubernetes with the official Helm chart; Docker Compose support exists for smaller deployments but is not used in production by the core team. You are responsible for database backups, TLS termination, scaling the collaboration server under concurrent load, and keeping up with frequent releases (roughly two per month in recent history).
There is no paid or commercial cloud tier for Docs itself — it is entirely community and government-funded. The trade-offs versus a managed SaaS like Notion or Google Docs are real: you gain complete data ownership, OIDC integration with your existing identity provider, and the ability to customize the platform, but you absorb all operational burden including uptime, upgrades, security patching, and user support. The core maintainers (DINUM and ZenDiS) provide best-effort support via GitHub Issues and a Matrix community channel, but there is no SLA or paid support tier available from the project itself.
Related Apps
strapi
CMS
Open-source headless CMS that auto-generates REST and GraphQL APIs from your content models, with a fully customizable admin panel you control.
strapi
OtherMinIO
File Storage
High-performance, S3-compatible object storage built for AI/ML and analytics workloads — run it anywhere from a laptop to a petabyte-scale cluster.
MinIO
AGPL 3.0Ghost
CMS · Blogging
Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.