How getfrontend/next-figma-clone works
Main System Components
a. Client Layer (Frontend)
• Next.js Application Container
• Canvas System (Fabric.js)
• Real-time Collaboration Layer (Liveblocks)
• UI Components Layer
b. External Services Layer
• Liveblocks Service
• Asset Storage (for uploaded images)
Component Breakdown
Create distinct sections for the following component groups:
a. Core Components:
• Canvas (Main workspace)
• Room Management
• Collaboration Features
b. UI Components:
• Navigation System
• Sidebars (Left/Right)
• Settings Panels
Data Flow Visualization
• Real-time updates between clients via Liveblocks
• User interactions with the canvas
• State management flow
• Asset upload/download paths
[Client Browser]
• [Next.js App Container]
• [Layout Layer]
• Navbar
• LeftSidebar (Tools)
• RightSidebar (Properties)
• [Canvas System]
• Fabric.js Instance
• Drawing Tools
• [Collaboration System]
• Live Cursors
• Cursor Chat
• Comments
• Reactions
• [State Management]
• Canvas State
• User State
• Collaboration State
• [External Services]
• Liveblocks
• Asset Storage
Important Elements to Include:
Connection Types
• Double lines: Real-time data flow
Component Relationships
How these key features interact:
• Cursor system with chat overlay
• Comments system with canvas elements
• Real-time state synchronization
• User presence and activity tracking
State Flow
How state changes propagate:
• User actions → Canvas updates
• Collaboration events → UI updates
• Tool selection → Canvas mode changes
Remember to:
• Keep the main components clearly visible at a glance
• Use consistent iconography for similar components
• Annotations for complex interactions
• Scalability aspects of the system