Architecture
┌──────────┐ login │ Auth0 │ ┌──────────────▶│ (JWT) │ │ └──────────┘┌────┴─────┐ REST/protobuf ┌──────────────┐ ┌────────────┐│ Client │─────────────────▶│ Lupyd Server │─────▶│ PostgreSQL ││ app │ └──────┬───────┘ └────────────┘│ │ │ admin API (push, blocks, accepts)│ │ REST/protobuf ┌──────▼───────┐ ┌────────────┐│ │─────────────────▶│ Firefly │─────▶│ PostgreSQL ││ │◀────────────────▶│ server │ └────────────┘└──────────┘ WebSocket / └──┬────────┬──┘ WebTransport │ │ ┌──────▼──┐ ┌──▼──────────────┐ │ FCM │ │ Encrypted blobs │ │ (push) │ │ (CDN) │ └─────────┘ └─────────────────┘Components
Section titled “Components”| Component | Role |
|---|---|
| Client apps | Android, iOS, desktop, and web apps. Messaging cryptography runs on the device through the Firefly client SDK. |
| Auth0 | Identity provider. Issues RS256 access tokens carrying uname and perms claims. |
| Lupyd Server | Social graph and content. Stateless HTTP; PostgreSQL storage. |
| Firefly server | Delivery service and directory for encrypted messaging. Stores ciphertext, key packages, and prekey bundles; validates MLS commits; pushes messages in real time. |
| CDN | Stores encrypted attachments, group history chunks, and backups. |
Request flow
Section titled “Request flow”- The client signs the user in with Auth0 and receives an access token.
- Social actions (profile, posts, follows) go to the Lupyd Server.
- The client registers the device with Firefly, obtains a signed device credential, uploads key material, and opens a real-time connection.
- Messages are encrypted on the device and sent through Firefly, which relays them to the recipients’ devices — or stores them until those devices reconnect — and sends a push notification.
- When a user blocks or accepts someone on the Lupyd Server, the server mirrors the change to Firefly so messaging and calls respect it.
Trust model
Section titled “Trust model”- The servers never see plaintext messages or message keys.
- Group handshake messages (commits) are visible to Firefly so it can enforce group rules and permissions; application messages are always encrypted.
- Device credentials are signed by Firefly and bound to the user’s Auth0 identity, so members can verify who owns each device in a group.
See End-to-end encryption for details.