API (Cerberus API)
How the .NET solution is layered: Domain, CQRS Application projects, EF Core persistence, the Web API host and the retention worker.
3 minute read
flowchart TB
subgraph devices["User devices — trusted with plaintext"]
Web["Cerberus UI · web<br/>memory only"]
Desktop["Cerberus UI · Windows / Linux<br/>ciphertext store (default mode)"]
Android["Cerberus UI · Android<br/>ciphertext store (default mode)"]
end
Software["Software client<br/>(Heimdall application identity)"]
subgraph server["Server side — never trusted with plaintext"]
Proxy["Reverse proxy<br/>(TLS)"]
API["Cerberus API<br/>.NET 10 · ASP.NET Core"]
Worker["Retention worker<br/>(hosted in the API)"]
DB[("PostgreSQL<br/>schema cerberus")]
Ledger[("Erasure ledger<br/>files outside the DB")]
Backups[("Backups")]
end
Heimdall[("Heimdall<br/>identity service")]
Web & Desktop & Android -- "HTTPS: Bearer token,<br/>vault-access handle, envelopes" --> Proxy
Software -- "HTTPS: application bearer" --> Proxy
Proxy --> API
API --- Worker
API -- "EF Core / Npgsql" --> DB
Worker --> DB
Worker --> Ledger
DB -. "pg_dump" .-> Backups
API -- "login, 2FA, person and<br/>application checks" --> Heimdall| Component | Responsibility | Never |
|---|---|---|
| Cerberus UI | Derives keys, encrypts and decrypts, verifies envelopes and fingerprints, enforces local obligations (auto-lock, lease expiry, clipboard clearing). | Sends plaintext or usable keys; decides authorization. |
| Cerberus API | Stores ciphertext and opaque wrappers, enforces ownership, grants, revisions, lifecycle and retention; issues challenges, vault-access handles and offline leases. | Decrypts content or holds a usable decryption key. |
| Heimdall | Persons, applications, sign-in, second factor; issues the bearer tokens Cerberus validates. | Sees vault content. |
| PostgreSQL | Persistence for every Cerberus entity. | Holds anything a dump could decrypt. |
| Erasure ledger | Records completed erasures outside the restorable database, so a restore can reapply them. | Holds content — only id, kind and deletion time. |
503 identity_unavailable.Both applications are shipped as containers and deployed through yggdrasil, the owner’s deployment platform, on an Ubuntu VPS under Docker behind Traefik, which terminates TLS. CI runs on Jenkins — see Continuous integration .
flowchart LR
Internet((Internet)) --> T["Traefik<br/>TLS · HSTS"]
subgraph vps["VPS — Docker"]
T --> UIc["cerberus-ui<br/>nginx-unprivileged :8080"]
T --> APIc["cerberus-api<br/>aspnet :8080"]
APIc --> PG[("PostgreSQL")]
APIc --> L[("/srv/cerberus-erasure-ledger")]
APIc --> B[("/srv/cerberus/backups")]
end
APIc --> H[("Heimdall")]How the .NET solution is layered: Domain, CQRS Application projects, EF Core persistence, the Web API host and the retention worker.
How the Flutter client is organized: features, the route guard, the crypto boundary, storage per target and the generated API client.
What the client holds, what the server stores, the key hierarchy, envelopes, proofs, offline leases — and the protocol review that gates release.