How yorkie-team/yorkie works
Main Components
a) Client Layer:
• Multiple client SDKs (JS, iOS, Android, Go)
• Local document replicas with CRDT support
• Client-side operations (offline editing capability)
b) Server Layer:
• API Server components (/server/rpc)
• Authentication & Authorization (/server/rpc/auth)
• Document synchronization engine (/server/backend/sync)
• Project management (/server/projects)
• Housekeeping services (/server/backend/housekeeping)
c) Storage Layer:
• MongoDB or MemDB support
• Change storage
• Snapshot management
• Document state persistence
Key Interactions to Highlight
• Bi-directional sync between clients and server
• Document change propagation
• Authentication flow
• Storage operations
• Background processes
Specific Implementation Details
Specialized components:
┌─────────────────────────────────────────────────────────┐
• Client Layer │
• ┤
• Document CRDT Implementation │
• Local Cache │
• Change Detection & Sync │
• ┘
┌─────────────────────────────────────────────────────────┐
• Server Layer │
• ┤
• API Services: │
• Document Management │
• Project Management │
• User Management │
• Core Services: │
• Sync Coordinator │
• CRDT Operations │
• Authentication │
• Housekeeping │
• ┘
┌─────────────────────────────────────────────────────────┐
• Storage Layer │
• ┤
• Document Store │
• Change History │
• Snapshots │
• User Data │
• ┘
Additional Elements
Sections for:
• API Gateway
• Load Balancers
• Monitoring & Metrics
• Security Components
• Background Jobs
Notes
Annotations for:
• Scaling considerations
• Security implementations
• Performance optimizations
• High availability setup
• Disaster recovery