Technology Stack
Project Mercury is built on a foundation of modern, secure, and cross-platform technologies, with a core philosophy of keeping all application logic separate from the user interface.
Architectural Philosophy
The application is built around a strict separation of concerns where the Core module acts as the sole engine. This core is written in C++20 and contains all business logic, state management, cryptography, and network orchestration. Platform-specific applications (like Android) are extremely thin wrappers that primarily handle UI rendering and device-specific interactions.
Component Breakdown
eillance-core: The primary module containing all application logic, data models, protocol handlers, and the view model that bridges core state to the UI.eillance-crypto: A dedicated cryptography layer wrapping BoringSSL for identity management (Ed25519), key exchange (X25519), and end-to-end encrypted sessions (AES-256-GCM).eillance-storage-sqlite: An SQLite-based implementation of the persistent storage interface, handling all database operations and schema migrations.- Signaling Server: A lightweight server that handles initial peer discovery. It helps peers find each other to establish a direct connection while minimizing exposure of private metadata.
Real-Time Communication (RTC) Protocol Stack
Mercury uses WebRTC for real-time data and media exchange. This peer-to-peer connection is established using the following standard protocols:
- Connection Establishment: ICE (RFC 8445) with STUN (RFC 8489) and TURN (RFC 8656) to navigate network firewalls and NATs.
- Security & Key Exchange: DTLS (RFC 7350, RFC 8261) is used to secure the channel and exchange cryptographic keys.
- Media Transport: SRTP (RFC 8834) is used for the secure real-time transport of encrypted audio and video streams.
- Data Channels: SCTP (RFC 8831) provides reliable and unreliable messaging for text and control data, multiplexed over the secure DTLS connection.
Key Libraries & Implementations
- Cross-platform Core: C++20
- Cryptography: BoringSSL (via
eillance-crypto) - Database: SQLite (via
eillance-storage-sqlite) - Android RTC Transport: Google WebRTC (
org.webrtc) - CLI/Desktop RTC Transport:
libdatachannel - Android UI: Jetpack Compose