跳到內容
GitHub

Component Map

Unaudited

本頁內容尚未翻譯。

Capsule is one repository. A Rust core holds the logic every client shares, each app reaches it through a binding for its platform, and the server is a separate Rust binary that speaks to clients only over its REST contract. What crosses that contract is the subject of Server Architecture.

ciphertext over REST capsule-swift capsule-android capsule-web capsule-cli capsule-core-ffi capsule-core-kotlin capsule-wasm capsule-sdk capsule-library ptpip-rs capsule-core Rawshift Chromahash capsule-server Postgres Blob store
Each app links the shared Rust core through its platform's binding; the server meets clients only over REST

An arrow points from a component to what it depends on, through the path that carries the architecture: each app reaches the shared Rust through a binding for its platform (the accent nodes), the CLI directly, and the server is a separate binary the SDK reaches only over REST. Shorter links that skip a step (the CLI and the Apple binding also linking capsule-library directly, and the SDK, the CLI, the server and xtask using capsule-i18n) are left out. One link is a build step rather than a dependency: Spargen generates the SDK’s REST client from the OpenAPI document the server emits, so the client cannot drift from the contract.

Component Role
capsule-core Stateless shared logic: keys and encryption, media policy, sidecars and provenance. It holds no state and does no I/O of its own.
capsule-library A client’s local state over the core: the SQLite catalog, the on-disk library and its lock, import scanning and backup file I/O.
capsule-sdk The generated REST client wrapped in Capsule’s workflows, and the app-facing uniffi namespace (capsule_sdk) through which the apps reach the library and core.
capsule-i18n Runtime localization for the Rust surfaces, from the strings in the repository’s locales/.
ptpip-rs A pure-Rust PTP/IP initiator for importing straight from a camera (Import — Camera Import).
capsule-core-ffi The one static library an Apple app links, bundling the SDK’s and library’s uniffi surface.
capsule-core-kotlin The Android library over the SDK’s shared object and its generated Kotlin bindings.
capsule-core-swift A SwiftPM harness proving the Swift bindings work before the app links them.
capsule-wasm The browser surface over the core: opening share links and sealing guest uploads client-side.
capsule-swift The SwiftUI app for iPhone, iPad and Mac.
capsule-android The Jetpack Compose app.
capsule-web The web client: authenticated viewing, share links and guest upload.
capsule-cli The capsule binary and the reference client: every user flow lands here first and is reachable as a --json subcommand.
capsule-server The Kynos REST/OpenAPI server, holding ciphertext and a key-free index (Server Architecture).
capsule-e2e End-to-end cases over the real SDK, library and server, wired together the way they ship (Testing and Validation).
capsule-docs This site, including the reference pages generated from the server’s and SDK’s surfaces.
xtask Repository maintenance tasks.

Each app’s platform contract is Clients, and the rules for what may become a shared library are under Server Architecture — Dependency Boundaries.