ColabCanvas is a next-generation collaborative whiteboard platform engineered for seamless, real-time teamwork. It combines advanced canvas rendering, low-latency networking, and robust backend infrastructure to deliver a Figma-like experience for brainstorming, diagramming, and ideation.
- Real-Time Multiplayer Canvas: Built on top of WebSockets for instant, bi-directional updates. All drawing, text, and object changes are synchronized across users in a room with sub-100ms latency.
- CRDT-Based State Management: Uses Conflict-free Replicated Data Types (CRDTs) to ensure eventual consistency and seamless merging of concurrent edits, even under network partitions.
- Rich Drawing Tools: Freehand, shapes, text, eraser, zoom, pan, and multi-user cursors. All tools are modular and extensible.
- User Presence & Awareness: See who is online, their cursor positions, and what they are editing in real time.
- Authentication & Room Management: Secure sign-up/sign-in, room creation/joining, and persistent user sessions.
- Optimistic UI: Instant feedback for user actions
- Scalable Microservices Architecture: Decoupled HTTP and WebSocket backends, each optimized for their domain (REST APIs, real-time sync, file uploads, etc).
- Cloud-Native & Local-First: Designed for both cloud deployment and local development, with Dockerized Postgres and stateless services.
- Type-Safe End-to-End: Shared TypeScript types across frontend, backend, and database for zero type drift.
- Customizable UI Library: Built with a reusable, themeable component system using Tailwind CSS and React.
- Frontend: Next.js app with advanced canvas rendering, state managed by CRDTs, and real-time updates via WebSocket.
- HTTP Backend: Node.js/Express API for authentication, room management, and file uploads. Uses Prisma for DB access.
- WebSocket Backend: Dedicated Node.js server for real-time canvas sync, presence, and CRDT operations.
- Database: PostgreSQL, managed with Prisma, stores users, rooms, and persistent canvas data.
- Shared Packages: TypeScript types, UI components, and utilities shared across all services.
- Frontend: Next.js, React 18, TypeScript, Tailwind CSS, Framer Motion, custom CRDT implementation
- Real-Time: Native WebSocket server
- Backend: Node.js, Express, Prisma ORM, JWT authentication, REST APIs, file uploads
- Database: PostgreSQL (Dockerized for local dev), Prisma migrations, connection pooling
- Monorepo: pnpm workspaces, TurboRepo for build orchestration, strict type sharing
- DevOps: Docker, Vercel/Render deploy ready
ColabCanvas/
βββ apps/
β βββ Frontend/ # Next.js app (canvas, auth, UI)
β βββ http-backend/ # Express API (auth, rooms, uploads)
β βββ ws-backend/ # WebSocket server (real-time sync)
βββ packages/
β βββ @types/ # Shared TypeScript types
β βββ common/ # Shared utilities (CRDT, helpers)
β βββ db/ # Prisma schema, migrations, client
β βββ eslint-config/ # Shared ESLint config
β βββ typescript-config/# Shared TS config
β βββ ui/ # Shared React UI components
βββ package.json
βββ pnpm-workspace.yaml
βββ turbo.json
βββ README.md
- Node.js (v18+)
- pnpm (v8+)
- Docker (for local Postgres)
pnpm install- Copy
.env.exampleto.envand fill in DB, JWT, and other secrets.
docker run --name colabcanvas-db -e POSTGRES_PASSWORD=yourpassword -p 5432:5432 -d postgres:15cd packages/db
pnpm prisma migrate devpnpm run dev- Canvas Logic: See
apps/Frontend/draw/for custom drawing, shape rendering, and CRDT logic. - Authentication: JWT-based, with session management in
apps/http-backend. - Real-Time Sync: WebSocket protocol and CRDT merge in
apps/ws-backend. - UI Components: Modular, themeable React components in
packages/ui. - Type Safety: All API contracts and DB models are type-checked end-to-end.
- Add new tools or shapes by extending the canvas logic and UI.
- Integrate with cloud storage for persistent uploads.
- Deploy to Vercel, Render, or your own infra (Docker-ready).
We welcome contributions! Please open issues, submit PRs, and help us build the best collaborative canvas platform.
For questions, support, or demo requests, please open an issue or contact the maintainer.
Run the following command:
npx create-turbo@latestThis Turborepo includes the following packages/apps:
docs: a Next.js appweb: another Next.js app@repo/ui: a stub React component library shared by bothwebanddocsapplications@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/typescript-config:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
To build all apps and packages, run the following command:
cd my-turborepo
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo build
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo build
yarn dlx turbo build
pnpm exec turbo build
You can build a specific package by using a filter:
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo build --filter=docs
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo build --filter=docs
yarn exec turbo build --filter=docs
pnpm exec turbo build --filter=docs
To develop all apps and packages, run the following command:
cd my-turborepo
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo dev
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo dev
yarn exec turbo dev
pnpm exec turbo dev
You can develop a specific package by using a filter:
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo dev --filter=web
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo dev --filter=web
yarn exec turbo dev --filter=web
pnpm exec turbo dev --filter=web
Tip
Vercel Remote Cache is free for all plans.
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo login
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo login
yarn exec turbo login
pnpm exec turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
turbo link
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
npx turbo link
yarn exec turbo link
pnpm exec turbo link
Learn more about the power of Turborepo:
