How garden-co/jazz works
Main Components Identification
The system consists of several key packages that form different layers:
a. Core Layer:
• packages/cojson - The fundamental package handling collaborative JSON operations
• packages/cojson-storage - Storage management
• packages/cojson-transport-ws - WebSocket-based transport layer
b. Platform-specific Implementations:
• packages/jazz-browser - Browser-specific implementation
• packages/jazz-nodejs - Node.js implementation
• packages/jazz-react-native - React Native implementation
c. Framework Integrations:
• packages/jazz-react - React integration
• packages/jazz-vue - Vue.js integration
• packages/jazz-svelte - Svelte integration
d. Authentication Modules:
• packages/jazz-browser-auth-clerk
• packages/jazz-react-auth-clerk
• packages/jazz-react-native-auth-clerk
┌─────────────────────────────────────────────────────────┐
• Application Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• React │ │ Vue │ │ Svelte │ │
• Integration │ │ Integration │ │ Integration │ │
• ┘ └─────────────┘ └─────────────┘ │
• ┤
• Platform Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• Browser │ │ Node.js │ │React Native │ │
• Implementation│ │Implementation│ │Implementation│ │
• ┘ └─────────────┘ └─────────────┘ │
• ┤
• Core Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• CoJSON │ │ Storage │ │ Transport │ │
• Core │ │ Manager │ │ (WebSocket) │ │
• ┘ └─────────────┘ └─────────────┘ │
• ┘
Key Interactions to Highlight
• Authentication flows with auth providers
• Demonstrate how data synchronization works across platforms
• Storage persistence paths
Additional Elements
Important aspects:
• Storage adapters (SQLite, IndexedDB)
• WebSocket transport layer
• Authentication providers
• Media handling components
• Tools and utilities
Implementation Details
• Local-first architecture with offline capabilities
• Distributed state management
• Cross-platform compatibility
• Real-time synchronization
• Security and encryption features