Capsule is an end-to-end-encrypted personal photo and media store with optional federation. These design docs are its normative specification. Every primitive, schema and protocol is declared in exactly one owner doc and referenced by anchor everywhere else (Core Principles — Single Source of Truth).
The shape of the system
Section titled “The shape of the system”The design stacks in layers, each building on the one below. The sidebar groups follow this order.
- Foundations: the Core Principles every component obeys, the API Surfaces map from server surface to transport, and how those surfaces become published reference (Developer Documentation).
- Cryptography: the Cryptographic Primitives inventory, the key hierarchy (Key Management), MLS Group Membership with its resilience contracts (MLS Resilience), Asset and Metadata Encryption, and Signed Manifests and Provenance. The server holds only opaque ciphertext, never a key.
- Identity and access: Authentication, Authorization and Device Enrollment.
- Storage: the Server Filesystem and Client Filesystem, the Metadata sidecar schema, Thumbnails and Previews and Quota.
- Import and sync: the Import Pipeline, Export, the Upload protocol, Download and sync, storage verification under Durability, Backup and Recovery and Versioning.
- Sharing and federation: server-to-server Federation, device-to-device Peering, Share Links, Web Upload for guest drops, and Moderation.
- Organization and clients: Asset Organization (albums and stacks), Search, Places, native client duties (Clients) and the operating systems they plug into (Platform Integrations), how a key-free server reaches a user at all (Notifications), Internationalization, and on-device AI/ML Integrations.
- Threat model: the cross-cutting damage-scenario map (Damage Scenarios and Quarantine), the risk register (Implementation Risk Register), Validation Invariants, and Schema Rules and Open Questions, which bound what a faulty or hostile client can do.
Where to start
Section titled “Where to start”- New to the project? Read Core Principles, then the Cryptography overview.
- Implementing a feature? Find the owner doc in the Core Principles — Single Source of Truth table.
- Reviewing security? Start at the Threat Model and follow each damage scenario to the owner doc that defeats it.