Guides
Production
Build and run a Nuxt host with the editor module: runtime secrets, persistent storage and shutdown behaviour.
bun run build # nuxt build
PORT=3200 node .output/server/index.mjs
- The module compiles the package source into the Nitro bundle (
externals.inline) and enablesexperimental.websocketfor the/collab/:idroute. Verified withnode .output/server/index.mjs: unauthenticatedGET /api/editor/settings→ 401, authenticated → 200; an unauthenticated websocket upgrade to/collab/:idgets 101 and is closed with 4401 (withcollab.authenticateUpgrade: true: HTTP 401 at the upgrade), an authenticated provider syncs the document in both modes. - Secrets and the session password are runtime environment variables of the server process (
NUXT_SESSION_PASSWORDfornuxt-auth-utils, theNUXT_TIPTAP_EDITOR_AI_*keys of AI configuration and secrets), not build-time values. - Persistent data (documents, Yjs state, assets, settings) lives wherever the host's adapter puts it; Nitro storage mounts used by the adapter must be configured for production (
nitro.storagewith a real driver on read-only deployments). - The server plugin's
installEditorServerregisters Nitro'sclosehook, which flushes pending debounced Yjs stores and disconnects the clients.
Kitchen sink: learning path
Fifteen pages, basics first: structure, content blocks, JSON and Markdown, block actions and settings, then the building blocks, then the use cases, each with the code that builds it
Register the Nuxt module
Register @skaile/forge-editor/nuxt in nuxt.config.ts, what the module wires into build, client and server, and which routes it mounts.