☁️ Sync & Storage

Local-first architecture means your notes are always available, even offline. Choose your cloud backup: Nevernote server or your own Google Drive.

💻 Local-First Architecture

Your Browser is the Source of Truth

Instant Access Offline Ready
💻
IndexedDB
PRIMARY
  • Source of truth
  • Instant reads (0 latency)
  • Full offline support
  • Encrypted storage
Background Sync
☁️
Cloud Backup
SECONDARY
  • Cross-device sync
  • Disaster recovery
  • Your choice of provider

✅ Instant

Notes load from local storage in milliseconds. No network required for reads.

📴 Offline

Full functionality without internet. Create, edit, delete — everything works offline.

🔄 Auto-Sync

Changes sync in background when online. Debounced to reduce API calls.

💾 Persistent

IndexedDB persists across sessions. Your notes are there when you return.

☁️ Cloud Storage Options

Choose where to backup your encrypted notes. Switch anytime in Settings.

🖥️ Nevernote Server

Zero-knowledge encrypted storage on our servers. We store only ciphertext — we can't read your notes.

💻
Browser
ENCRYPTED
🖥️
Server
ENCRYPTED
  • End-to-end encrypted
  • Real-time sync via SSE
  • Version history stored
  • Server can't decrypt

📁 Google Drive

Store notes in your own Google Drive. You control the data. Notes stored as JSON files.

💻
Browser
ENCRYPTED
📁
Drive
PLAINTEXT
  • You own the data
  • Accessible outside Nevernote
  • Google handles security
  • Polling sync (30s interval)

🔄 Synchronization Strategy

📡 Nevernote Server Sync

  • Startup: GET /api/notes/checksums → quick diff
  • Real-time: Server-Sent Events (SSE)
  • Push: Debounced 2s, batch uploads
  • Conflict: Last-write-wins

☁️ Google Drive Sync

  • Startup: Changes API with stored page token
  • Real-time: Polling every 30 seconds
  • Push: Debounced 2s, 5 concurrent uploads
  • Conflict: Last-write-wins

📊 Data Flow

Editing a Note

1
User types in editor
2
Encrypt & save to IndexedDB
3
Mark note as "dirty"
4
2s debounce timer
5
Push to cloud
6
Mark "clean"

App Startup (with existing cache)

1
Load from IndexedDB
2
Decrypt & display
3
Fetch cloud checksums
4
Compare & fetch changes
5
Merge updates

⚡ Notes display immediately from cache while sync happens in background

📴 Offline Support

✅ Works Offline

  • • View all notes
  • • Create new notes
  • • Edit existing notes
  • • Delete notes
  • • Organize folders
  • • Search notes

⏳ Queued Offline

  • • Cloud sync
  • • AI summaries
  • • Voice transcription
  • • Contact sync
  • • Public sharing

These queue and complete when online

🔄 Auto-Reconnect

When you come back online, pending changes sync automatically. No manual action needed.

The "dirty" flag tracks which notes need syncing.

📜 Version History

📜 Every Edit Saved

Every save creates a version snapshot stored on the server. Browse the timeline and restore any previous version.

  • Encrypted snapshots stored on server
  • Visual timeline with relative dates
  • Preview before restoring
  • Geo-location tagged per edit
  • History deleted when note is deleted

📍 Location Tagging

Optionally tag notes with your location at the time of editing.

  • 5-minute cached location (battery efficient)
  • Graceful permission handling
  • Click to view in Google Maps
  • See where you were when you wrote something