Commit Graph

305 Commits

Author SHA1 Message Date
Jeff Emmett e69ed0e867 feat: implement Google Data Sovereignty module for local-first data control
Core modules:
- encryption.ts: WebCrypto AES-256-GCM, HKDF key derivation, PKCE utilities
- database.ts: IndexedDB schema for gmail, drive, photos, calendar
- oauth.ts: OAuth 2.0 PKCE flow with encrypted token storage
- share.ts: Create tldraw shapes from encrypted data
- backup.ts: R2 backup service with encrypted manifest

Importers:
- gmail.ts: Gmail import with pagination and batch storage
- drive.ts: Drive import with folder navigation, Google Docs export
- photos.ts: Photos thumbnail import (403 issue pending investigation)
- calendar.ts: Calendar import with date range filtering

Test interface at /google route for debugging OAuth flow.

Known issue: Photos API returning 403 on some thumbnail URLs - needs
further investigation with proper OAuth consent screen setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:22:40 -08:00
Jeff Emmett de770a4f91 docs: add data sovereignty architecture for Google imports and local file uploads
- Add GOOGLE_DATA_SOVEREIGNTY.md: comprehensive plan for secure local storage
  of Gmail, Drive, Photos, Calendar data with client-side encryption
- Add LOCAL_FILE_UPLOAD.md: multi-item upload tool with same encryption model
  for local files (images, PDFs, documents, audio, video)
- Update OFFLINE_STORAGE_FEASIBILITY.md to reference new docs

Key features:
- IndexedDB encrypted storage with AES-256-GCM
- Keys derived from WebCrypto auth (never leave browser)
- Safari 7-day eviction mitigations
- Selective sharing to boards via Automerge
- Optional encrypted R2 backup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:47:22 -08:00
Jeff Emmett 6507adc36d Implement offline storage with IndexedDB for canvas documents
- Add @automerge/automerge-repo-storage-indexeddb for local persistence
- Create documentIdMapping utility to track roomId → documentId in IndexedDB
- Update useAutomergeSyncRepo with offline-first loading strategy:
  - Load from IndexedDB first for instant access
  - Sync with server in background when online
  - Track connection status (online/offline/syncing)
- Add OfflineIndicator component to show connection state
- Integrate offline indicator into Board component

Documents are now cached locally and available offline. Automerge CRDT
handles conflict resolution when syncing back online.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 03:03:37 -08:00
Jeff Emmett 7919d34dfa offline browser storage prep 2025-11-11 13:33:18 -08:00
Jeff Emmett 5fd83944fc coordinate fix 2025-11-11 01:08:55 -08:00
Jeff Emmett a3950baf17 fix coords 2025-11-11 00:57:45 -08:00
Jeff Emmett ef4a84e8f1 remove coordinate reset 2025-11-11 00:53:55 -08:00
Jeff Emmett d1179169cc fix coordinates 2025-11-10 23:54:54 -08:00
Jeff Emmett 0e90e2d097 preserve coordinates 2025-11-10 23:51:53 -08:00
Jeff Emmett eafbf6c9fe shape rendering on prod 2025-11-10 23:36:12 -08:00
Jeff Emmett edbe76ebda fix coordinates 2025-11-10 23:25:44 -08:00
Jeff Emmett ef39328d95 preserve coordinates 2025-11-10 23:17:16 -08:00
Jeff Emmett 229f4d6b41 fix coordinates 2025-11-10 23:04:52 -08:00
Jeff Emmett 0fa1652f72 prevent coordinate reset 2025-11-10 23:01:35 -08:00
Jeff Emmett 1b172d7529 update x & y coordinates 2025-11-10 22:42:52 -08:00
Jeff Emmett c1df50c49b fix prod 2025-11-10 22:27:21 -08:00
Jeff Emmett 053bd95d4a fix prod I hope 2025-11-10 20:53:29 -08:00
Jeff Emmett 73ac456e17 update dev and prod shape render 2025-11-10 20:16:45 -08:00
Jeff Emmett 92cac8dee5 fix prod shape render 2025-11-10 20:05:07 -08:00
Jeff Emmett b8fb64c01b update prod shape render 2025-11-10 19:54:20 -08:00
Jeff Emmett 680b6a5359 update prod 2025-11-10 19:44:49 -08:00
Jeff Emmett fec80ddd18 fix shape rendering in prod 2025-11-10 19:42:06 -08:00
Jeff Emmett 5b32184012 fix shape deployment in prod 2025-11-10 19:26:44 -08:00
Jeff Emmett be5f1a5a3a fix prod deployment 2025-11-10 19:23:15 -08:00
Jeff Emmett bf5d214e45 update for prod 2025-11-10 19:21:22 -08:00
Jeff Emmett f8e4fa3802 update production shape loading 2025-11-10 19:15:36 -08:00
Jeff Emmett a063abdf77 switch from github action to cloudflare native worker deployment 2025-11-10 19:05:11 -08:00
Jeff Emmett 04135a5487 updates to production 2025-11-10 18:57:04 -08:00
Jeff Emmett 5e11183557 fix cloudflare 2025-11-10 18:48:39 -08:00
Jeff Emmett b5463d4d64 update for shape rendering in prod 2025-11-10 18:43:52 -08:00
Jeff Emmett bda2523e3b fix production automerge 2025-11-10 18:29:19 -08:00
Jeff Emmett 3072dc70c0 fix prod 2025-11-10 18:10:55 -08:00
Jeff Emmett 62afed445e final automerge errors on cloudflare 2025-11-10 18:01:36 -08:00
Jeff Emmett f2b05a8fe6 fix final bugs for automerge 2025-11-10 17:58:23 -08:00
Jeff Emmett 0a34c0ab3e shape viewing bug fixed 2025-11-10 15:57:17 -08:00
Jeff Emmett 0c2ca28d0e update automerge bug fix 2025-11-10 15:41:56 -08:00
Jeff Emmett 5cfa2d683c final update fix old data conversion 2025-11-10 15:38:53 -08:00
Jeff Emmett b5785f059f update automerge 2025-11-10 14:44:13 -08:00
Jeff Emmett fa6b874313 fix typescript errors 2025-11-10 14:36:30 -08:00
Jeff Emmett 657df72534 update to prod 2025-11-10 14:24:17 -08:00
Jeff Emmett 9664439f31 update worker 2025-11-10 14:18:23 -08:00
Jeff Emmett 8cce96ea20 update renaming to preserve old format 2025-11-10 14:11:18 -08:00
Jeff Emmett 5375f63e70
Merge pull request #10 from Jeff-Emmett/automerge/obsidian/transcribe/AI-API-attempt
Automerge/obsidian/transcribe/ai api attempt
2025-11-10 14:02:21 -08:00
Jeff Emmett 663c845cab more updates to convert to automerge 2025-11-10 14:00:46 -08:00
Jeff Emmett a82f8faa00 updates to worker 2025-11-10 13:50:31 -08:00
Jeff Emmett 065a3b3483
Merge pull request #9 from Jeff-Emmett/automerge/obsidian/transcribe/AI-API-attempt
Automerge/obsidian/transcribe/ai api attempt
2025-11-10 13:44:24 -08:00
Jeff Emmett f688851764 update to fix deployment 2025-11-10 13:41:17 -08:00
Jeff Emmett 5c99a82c14 final updates to Automerge conversion 2025-11-10 13:34:55 -08:00
Jeff Emmett 39c1e2251b
Merge pull request #8 from Jeff-Emmett/automerge/obsidian/transcribe/AI-API-attempt
Automerge/obsidian/transcribe/ai api attempt
2025-11-10 12:54:19 -08:00
Jeff Emmett 8a8568d042
Merge pull request #7 from Jeff-Emmett/main
Merge pull request #6 from Jeff-Emmett/automerge/obsidian/transcribe/…
2025-11-10 12:52:37 -08:00