- Attach button in chat sends encrypted files via conversation key
- Images render inline; other files show a download button
- Shared files stored on server with conversation_id for access control
- Drive groups files by conversation partner name (sender view)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On page reload, tokens persist but crypto keys are lost (by design).
Now shows a password-only unlock screen instead of the full login form,
so users don't need to re-enter their email after a refresh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bottom tab bar on mobile instead of side icon strip
- Conversation list and chat view are mutually exclusive on mobile
- Back button in chat header returns to conversation list on mobile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
X25519 Web Crypto support is not available in Electron's Chromium build
despite being in Chrome 113+. P-256 ECDH is universally supported across
all browsers and Electron versions with equivalent security.
- Replace { name: 'X25519' } with { name: 'ECDH', namedCurve: 'P-256' }
throughout the keypair generation, sealing, and opening functions
- Wire format updated: ephemeral pub key grows from 32 to 65 bytes
(uncompressed P-256 point: 0x04 || x || y)
- Existing accounts with X25519 keys must re-register
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TS 5.5 made typed arrays generic — Uint8Array now defaults to
Uint8Array<ArrayBufferLike>, which no longer satisfies Web Crypto's
BufferSource (requires ArrayBufferView<ArrayBuffer>).
- Add u8() helper that wraps .slice() results in new Uint8Array(),
producing Uint8Array<ArrayBuffer> throughout crypto/index.ts
- Annotate all Uint8Array parameters/returns with <ArrayBuffer>
- Add 'vite/client' to tsconfig types so import.meta.env is recognized
- ws.ts: change socket.on() cleanup return to void (fixes useEffect type)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add .gitea/workflows/docker-build.yml: builds backend and frontend
Docker images on every push, pushes to Gitea Container Registry
(git.necloud.us/nate/cloudlink/{backend,frontend}:latest + SHA tag)
- Add desktop build job: Linux AppImage and Windows NSIS installer via
Wine cross-compilation, uploaded as workflow artifacts
- Add release job: creates a Gitea release with installers attached when
a v* tag is pushed
- Add deploy job: SSH pull + restart on pushes to master
- docker-compose.yml: add image: fields alongside build: so the server
can pull pre-built images with docker compose pull
- DrivePage: add drag-and-drop upload with full-screen drop overlay;
refactor upload logic into a shared uploadFile callback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Messaging:
- Optimistic UI: message appears instantly in sender's view on send
- Skip WS relay-back of own messages to avoid duplicates
- Fix sent_at field name mismatch (sentAt → sent_at fallback)
Admin portal:
- /admin route: list all users, storage used vs quota, file count
- Inline-edit per-user storage quota (MB) and admin flag
- Stats header: total users, total storage, total files
- is_admin + storage_quota_mb columns added to users table
- Login response now includes isAdmin; sidebar shows Admin link for admins
- requireAdmin middleware on all /admin/* routes
Electron desktop app (desktop/):
- BrowserWindow with native title bar, system tray, hide-to-tray on close
- First-run setup dialog to configure self-hosted server URL
- Persists server URL via electron-store
- Tray menu: Open, Change server URL, Quit
- IPC: showNotification for future native push notifications
- electron-builder config for macOS (DMG), Windows (NSIS), Linux (AppImage)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace libsodium with pure Web Crypto X25519 ECDH for key exchange
- Sealed-box pattern: ephemeral keypair + HKDF + AES-256-GCM for each recipient
- Store encrypted conversation key per-user so each party decrypts with their own private key
- PBKDF2-derived master key wraps X25519 private key (pkcs8) server-side for cross-device login
- Fix health endpoint ordering so it never hits auth middleware (401 bug)
- Fix postgres port exposure in docker-compose for backend connectivity
- Fix DrivePage react-query v5 onSuccess → useEffect migration
- Fix MessagesPage: use <Link> instead of <a href> to avoid page reload losing in-memory keys
- Fix formatDistanceToNow crash on WebSocket messages lacking sent_at (add fallback + null guard)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Zero-knowledge architecture: all encryption/decryption client-side via Web Crypto API
- AES-GCM 256 for messages, files, and key wrapping; PBKDF2 for password-based key derivation
- Node.js/TypeScript backend: JWT auth with refresh rotation, argon2id passwords, TOTP 2FA
- PostgreSQL schema: encrypted blobs only, server never stores plaintext
- Real-time messaging via WebSocket relay (server routes ciphertext, cannot read it)
- Encrypted file upload/download with per-file keys wrapped by user master key
- React PWA frontend: Vite + Tailwind + service worker for offline support
- Docker Compose: postgres + backend + frontend + nginx with TLS
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>