vaha_
EN English
← Index No. 05 / 21

Case file · Flagship · iOS · Android · Desktop

TerraCrypt Messenger

Messenger on a custom curve

End-to-end encrypted messenger across iOS, Android, Tauri desktop and a full self-hosted Go backend, with an admin dashboard and a complete observability stack. Group chats, voice, video and file transfer — all under cryptography that runs on the device. The first large system where the one-core-many-clients pattern proved itself, and the ancestor of the post-quantum rework in Nitva.

Field
Flagship · iOS · Android · Desktop
Years
2022 → present
State
live
System
iOS · Android · Desktop · Server
TerraCrypt Messenger — Messenger on a custom curve
Screenshot · No. 05 TerraCrypt — clients on three platforms share the same C crypto layer.

What it does

01 / 07
  1. Native iOS client in a modular SPM monorepo (Core*, Feature*) with its own crypto packages
  2. Android client in Kotlin, data/domain/ui architecture, multi-module Gradle
  3. Tauri desktop for Windows, macOS and Linux (~20 MB installer, no Chromium)
  4. Go monorepo backend: API, signaling, push, payments, PostgreSQL + Redis migrations
  5. CoTURN for NAT traversal and MinIO as S3-compatible encrypted media storage
  6. Admin control plane (RBAC + audit trail) with real-time metrics
  7. Observability: Grafana, Loki, Fluent-bit, Kibana, APM traces and Prometheus endpoints

Layers

02 / 03

On-device cryptography

SwiftKotlinCJNI
  • Custom elliptic curve and own primitives, not just a call into someone's library
  • CoreCrypto / CoreCryptoDM / CoreCryptoGroup: primitives, DM and group encryption
  • Native C layer over JNI on Android — identical behaviour to iOS
  • Encrypted local database (SQLCipher) and a biometric vault

Clients

SwiftUICombineComposeTauri 2
  • iOS: SwiftUI + Combine, WebRTC group calls with own signalling
  • Android: Jetpack Compose, Hilt, Room, WorkManager for reliable background work
  • Desktop: Rust core + TypeScript/Vite, auto-update and code signing
  • A notification extension decrypts push messages before the OS shows them

Backend and observability

GoPostgreSQLRedisDockerGrafana
  • Go services in a Docker Compose stack, horizontally scalable
  • PostgreSQL as the main store with custom migrations, Redis for sessions and rate limiting
  • Apache and nginx reverse proxies with a vhost per service
  • Zero-downtime live updates on the production server

Technologies

03 / 03
Languages SwiftKotlinRustTypeScriptGoPHPC 07
Frameworks & tools SwiftUICombineJetpack ComposeHiltRoomTauri 2ReactWebRTC 08
Infrastructure PostgreSQLRedisCoTURNMinIODocker ComposeGrafanaLokiKibana 08

Every system on file

Back to the index →