Clone the repository and install dependencies
Clone the DocuSphere repository and install its Node.js dependencies.Then install dependencies with your preferred package manager:
Set up Convex
DocuSphere uses Convex as its backend — it stores documents and serves real-time queries.
- Create a free account at convex.dev.
- Create a new project from the Convex dashboard.
- Copy your Deployment name (shown as
dev:your-deployment) and your Convex URL (e.g.https://your-deployment.convex.cloud).
CONVEX_DEPLOYMENT and NEXT_PUBLIC_CONVEX_URL in the next step.Set up Clerk authentication
DocuSphere uses Clerk for user sign-in and organization management.
- Create a free account at clerk.com.
- Create a new application in the Clerk dashboard.
- From the API Keys section, copy:
- Your Publishable key (starts with
pk_test_) - Your Secret key (starts with
sk_test_)
- Your Publishable key (starts with
- From JWT Templates, note your Issuer domain (e.g.
https://your-domain.clerk.accounts.dev). This is yourCLERK_JWT_ISSUER_DOMAIN.
Set up Liveblocks
DocuSphere uses Liveblocks to power real-time presence, cursors, and room sync.
- Create a free account at liveblocks.io.
- Create a new project from the Liveblocks dashboard.
- Copy your Secret key from the API keys section (starts with
sk_dev_).
NEXT_PUBLIC_LIVEBLOCKS_SECRET_KEY. Despite the NEXT_PUBLIC_ prefix in the variable name, this key is only read in the server-side /api/liveblocks-auth route — it is never sent to the browser.Create your .env.local file
Create a Replace each placeholder value with the real credentials from the Convex, Clerk, and Liveblocks dashboards.
.env.local file in the root of the repository and fill in the values you collected in the previous steps:.env.local
Start the dev servers
DocuSphere requires two servers running at the same time: the Convex backend and the Next.js frontend.In your first terminal, start the Convex dev server:In a second terminal, start the Next.js dev server:
Both servers must be running simultaneously. The Next.js app connects to Convex at runtime — if Convex is not running, document queries and mutations will fail.
Open the app and create your first document
Navigate to http://localhost:3000 in your browser.
- Sign in using the Clerk authentication flow.
- On the home screen, choose a template from the gallery or start from a blank document.
- Your document is created and saved automatically. Share the URL with another browser tab or another user to see real-time collaboration in action.