Status: Active
Created: 2026-04-17
Last Updated: 2026-04-17
Note Sync Now is an end-to-end encrypted real-time note synchronization tool supporting multi-device collaboration.
- End-to-End Encryption: Client-side AES-256 encryption, server only relays ciphertext
- Mnemonic Recovery: 12-word mnemonic derives encryption key
- Real-time Sync: WebSocket bidirectional communication with reconnection support
- Conflict Resolution: Conflict detection and manual resolution mechanism
- Multi-Layer Storage: IndexedDB + LocalStorage dual-layer storage
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite + Tailwind CSS |
| State Management | Zustand |
| Editor | CodeMirror 6 |
| Backend | Node.js + Express + Socket.IO |
| Storage | Redis / SQLite / IndexedDB |
| Testing | Vitest + Jest + fast-check |
User Story: As a user, I want my note data to be saved reliably, even if the server restarts or the network disconnects.
- WHEN the Server restarts THEN the System SHALL restore all active sync chains and their latest content from persistent storage
- WHEN all Devices disconnect from a Sync Chain THEN the Server SHALL retain the encrypted data for at least 7 days
- WHEN a Device reconnects after network interruption THEN the System SHALL synchronize the latest content without data loss
- WHEN the Client stores data locally THEN the System SHALL use IndexedDB as primary storage with LocalStorage as fallback
- WHEN storage quota is exceeded THEN the System SHALL notify the user and provide options to clear old history entries
User Story: As a user, when multiple devices edit the same note simultaneously, I want the system to intelligently handle conflicts without data loss.
- WHEN two Devices push updates within 5 seconds THEN the System SHALL detect the conflict and preserve both versions
- WHEN a conflict is detected THEN the Client SHALL display a conflict resolution interface showing both versions
- WHEN the user resolves a conflict THEN the System SHALL merge the selected content and broadcast to all Devices
- WHEN a Device is offline and makes changes THEN the System SHALL queue the changes and detect conflicts upon reconnection
- WHILE a conflict exists THEN the System SHALL prevent new edits until the conflict is resolved
User Story: As a user, I want to create multiple independent notebooks, each containing multiple note files, for better content organization.
- WHEN a user creates a new notebook THEN the System SHALL generate a unique identifier and encryption key for that notebook
- WHEN a user switches between notebooks THEN the System SHALL load the corresponding notes and maintain separate sync chains
- WHEN a user creates a note within a notebook THEN the System SHALL associate the note with the notebook and encrypt it with the notebook's key
- WHEN a user deletes a notebook THEN the System SHALL prompt for confirmation and remove all associated notes from local storage
- WHEN a user shares a notebook THEN the System SHALL generate a QR code containing the notebook's mnemonic and metadata
User Story: As a user, I want to view and edit notes without network connection, and automatically sync when the network is restored.
- WHEN the Client is installed as a PWA THEN the System SHALL cache all necessary assets for offline use
- WHEN the Device goes offline THEN the Client SHALL continue to function with local data and display offline status
- WHEN the user edits notes offline THEN the Client SHALL store changes locally with timestamps
- WHEN the Device reconnects THEN the System SHALL automatically sync all offline changes to the Server
- WHEN offline changes conflict with server data THEN the System SHALL apply conflict resolution rules
User Story: As a user, I want to view the complete modification history of notes and compare differences between versions.
- WHEN a user views history THEN the System SHALL display a timeline of all saved versions with timestamps and device names
- WHEN a user selects two versions THEN the System SHALL display a side-by-side diff view highlighting additions and deletions
- WHEN a user restores a previous version THEN the System SHALL create a new history entry and broadcast the restored content
- WHEN the System saves a version THEN the System SHALL store only the delta from the previous version to save space
- WHEN a user searches history THEN the System SHALL support full-text search across all historical versions
User Story: As a user collaborating with others, I want to see other people's cursor positions and real-time editing status.
- WHEN a Device moves the cursor THEN the System SHALL broadcast the cursor position to all other Devices in the Sync Chain
- WHEN a Device receives cursor position updates THEN the Client SHALL display colored cursors with device names
- WHEN a Device is typing THEN the System SHALL broadcast typing indicators to other Devices
- WHEN a Device selects text THEN the System SHALL broadcast the selection range to other Devices
- WHEN a Device disconnects THEN the System SHALL remove that Device's cursor and indicators from all other Clients
User Story: As a user, I want stronger security protection, including key rotation and access control.
- WHEN a user enables key rotation THEN the System SHALL generate a new encryption key and re-encrypt all data
- WHEN a user suspects key compromise THEN the System SHALL provide a one-click key rotation feature
- WHEN a user enables access control THEN the System SHALL require device approval before joining the Sync Chain
- WHEN a new Device attempts to join THEN the System SHALL notify existing Devices and require approval from at least one Device
- WHEN a user revokes a Device THEN the System SHALL disconnect that Device and prevent future connections with the old key
User Story: As a user, I want the system to maintain smooth response when processing large notes and high-frequency editing.
- WHEN a note exceeds 1MB THEN the System SHALL use incremental sync to transmit only changed portions
- WHEN the user types continuously THEN the System SHALL debounce sync operations to reduce network traffic by at least 80%
- WHEN the Client renders a large note THEN the System SHALL use virtual scrolling to maintain 60fps rendering
- WHEN the Server handles 100+ concurrent connections THEN the System SHALL maintain average response time below 100ms
- WHEN the System detects slow network THEN the System SHALL automatically adjust chunk size and debounce intervals
User Story: As a user, I want to batch import/export notes and support more formats.
- WHEN a user exports a notebook THEN the System SHALL create a ZIP file containing all notes in Markdown format
- WHEN a user imports a ZIP file THEN the System SHALL extract and import all supported file formats
- WHEN a user exports notes THEN the System SHALL support Markdown, HTML, PDF, and plain text formats
- WHEN a user imports from other note apps THEN the System SHALL support Evernote ENEX, Notion, and OneNote formats
- WHEN export includes images THEN the System SHALL embed images as base64 or include them as separate files
User Story: As a user, I want to quickly search note content and use tags to organize notes.
- WHEN a user enters a search query THEN the System SHALL return results within 200ms for notebooks up to 10,000 notes
- WHEN a user searches THEN the System SHALL support full-text search with highlighting of matched terms
- WHEN a user adds a tag to a note THEN the System SHALL store the tag and make it searchable
- WHEN a user filters by tag THEN the System SHALL display all notes with that tag
- WHEN a user views tag statistics THEN the System SHALL display tag usage frequency and related tags
User Story: As a user, I want to periodically backup all my data and recover it completely when needed.
- WHEN a user enables automatic backup THEN the System SHALL create encrypted backups daily to the user's chosen location
- WHEN a user initiates manual backup THEN the System SHALL create a complete backup including all notebooks, notes, and settings
- WHEN a user restores from backup THEN the System SHALL decrypt and restore all data to the original state
- WHEN backup fails THEN the System SHALL retry up to 3 times and notify the user of persistent failures
- WHEN a user views backup history THEN the System SHALL display all available backups with timestamps and sizes
| Term | Definition |
|---|---|
| System | Note Sync Now - the note synchronization system |
| Client | Frontend application (React + Vite) |
| Server | Backend server (Express + Socket.IO) |
| Sync Chain | A group of devices using the same 12-word mnemonic |
| Room | Server-side sync chain identifier |
| Encrypted Data | Note content encrypted with AES-256 |
| Device | Client instance connected to the sync chain |
| Chunk | Data block for large file transfer |
| History Entry | Historical version record |
| Mnemonic | 12-word mnemonic for generating encryption key |
| WebSocket | Real-time bidirectional communication protocol |
| LocalStorage | Browser local storage |
| IndexedDB | Browser structured storage |