Sync
Inkdown’s sync feature allows you to keep your notes synchronized across multiple devices with end-to-end encryption, ensuring your data remains private and secure.Overview
Inkdown sync is designed with the following principles:- End-to-End Encryption: All notes are encrypted on your device before being sent to the server
- Multi-Device Support: Sync across desktop and mobile devices
- Conflict Resolution: Automatic handling of concurrent edits
- Selective Sync: Choose which workspaces to sync
- Version History: Access previous versions of your notes
- Real-time Updates: WebSocket-based live synchronization
How Sync Works
Architecture
The sync system consists of several components: Client-Side Components:SyncEngine: Orchestrates the sync processSyncOrchestrator: Manages sync operations and coordinationNoteSyncService: Handles note upload/downloadFileWatcherService: Monitors local file changesEncryptionService: Encrypts/decrypts note contentLocalDatabase: Caches sync state locallyConflictResolver: Resolves conflicts between versionsDeviceManager: Manages device registration
- Authentication and user management
- Encrypted note storage
- WebSocket connections for real-time updates
- Version history tracking
- Multi-workspace support
Encryption
All notes are encrypted using AES-256-GCM before leaving your device:- Encryption key derived from your password using PBKDF2
- Unique nonce for each encrypted note
- Content hashes for integrity verification
- Server never has access to your encryption key
Getting Started with Sync
These instructions will be available once sync is fully released.
1. Create an Account
- Open Settings with
Cmd/Ctrl+, - Navigate to Sync
- Click Sign Up
- Enter your username, email, and password
- Your account will be created and device registered
2. Link Your Workspace
- Select the workspace you want to sync
- Click Enable Sync for the workspace
- Your notes will begin uploading (encrypted)
3. Add Another Device
- Install Inkdown on your second device
- Sign in with your account credentials
- Select which workspaces to sync
- Notes will download automatically
Sync Modes
Inkdown supports two sync modes:Online Mode
- Real-time synchronization via WebSocket
- Instant updates when other devices make changes
- Immediate conflict detection
- Requires internet connection
Offline Mode
- Changes are queued locally
- Sync occurs when connection is restored
- Full functionality available offline
- Automatic reconnection
Features
Multi-Workspace Support
Each workspace can be synced independently:- Separate work and personal notes
- Share workspaces with team members (future)
- Selective sync to save bandwidth
- Multiple workspaces per device
Workspace Links
Local directories are linked to remote workspaces:Conflict Resolution
When two devices edit the same note simultaneously, Inkdown detects the conflict:- Keep Local: Your version overwrites the server
- Keep Remote: Server version overwrites your changes
- Merge: Combine both versions (manual)
Version History
Access previous versions of your notes:- View all versions of a note
- Compare versions side-by-side
- Rollback to previous version
- Version created on each sync
Device Management
Manage all devices connected to your account:- View all registered devices
- Revoke device access
- Rename devices
- See last active time
Sync Process
Efficient Synchronization
Inkdown uses batch diff algorithm for efficient sync:-
Client sends manifest of local notes:
-
Server compares with remote notes and responds:
-
Client applies changes:
- Downloads updated notes
- Uploads modified notes
- Deletes removed notes
- Resolves conflicts
Real-Time Updates
WebSocket connection enables instant updates:File Watching
Local file changes are detected automatically:Security
Encryption Details
Key Derivation:- Algorithm: PBKDF2-HMAC-SHA256
- Iterations: 100,000+
- Salt: Unique per user
- Key length: 256 bits
- Algorithm: AES-256-GCM
- Nonce: 96-bit random value (unique per note)
- Authentication: Built-in AEAD
- Encoding: Base64 for transport
- Encryption keys stored securely on device
- Password never sent to server
- Server stores only encrypted data
- Content hashes prevent tampering
Credential Storage
Sync credentials are stored securely:- Credentials encrypted before storage
- Device-specific encryption
- Cleared on sign-out
- Protected by OS security
Selective Sync
Choose what to sync:- Exclude large files
- Skip temporary notes
- Separate sensitive data
- Reduce bandwidth usage
Sync Status
Monitor sync progress:- Green indicator: All synced
- Yellow indicator: Sync in progress
- Red indicator: Conflicts or errors
Troubleshooting
Sync Not Working
- Check internet connection
- Verify account credentials
- Ensure workspace is linked
- Check sync is enabled in settings
- Review error logs
Conflicts
- Open the conflict resolution dialog
- Compare the conflicting versions
- Choose a resolution strategy
- Apply the resolution
Missing Notes
- Force a full sync
- Check selective sync settings
- Verify note not deleted on another device
- Check version history
Performance Issues
- Enable selective sync for large workspaces
- Reduce real-time sync frequency
- Check available bandwidth
- Clear local database cache
Privacy
Inkdown’s sync is designed with privacy as a priority:- ✅ End-to-end encryption
- ✅ Server cannot read your notes
- ✅ Zero-knowledge architecture
- ✅ You control your data
- ✅ Can export all data
- ✅ Can delete account and all data
Coming Soon
Sync features under development:- Initial release of sync functionality
- Team workspaces and collaboration
- Share notes via encrypted links
- Sync attachments and images
- Optimized mobile sync
- Self-hosted sync server option
- Two-factor authentication
- Advanced conflict resolution UI
Next Steps
- Configure your editor in Editor Basics
- Learn Keyboard Shortcuts for efficiency
- Customize appearance with Themes
