Whenever we log into modern social networks—whether X, Telegram, Bluesky, or Meta platforms—we accept an unspoken trade-off. Server operators see nearly everything: message histories, social graphs, active hours, and every tap on the screen. Meanwhile, "For You" feeds are steered by closed-source models built to maximize screen time at any cost, pushing clickbait, polarization, and paid ads.
People have tried alternatives before, from federated Fediverse networks (Mastodon, ActivityPub) to decentralized protocols like Nostr. Yet those often hit frustrating extremes: either painful server setup and sluggish sync, or no end-to-end encryption in direct messages.
Independent developer effka11 has offered a comprehensive answer: the open-source Flora Ecosystem (AGPL-3.0, hosted at social.flora-s.net). It combines strict cryptographic privacy for private chats with a transparent math formula for the public feed.
Let's dive into Flora's source code and trace its engineering anatomy, from Rust network envelopes to its ranking equation.
A Modular Rust Monolith and Modern Clients
Instead of a trendy but resource-heavy microservices setup, Flora's backend is built as a high-performance modular monolith in Rust (flora-api), backed by PostgreSQL 16+.
Choosing Rust gives predictable latency when handling tens of thousands of concurrent WebSocket connections with no garbage-collector pauses. The monolith is cleanly split into isolated domain modules: auth, profiles, encrypted envelope delivery, and the ranking pipeline. Its toolchain and dependency management also echo practices we saw in pnpm 12.11.0: Rust Toolchain Management, AI Agent Skills, and Granular Permissions.
On the client side, there are two apps:
- A web app built on Next.js 16 and TypeScript, supporting SSR and local cryptographic operations via Web Crypto API and WASM modules;
- A cross-platform mobile app built with Expo (React Native) for iOS and Android.
The FSCP v1 Protocol: Math-Backed Privacy
At the core of Flora's private messaging is FSCP v1 (Flora Secure Communication Protocol).
Unlike many mainstream messengers where E2E encryption is either off by default or relies on older AES-GCM setups, FSCP v1 uses a modern cipher suite:
- Symmetric message encryption: XChaCha20-Poly1305. Its 24-byte random nonce eliminates the catastrophic nonce-reuse risk that plagues standard 12-byte AES-GCM in distributed systems. Each session
messageKeyis 32 bytes long. - Asymmetric key agreement: Elliptic-curve Diffie-Hellman (X25519) for ephemeral key pairs, deriving session secrets with HKDF-SHA-256.
- Identity signatures: Ed25519. Every message is signed by the sender's private key to prevent man-in-the-middle (MitM) attacks.
Here is the core encrypted envelope struct in Rust:
// FSCP v1 encrypted envelope packet in the flora-api runtime
pub struct EncryptedEnvelope {
pub protocol_version: u8, // Protocol version (v1)
pub ephemeral_public_key: [u8; 32], // Ephemeral X25519 public key
pub recipient_key_id: [u8; 16], // Recipient key identifier
pub nonce: [u8; 24], // Random 24-byte XChaCha20 nonce
pub ciphertext: Vec<u8>, // Encrypted message payload
pub signature: [u8; 64], // Sender Ed25519 digital signature
}
Flora's server acts strictly as a "blind courier." The database stores only EncryptedEnvelope bytes and public routing metadata. Physically, the server holds no keys to decrypt text, images, or voice notes.
Zero-Knowledge Key Backups
What happens if you lose your phone? Most platforms force an ugly choice: either store keys on the server in plaintext, or lose your chat history.
Flora solves this with Zero-Knowledge Key Backup:
- At signup, the client generates a 12-word mnemonic phrase;
- Your master password runs through Argon2id key derivation (64 MiB memory, 3 iterations, 1 thread);
- The derived key encrypts your local private key store;
- Only the sealed container goes to the server. Without your master password, even someone with a full database dump can't recover your keys.
FIRA: An Open and Honest Ranking Feed
The second major piece of Flora is ditching manipulative black-box feeds in favor of the open FIRA (Flora Intelligent Ranking Algorithm) engine.
Infographic blueprint and mathematical model of Flora's FIRA algorithm balancing 70% global relevance and 30% social proximity.
Instead of opaque machine learning, public feed ranking uses a deterministic formula:
It balances two clear signals:
- GlobalRelevance (70% weight): Computed logarithmically as
log2(1 + likes + 2 * reposts + 3 * comments)so viral posts don't drown out useful ones. An exponential time decay (exp(-0.05 * age_hours)) keeps the feed fresh as yesterday's posts fade out. - SocialProximity (30% weight): Scales the score based on mutual connections with the author, ensuring posts from people you actually know stay visible.
Here is the reference implementation of FIRA:
import math
import time
def compute_fira_score(post, current_time):
# Logarithmic engagement score with action weights
engagement = math.log2(1 + post.likes + 2 * post.reposts + 3 * post.comments)
# Exponential time decay based on post age in hours
age_hours = (current_time - post.created_at) / 3600.0
decay = math.exp(-0.05 * age_hours)
global_relevance = engagement * decay
# Social proximity based on mutual connections
social_proximity = post.author_mutual_connections_count * 1.5
return 0.70 * global_relevance + 0.30 * social_proximity
Any Flora user can open settings and see the exact math behind why a post sits at the top of their feed.
The current v1 spec uses asymmetric X25519 key exchange with a symmetric session key. A full Double Ratchet with Post-Compromise Security is planned for FSCP v2.
Yes. To route messages, the server must see sender and recipient IDs plus encrypted packet sizes. Message text and attachments remain end-to-end encrypted.
Flora Ecosystem shows that social networks can thrive without user surveillance or opaque algorithms—powered instead by open code and clean math.

![Node.JS [ru]](/api/digests/it_development/daily/20261017/assets/sources/we-use-js.jpg?v=c0e73553e6eb6a7d832be97bcd3f1ecdae4ce271021d2683f468d654debdc973)

