A modern, real-time collaborative whiteboard application built with cutting-edge web technologies. IronCanvas enables teams and individuals to create, edit, and collaborate on digital canvases with seamless multi-user support and professional-grade drawing tools.
- Multi-Layer Canvas: Support for Rectangle, Ellipse, Text, Note, and Freehand Path layers
- Advanced Pen Tool: Smooth freehand drawing with perfect-freehand integration
- Color System: 10 carefully selected predefined colors with RGB support
- Text & Notes: Rich text editing and sticky note functionality
- Layer Management: Complete layer control with selection, movement, and resizing
- Live Cursors: See other users' cursor positions in real-time
- Presence Indicators: Real-time user presence with live pencil drafts
- Conflict-Free Editing: Automatic conflict resolution for concurrent edits
- Instant Synchronization: WebSocket-based updates across all connected clients
- Selection System: Multi-select with drag selection and bulk operations
- Layer Ordering: Bring to front/send to back with proper z-index management
- Undo/Redo: Complete history tracking with Liveblocks history API
- Pan & Zoom: Smooth camera controls for large canvases
- Responsive Design: Optimized for desktop and tablet experiences
- Team Collaboration: Clerk-powered organization management
- Board Management: Create, organize, and share boards within teams
- Access Control: Organization-based permissions and board ownership
- Dashboard: Comprehensive board overview with favorites and search
- Frontend Framework: Next.js 15 with App Router and TypeScript
- Real-Time Engine: Liveblocks for WebSocket-based collaboration
- Backend & Database: Convex for serverless functions and real-time data
- Authentication: Clerk with organization support
- UI Components: Radix UI primitives with Shadcn/ui design system
- Styling: Tailwind CSS with custom animations
- Drawing Engine: Perfect-freehand for smooth pen input
- State Management: Zustand for local state and Liveblocks for shared state
Note: IronCanvas is optimized for desktop and tablet experiences. Mobile support is planned for future releases.
- Multi-user collaboration with real-time cursor tracking
- Professional drawing tools including shapes, text, and freehand drawing
- Advanced selection system with multi-layer operations
- Organization-based board management with role-based access
Ensure you have the following before setting up IronCanvas:
- Node.js 18+ (LTS version recommended)
- Package Manager: npm, yarn, or pnpm
- Git for version control
- Clerk Account - Authentication & organization management
- Liveblocks Account - Real-time collaboration features
- Convex Account - Backend database and serverless functions
git clone https://github.com/yourusername/ironcanvas.git
cd ironcanvas
npm installCreate a .env.local file in the root directory:
# Convex Backend
CONVEX_DEPLOYMENT=your-deployment-name
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
# Liveblocks Real-time
LIVEBLOCKS_SECRET_KEY=sk_prod_...
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=pk_prod_...
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
CLERK_SECRET_KEY=sk_live_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/# Terminal 1: Start Next.js development server
npm run dev
# Terminal 2: Start Convex backend (new terminal)
npx convex devYour application will be available at:
- Frontend: http://localhost:3000
- Convex Dashboard: https://dashboard.convex.dev
- Liveblocks Dashboard: https://liveblocks.io/dashboard
- Create an Organization in your Clerk dashboard or through the app
- Create your first board from the IronCanvas dashboard
- Start drawing with the toolbar on the left side
- Invite team members to test real-time collaboration features
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint checks
npx convex dev # Start Convex development mode
npx convex deploy # Deploy Convex functions to productionironcanvas/
βββ app/ # Next.js App Router
β βββ (dashboard)/ # Dashboard routes
β β βββ _components/ # Dashboard-specific components
β β β βββ board-card/ # Board preview cards
β β β βββ sidebar/ # Organization sidebar
β β β βββ navbar.tsx # Top navigation
β β β βββ board-list.tsx # Board grid display
β β β βββ empty-*.tsx # Empty state components
β β βββ page.tsx # Dashboard main page
β βββ board/[boardId]/ # Individual board routes
β β βββ _components/ # Canvas-specific components
β β β βββ canvas.tsx # Main drawing canvas
β β β βββ toolbar.tsx # Drawing tools sidebar
β β β βββ color-picker.tsx # Color selection palette
β β β βββ selection-*.tsx # Selection tools & UI
β β β βββ cursor-*.tsx # Real-time cursor system
β β β βββ layer-*.tsx # Layer rendering components
β β β βββ info.tsx # Board information header
β β βββ page.tsx # Board main page
β βββ api/ # API routes
β β βββ liveblocks-auth/ # Liveblocks authentication
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
βββ components/ # Shared UI components
β βββ ui/ # Shadcn/ui components
β βββ auth/ # Authentication components
β βββ modals/ # Modal dialogs
β βββ actions.tsx # Action menus
β βββ hint.tsx # Tooltip component
β βββ room.tsx # Liveblocks room wrapper
βββ convex/ # Convex backend
β βββ hooks/ # Custom Liveblocks hooks
β β βββ use_api_mutation.ts # API mutation helper
β β βββ use_delete_layers.ts # Layer deletion logic
β β βββ use_selection_bounds.ts # Selection calculations
β βββ board.ts # Individual board operations
β βββ boards.ts # Board listing & management
β βββ schema.ts # Database schema definition
β βββ auth.config.js # Clerk integration config
βββ lib/ # Utility functions
β βββ utils.ts # Canvas utilities & helpers
βββ providers/ # React context providers
β βββ convex-client-provider.tsx # Convex + Clerk integration
β βββ modal-provider.tsx # Modal state management
βββ store/ # Global state management
β βββ use-rename-modal.ts # Rename modal state
βββ types/ # TypeScript definitions
β βββ canvas.ts # Canvas & layer type definitions
βββ public/ # Static assets
β βββ placeholders/ # Board thumbnail images
β βββ *.svg # Icon assets
βββ liveblocks.config.ts # Liveblocks configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ components.json # Shadcn/ui configuration
βββ package.json # Dependencies & scripts
- Liveblocks: Handles all real-time collaboration features including presence, storage, and conflict resolution
- Room-based isolation: Each board operates in its own Liveblocks room for optimal performance
- Optimistic updates: Immediate UI feedback with automatic rollback on conflicts
- Client β Liveblocks β All Clients: Real-time canvas updates
- Client β Convex β Client: Board metadata and user management
- Clerk β Convex: Authentication and organization data
- Canvas state: Managed by Liveblocks storage for real-time sync
- UI state: Local React state for immediate responsiveness
- Global modals: Zustand for modal state management
- Authentication: Clerk with Convex integration
| Tool | Description | Usage |
|---|---|---|
| Select | Default selection tool for moving and resizing layers | Click to select, drag to multi-select |
| Rectangle | Create rectangular shapes with customizable colors | Click and drag to define bounds |
| Ellipse | Draw circles and ellipses | Click and drag to define bounds |
| Pen/Pencil | Freehand drawing with smooth stroke rendering | Click and drag to draw |
| Text | Add text layers with custom styling | Click to place, type to edit |
| Sticky Notes | Create note layers for annotations | Click to place, type to add content |
- Multi-Selection: Drag to select multiple layers or hold Ctrl+Click
- Move & Resize: Drag layers to move, use corner handles to resize
- Layer Ordering: Bring to front/send to back via selection tools
- Delete Operations: Remove selected layers with delete button
- Color Customization: Change fill colors via color picker
Professional color palette with 10 carefully selected colors:
- Red (#DC2626), Amber (#F59E0B), Green (#10B981), Blue (#3B82F6), Purple (#8B5CF6)
- Pink (#EC4899), Orange (#F97316), Teal (#059669), Indigo (#6366F1), Yellow (#D97706)
- Live Cursors: See other users' cursor positions with color-coded indicators
- Presence Awareness: Real-time user indicators showing active participants
- Live Drawing: Watch collaborators draw with pencil tool in real-time
- Collaborative Selection: See what layers other users have selected
- Instant Synchronization: All changes sync immediately across connected clients
- Conflict Resolution: Automatic handling of concurrent edits without data loss
- Optimistic Updates: Immediate UI feedback before server confirmation
- Selective Rendering: Only affected layers re-render on changes
- Efficient Storage: Liveblocks CRDT for conflict-free data structures
- Canvas Virtualization: Smooth performance with large numbers of layers
node --version # Should be 18.0.0 or higher
npm --version # Should be 8.0.0 or higher
git --version # Any recent version# Essential packages for development
npm install @clerk/nextjs @clerk/clerk-react
npm install @liveblocks/client @liveblocks/react @liveblocks/node
npm install convex convex-helpers
npm install nanoid date-fns zustand perfect-freehand
npm install lucide-react tailwind-merge clsx class-variance-authority# Initialize Shadcn/ui
npx shadcn@latest init
# Install required UI components
npx shadcn@latest add dialog tooltip input button avatar
npx shadcn@latest add dropdown-menu alert-dialog skeleton sonner- Connect Repository: Link your GitHub repository to Vercel
- Configure Environment: Add all environment variables in Vercel dashboard
- Deploy Convex: Run
npx convex deploybefore deploying frontend - Deploy: Automatic deployment on git push
# Build the application
npm run build
# Deploy Convex functions
npx convex deploy
# Start production server (if self-hosting)
npm run start# Required for production
CONVEX_DEPLOYMENT=prod:your-deployment-name
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
LIVEBLOCKS_SECRET_KEY=sk_prod_...
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=pk_prod_...
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
CLERK_SECRET_KEY=sk_live_...Cause: Liveblocks hooks used outside of Room context
Solution:
- Ensure all Liveblocks hooks import from
@/liveblocks.config - Verify Room component wraps canvas components
- Check Liveblocks environment variables are set correctly
Cause: Backend connection or deployment issues
Solution:
- Run
npx convex devin separate terminal during development - Verify
NEXT_PUBLIC_CONVEX_URLmatches your deployment - Deploy functions with
npx convex deployfor production
Cause: Clerk configuration problems
Solution:
- Confirm all Clerk environment variables are correct
- Check organization setup in Clerk dashboard
- Verify webhook endpoints if using organization features
Cause: Liveblocks connection issues
Solution:
- Check Liveblocks secret key configuration
- Verify room IDs match between components
- Check browser console for WebSocket connection errors
- Ensure
/api/liveblocks-authendpoint is accessible
- Use browser dev tools Network tab to debug API calls
- Check Convex dashboard for function logs and errors
- Monitor Liveblocks dashboard for room activity and connections
- Use React DevTools to inspect component state and props
We welcome contributions to IronCanvas! Here's how to get involved:
- Fork the repository on GitHub
- Create a feature branch:
git checkout -b feature/amazing-feature - Develop your changes with proper testing
- Commit changes:
git commit -m 'feat: add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Submit a pull request with detailed description
- Follow TypeScript best practices and existing code style
- Add JSDoc comments for new functions and components
- Update README if adding new features or changing setup
- Test your changes across different browsers
- Ensure real-time features work with multiple users
- π¨ UI/UX improvements and accessibility enhancements
- π Performance optimizations and code quality improvements
- π§ͺ Testing - unit tests, integration tests, E2E tests
- π Documentation improvements and examples
- π Internationalization support for multiple languages
This project is open source and available under the MIT License.
- Real-time collaboration with live cursors and presence
- Multi-layer support (Rectangle, Ellipse, Text, Note, Path)
- Advanced selection tools with multi-select and layer ordering
- Undo/Redo system with complete history tracking
- Keyboard shortcuts (Ctrl+Z, Ctrl+Y, Ctrl+C, Ctrl+V, etc.)
- Copy/paste functionality for layers across boards
- Grid and snap-to-grid for precise alignment
- Image upload and embedding with drag-and-drop support
- Export functionality (PNG, SVG, PDF formats)
- Template system with pre-built layouts and components
- Advanced text editing with rich formatting options
- Shape library with additional geometric shapes and icons
- Layer grouping for complex object management
- Comments and annotations system for feedback
- Version history with branching and restore functionality
- Real-time chat integration within boards
- User permissions (view-only, comment-only, full edit)
- Public sharing with embeddable boards
- Team templates and organization-wide assets
- Mobile app (React Native) for iOS and Android
- Desktop application (Electron) for offline work
- API for integrations with third-party tools
- Plugin system for custom tools and extensions
- Offline support with automatic sync when reconnected
- Canvas virtualization for very large documents
- Progressive loading for faster initial render
- Advanced caching strategies for improved performance
- Database optimization for handling enterprise-scale usage
- CDN integration for global performance optimization
Built with β€οΈ using modern web technologies:
- Next.js - The React framework for production
- Liveblocks - Real-time collaboration infrastructure
- Convex - The backend for real-time applications
- Clerk - Authentication and user management
- Tailwind CSS - Utility-first CSS framework
- Shadcn/ui - Beautifully designed components
Special thanks to the open-source community and the teams behind these amazing tools that make IronCanvas possible.
Made with collaboration in mind. Build something amazing together! π