Plexus is a production messenger for web and Android: direct and group chats, calls, files, live location and an integrated AI assistant. This compact version keeps only the important parts: the service architecture, the path of one message and the end-to-end encryption boundary.
This is an engineering walkthrough of the production implementation as of November 2026 — not a user guide, a security audit or an availability guarantee. Details may change.
The product is already a full messenger rather than a chat demo. The short version:
Two zoom levels matter here: the messenger boundary itself, then the whole production platform it shares with reader, map and VPN. Identity is centralised in plexus-auth; AI, mail and push are separate services; Kafka carries user events between nodes.
The focused diagram shows the messenger boundary: clients use the session API, while mail, AI and push reach only their token-scoped internal routes or Kafka.
Read the diagram by lanes: clients and edge on the left, the Docker Compose host in the centre and external providers on the right. Solid lines are runtime traffic; low-contrast dotted lines are operations and control-plane paths. Click the diagram to open it full size.
A sealed chat, an offline recipient, one short sentence. This is the actual path it takes through the system.
The UI builds the payload — text, quote, attachment descriptors — as UTF-8 JSON. The message content has not left the device yet.
WebCrypto mints a 256-bit content key K and AES-256-GCM-encrypts the payload under a random IV.
For each of their devices: wrapKey = SHA-256(ECDH(myPriv, theirPub) ‖ "plexus-e2e-wrap" ‖ ids),
then AES-GCM-seal K under it. Phone and tablet each get their own copy.
The envelope — {v, s, c, w{…}} — goes up over the session. Attachments travel as separately
keyed blobs (plexus-e2e-file-v1 AAD).
The row lands in assistant_messages under the at-rest enc1 key — a second envelope around
an envelope the server already cannot open.
A message-posted user event lands on plexus-user-events; both core nodes consume
it, so the recipient's node can answer regardless of which one took the POST.
Any connected device gets the envelope on its /api/events stream — delivery and later read
receipts are distributed as their own events to the participating devices.
plexus-push sees the event on the topic, asks /internal/push/targets who to wake — dormant
accounts skipped, dead tokens reported back — and FCM delivers a silent data push.
Their device recomputes ECDH(theirPriv, yourPub), unwraps K from its personal
w[device] entry. The wrap key is not stored; it is recomputed on the recipient device.
AES-256-GCM verifies and decrypts; the bubble renders — and your ticks flip to delivered, then read.
The Caddy edge, the database, Kafka and the push satellite all handle metadata and ciphertext. None of them needs the message plaintext.
Imagine the sender locks the letter in a small safe before it leaves the phone. Plexus servers move that safe, know who sent it and when, but do not hold the key. Only verified recipient devices carry their own wrapped copy of the key.
The e2e1 spec is implemented in WebCrypto and Kotlin against the same binary format, so a phone can unwrap what a browser sealed. The mechanism protects content from a passive server. Because the server operates the key directory, fingerprint verification is the user's defence against key substitution.
An ECDH P-256 pair is generated locally; the public half registers at /api/crypto/keys. The private half never leaves the device unencrypted; encrypted link or backup bundles may carry it.
Scan a QR code on an already-trusted device — it seals identity material for the new device through a short-lived link session. Key-set changes remain visible through fingerprint warnings; a changed device key set also triggers a notification to the registered e-mail address.
Each client remembers the peer key-set fingerprint it first trusted; a changed set raises a verify dialog instead of silently re-sealing. The encrypted key backup rides a separate backup blob.
Attachments get their own content key and integrity hash; shared coordinates travel inside the same envelope — the server can still process metadata such as participants, time, size and delivery state; the message content remains hidden inside the E2E envelope.