Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Notion-like collaborative text editor with AI features built with Liveblocks, Lexical, Vercel AI SDK, and Next.js.
The Notion-like AI Editor (Lexical) is a Next.js boilerplate from Liveblocks that combines a collaborative rich-text editor, live cursors, and an AI assistant toolbar into a single real-time document editing experience.
The Notion-like AI Editor (Lexical) is a working example, not a package, that combines a collaborative text editor, live cursor presence, and an AI assistant toolbar in a Next.js app. It accepts typed input and AI toolbar queries, and outputs a real-time synchronized document with visible cursors and AI-generated text. The template was created by Liveblocks, a realtime infrastructure platform, to demonstrate how its SDK works alongside the Lexical editor and the Vercel AI SDK.
These features are visible in the README and require no extra configuration beyond adding a Liveblocks API key.
npx create-liveblocks-app@latest --example nextjs-notion-like-ai-editor --api-key to download the example and automatically obtain an API key from liveblocks.io.--vercel deploys to Vercel, and a CodeSandbox fork supports browser-based development.Everyone from frontend developers to startup teams can use this template to speed up building collaborative or AI-enabled text editors.
This example supports at least three concrete workflows that show its real-time and AI capabilities.
Getting this example running involves installing the project and providing a Liveblocks secret key; deployment to Vercel is handled by the same CLI command. The quickest path is npx create-liveblocks-app@latest --example nextjs-notion-like-ai-editor --api-key, which downloads the project and prompts to open your browser so you can automatically get the key. Alternatively, install dependencies with npm install, create an account on liveblocks.io, copy your secret key from the dashboard, add it as LIVEBLOCKS_SECRET_KEY in a local .env.local file, then run npm run dev. For deployment, the --vercel flag handles both local setup and Vercel deployment, and CodeSandbox users can fork the example and set the same environment variable as a secret.
The template uses Next.js as the React framework, Lexical as the text editor engine, the Vercel AI SDK to power AI responses, and Liveblocks for real-time presence and document synchronization. The repository describes itself as realtime infrastructure for multiplayer apps and agents.
Run the quick-start command with the --api-key flag and the CLI will ask permission to open your browser, letting you get an API key from your liveblocks.io account automatically. For manual setup, create an account on liveblocks.io, go to the dashboard, copy your secret key, and add it as the LIVEBLOCKS_SECRET_KEY variable in .env.local.
Yes, the template is designed for Vercel deployment. Use npx create-liveblocks-app@latest --example nextjs-notion-like-ai-editor --vercel to download and deploy it, and it also runs locally. A hosted live preview is linked in the README for immediate testing.
