How asp3x/shroud works
Shroud is an end-to-end encrypted messenger with native iOS and web clients backed by a Rust API. The main workflow is a user signing in, establishing device identity, then sending and receiving encrypted messages; clients also support calls, media, notifications, and voice transcription. Client-side crypto and local history remain on devices, while the server stores and relays ciphertext. The graph combines documented deployment/data boundaries with source-index relationships; unsampled subsystem links are omitted where their callers are not shown.
Main entry points: mod.rs Rust API · App.tsx Web app · ShroudApp.swift iOS app · SessionController.swift iOS session
Components 24
Client apps
- Web app
web/src/App.tsx - iOS app
ios/shroud/App/ShroudApp.swift - Web API client
web/src/api/client.ts - iOS session
ios/shroud/Services/Auth/SessionController.swift
Identity and crypto
- Web identity crypto
web/src/crypto/bytes.ts - iOS crypto controller
ios/shroud/Services/Crypto/CryptoController.swift - Identity key material
ios/shroud/Services/Crypto/IdentityKeyMaterial.swift
Messaging and media
- Web messaging
web/src/messaging.ts - iOS messaging controller
ios/shroud/Services/Messaging/MessagingController.swift - Local message repository
ios/shroud/Services/Messaging/MessagingLocalRepository.swift - Local message store
ios/shroud/Services/Messaging/LocalMessageStore.swift - Local media cache
ios/shroud/Services/Messaging/LocalMediaCache.swift - Voice transcription
ios/shroud/Services/Transcription/WhisperKitEngine.swift
Calls and realtime
- Web call controller
web/src/calls/controller.ts - Web call crypto
web/src/calls/crypto.ts - iOS call controller
ios/shroud/Services/Calls/CallController.swift - WebRTC media engine
ios/shroud/Services/Calls/CallMediaEngine.swift - iOS realtime client
ios/shroud/Services/Realtime/RealtimeClient.swift
Server services
- Rust API
server/crates/shroud-server/src/routes/mod.rs - Authentication routes
server/crates/shroud-server/src/routes/auth.rs - PostgreSQL
- Nebular media store
- Redis fan-out
Other components
- User
Connections 23
- User → Web app: uses
README.md - User → iOS app: uses
README.md - Web app → Web API client: requests
web/src/App.tsx - iOS app → iOS session: routes session
- iOS session → iOS crypto controller: unlocks
ios/shroud/Services/Crypto/CryptoController.swift - iOS crypto controller → Identity key material: loads keys
ios/shroud/Services/Crypto/CryptoController.swift - Web app → Web identity crypto: uses crypto
web/src/App.tsx - Web app → Web messaging: presents chats
- iOS app → iOS messaging controller: presents chats
- iOS messaging controller → Local message repository: persists locally
ios/shroud/Services/Messaging/MessagingController.swift - Local message repository → Local message store: stores messages
ios/shroud/Services/Messaging/MessagingLocalRepository.swift - iOS messaging controller → Local media cache: caches media
- Web app → Web call controller: offers calls
- Web call controller → Web call crypto: derives call keys
web/src/calls/controller.ts - iOS call controller → WebRTC media engine: controls media
ios/shroud/Services/Calls/CallController.swift - iOS call controller → iOS realtime client: signals calls
ios/shroud/Services/Calls/CallController.swift - Web messaging → Voice transcription: transcribes voice
- Web API client → Rust API: HTTP requests
README.md - iOS session → Rust API: auth requests
- Rust API → Authentication routes: routes auth
server/crates/shroud-server/src/routes/auth.rs - Rust API → PostgreSQL: reads and writes
README.md - Rust API → Nebular media store: stores ciphertext blobs
README.md - Rust API → Redis fan-out: fans out realtime
README.md