collab-core — the base layer of the Collab Suite.
collab-core provides the shared infrastructure for real-time collaboration in TYPO3: session management, sync protocol abstraction and the editor-spanning conventions on which collab-presence, collab-rte and hocuspocus build. Coming soon — content and API documentation will follow once the package is cleared for public release.
Architecture and components
collab-core sits inside the TYPO3 backend, between the browser editor (CKEditor 5 with Yjs) and the external WebSocket server (moselwal/hocuspocus). The browser opens a WebSocket connection to the Hocuspocus server, which in turn speaks REST plus JWT against the TYPO3 backend routes provided by collab-core.
Browser (CKEditor 5 + Yjs)
↓ WebSocket
moselwal/hocuspocus (Node, port 1234)
↓ REST + JWT
TYPO3 backend (collab-core)
├─ /api/collab/auth → AuthController::verifyAction
├─ /api/collab/doc/{load,store} → DocController
├─ /api/collab/presence → PresenceController::streamAction (SSE)
└─ /api/collab/presence/push → PresenceController::pushAction
Class inventory
| Class | Purpose |
|---|---|
Service\JwtService | HS256 JWT issuance and validation. Token payload {sub, name, docId, iat, exp} with a 5-minute TTL |
Service\DocIdService | Builds and parses deterministic doc IDs in the form {table}:{uid}:{fieldName} |
Service\PresenceService | Session tracking (user-colour allocation, heartbeat, stale purge after 30 s) |
Repository\YdocRepository | LONGBLOB persistence for the Yjs state vector in tx_collab_ydoc |
Controller\AuthController | Token verification for the Hocuspocus WebSocket handshake |
Controller\DocController | Yjs document load and store for Hocuspocus |
Controller\PresenceController | SSE stream and heartbeat push for the active-editor list |
EventListener\ProvideCollabTokenListener | Injects JWT and docId into the CKEditor configuration via BeforePrepareConfigurationForEditorEvent |
Database schema
tx_collab_ydoc: doc_id (PK), ydoc_binary (LONGBLOB), updated_at
tx_collab_session: doc_id, be_user_uid, color, display_name, connected_at, last_seen
Requirements
- TYPO3 14.x, PHP 8.3+
$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']must be set — it is currently re-used as the HMAC secret for JWT signing (a dedicated JWT secret is noted as a future recommendation in the AUDIT)- Extension key
collab_core, namespaceMoselwal\CollabCore, GPL-2.0-or-later
Want to discuss real-time collaboration in TYPO3 now?
If you want to evaluate collab-core early or run the Collab Suite as a whole inside a TYPO3 platform, get in touch — we coordinate early access, architecture consulting and integration questions.
Or email us directly: kontakt@moselwal.de