Summary: how the repository and the Rust crates are laid out, which crate may depend on which, and where to make a change. Key terms: crate, ports and adapters, use case, port, adapter, composition root, auth-chad, xtask. Related:Interfaces · Data · AGENTS.md
The repository is one Rust workspace. secrets-core holds all cryptography, encodings and log validation, and the
CLI, the web app and the server all use it. The server follows a ports-and-adapters layout: secrets-server-app holds
the use cases and the traits they need, the store and HTTP crates implement those traits, and secrets-server wires
them together. Accounts come from auth-chad, a separate repository pinned by commit in Cargo.toml.
The picture as text
flowchart TB
subgraph clients [Clients]
cli[secrets-cli: secrets-chad]
web[secrets-web: Leptos, wasm]
client[secrets-client]
end
subgraph server [Server]
bin[secrets-server: wiring]
http[secrets-server-http: routes]
sqlite[secrets-store-sqlite]
pg[secrets-store-postgres]
app[secrets-server-app: use cases, ports]
end
api[secrets-api: wire types]
core[secrets-core: crypto, formats, log]
cli --> client
web --> client
client --> api
client --> core
bin --> http
bin --> sqlite
bin --> pg
http --> app
http --> api
sqlite --> app
pg --> app
app --> core
All cryptography, encodings, IDs, records, the project log and its validation. no_std with alloc, no I/O
secrets-api
shared
The JSON request and response types of the HTTP API
secrets-client
client
Everything a client checks and plans: discovery, login, pins, log verification, keys, records, changes. Generic over Http, Clock and Draws; runs on auth-chad’s client
secrets-cli
client
The secrets-chad binary: commands, export and run, files, GitHub, agent mode
secrets-web
client
The web app (Leptos, client-side rendered, wasm)
secrets-server-app
server
Use cases (App), policy functions, and the ports they need (Store, Random, AuditBuffer). No I/O
secrets-server-http
server
The axum routes, auth-chad’s account API at /v1/auth with this application’s hooks (Rules), errors, limits, the request log
secrets-store-sqlite
server
Store on SQLite (rusqlite, bundled)
secrets-store-postgres
server
Store on PostgreSQL (tokio-postgres)
secrets-store-tests
test
The Store conformance suite (conformance!), the in-memory MemStore, shared fixtures
secrets-server
server
The composition root: configuration, backend choice, real clock and randomness, listeners, shutdown
secrets-test-vectors
test
Generates and checks docs/test-vectors/
xtask
tool
CI checks for changed crates, the web bundle, release packaging