How tonghoai/opennotas works
Main Components
a. Frontend Layer:
• Vue.js/Nuxt.js Application Structure
• PWA Components
• UI Components (organized by feature)
• Editors (CodeMirror and TipTap)
b. Core Services Layer:
• Storage Management
• Encryption Services
• Synchronization Services
• Authentication Services
c. Adapter Layer:
• LocalForage Adapter
• Turso Adapter
• Database Models
┌─────────────────────────────────────────────────────────┐
• Presentation Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐│
• Pages │ │ Components │ │ UI/UX ││
• ┘ └─────────────┘ └─────────────────────┘│
• ┤
• Core Services Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐│
• Security │ │ Sync │ │ Storage ││
• ┘ └─────────────┘ └─────────────────────┘│
• ┤
• Data Layer │
• ┌─────────────┐ ┌─────────────┐ │
• LocalForage │ │ Turso │ │
• ┘ └─────────────┘ │
• ┘
Key Elements to Highlight
a. Presentation Layer:
• Main pages (landing, install, service, sos)
• Components (editor, modal, toolbar)
• PWA-specific elements
b. Core Services Layer:
• Encryption service (AES implementation)
• Sync service with conflict resolution
• Storage management
• Search functionality (FlexSearch)
c. Data Layer:
• Storage adapters (LocalForage, Turso)
• Database models (folders, notes, settings)
• Migration system
Data Flow Indicators
• User interaction flow
• Data synchronization flow
• Encryption/decryption process
• Storage operations
Additional Details
• Component interaction patterns
• State management flow
• Error handling paths
• Migration processes
Remember to:
• Use consistent symbols and notation
• Version information
• Document all external dependencies
This system design should emphasize OpenNotas's key features: security, synchronization, and cross-platform compatibility, while maintaining clarity about the application's architecture and data flow.