Twake Chat
Open-source Flutter Matrix client with federated identity lookup, Vodozemac E2EE, and enterprise white-labeling for decentralized team communication.
Twake Chat is a production-grade, open-source messaging client built on the Matrix protocol, developed and maintained by Linagora. It delivers end-to-end encrypted communication across Android, iOS, web, Linux, macOS, and Windows from a single Flutter codebase — without relying on any centralized infrastructure.
Unlike generic Matrix clients, Twake Chat layers several enterprise-focused capabilities on top of the open Matrix standard: federated contact discovery via the Tom protocol (find contacts by phone number or email, not Matrix IDs), ephemeral stories with media editing, and runtime enterprise configuration via CozyConfigManager for white-labeling without code changes.
The project uses Vodozemac — a modern Rust-based cryptographic library replacing the older libolm — for Olm and Megolm encryption, providing stronger security guarantees for self-hosted deployments. The web version is deployable with a single Docker command, with nginx serving pre-compressed assets and runtime JSON configuration injected at startup.
With over 7,800 commits, 65 releases, and contributions from 163 developers, Twake Chat is a mature and actively maintained project suitable for organizations that need a self-hosted alternative to Slack, Microsoft Teams, or WhatsApp with full data sovereignty.
What You Get
- End-to-end encryption with Vodozemac - Uses the modern Rust-based Vodozemac library implementing Olm and Megolm protocols, replacing the older libolm for stronger cryptographic guarantees on all platforms.
- Federated contact discovery via Tom protocol - Allows users to find Matrix contacts by phone number or email address instead of complex Matrix IDs, resolving identities across federated homeservers.
- Cross-platform Flutter support - Single Dart codebase deployed natively to Android, iOS, web, Linux, macOS, and Windows with consistent UI and performance across all targets.
- Ephemeral stories with media editing - Room-specific story posts that expire automatically, with in-app media editing and contact-based invite support, bringing Snapchat-like functionality to federated messaging.
- Enterprise white-labeling via CozyConfigManager - Runtime JSON configuration allows organizations to customize app name, homeserver, UI settings, and feature flags without recompiling the codebase.
- Docker web deployment with runtime config injection - Multi-stage Docker build produces a lean nginx image with pre-compressed assets; config.json is volume-mounted at startup for zero-downtime reconfiguration.
- QR code-based Matrix ID simplification - Hides complex Matrix user IDs behind scannable QR codes for easy device pairing and new user onboarding.
- Spaces and large public channels - Hierarchical spaces group related rooms; public channels support thousands of participants with feature-rich moderation tools.
- Full Matrix interoperability - Works seamlessly with Element, Nheko, NeoChat, and any other Matrix client via the open Matrix federation standard.
- Automated Chrome DevTools MCP performance profiling - Built-in profiling workflow using the Chrome DevTools MCP server to detect jank, long tasks, and memory leaks in Flutter Web builds with AI-assisted analysis.
Common Use Cases
- Self-hosting a team chat to replace Slack - A distributed engineering team deploys Twake Chat on their own infrastructure using Docker, connecting to a self-hosted Synapse homeserver to maintain full data sovereignty and avoid per-seat SaaS costs.
- Building a white-labeled messaging app for an organization - A healthcare provider uses CozyConfigManager to deploy Twake Chat under their own branding with a private homeserver, meeting data residency regulations without forking the codebase.
- Running a compliance-sensitive internal communications platform - A legal or financial firm deploys Twake Chat on-premises with Vodozemac E2EE enabled, satisfying audit requirements for encrypted communications with full control over encryption keys.
- Connecting distributed communities across Matrix homeservers - An open-source project maintains a public Matrix space with federated rooms, allowing members on any Matrix homeserver (matrix.org, their own, or self-hosted) to participate via Twake or any Matrix client.
- Developing a branded Matrix client using the codebase as a reference - A developer forks Twake Chat’s well-structured domain-driven architecture to build a custom Matrix client with proprietary authentication and integrations, following the established interactor/repository pattern.
Under The Hood
Architecture Twake Chat follows a strict domain-driven layered architecture that enforces separation of concerns at every level. The domain layer contains pure Dart models, repository interfaces, and use cases implemented as interactors returning functional Either types via the dartz library, keeping business logic free of framework dependencies. The data layer provides datasource interfaces with multiple backend implementations — network (Dio), local Hive collections, SQLite via sqflite_common_ffi, and in-memory caches — swapped transparently via GetIt dependency injection initialized at startup. The presentation layer handles state via RxDart streams, Provider, and sealed class hierarchies, while the pages layer splits each screen into a controller (business logic, event handling) and a view (pure Flutter widget tree). Cross-cutting concerns like federation identity lookup are isolated into dedicated modules. This architecture enables confident testing at each layer and supports the project’s 163-contributor scale without coordination overhead.
Tech Stack Flutter and Dart (SDK 3.10+) form the cross-platform foundation, targeting Android, iOS, web, Linux, macOS, and Windows from a single codebase. The Matrix Dart SDK (v7.x) handles federated protocol communication, extended with custom Hive-backed database collections and client story logic. Local persistence uses Hive for general storage and flutter_secure_storage for credentials, with Dio and dio_cache_interceptor providing cached HTTP with Hive-backed storage. Vodozemac (Rust, compiled via Cargo) replaces libolm for Olm and Megolm cryptography. Build tooling includes multi-stage Docker builds with SSH-based Rust compilation, Nix/devenv for reproducible local environments, CirrusCI and GitHub Actions for CI, Sentry for crash reporting, and Patrol for integration tests running against real Synapse and Dendrite homeservers in emulated environments.
Code Quality The project maintains extensive test coverage across 94 unit and widget test files and 104 integration test files, using Mockito for mocking and Patrol for end-to-end testing against real Matrix homeservers. The dart_code_metrics configuration enforces hard limits on cyclomatic complexity, nesting depth, method length, and argument counts, with violations surfaced as linter errors in CI. Functional error handling via dartz Either types propagates failures explicitly through interactor chains, though custom exception type coverage is uneven across subsystems. Type safety is comprehensive, leveraging Dart 3.x null safety, sealed classes for state modeling, and json_serializable for type-safe serialization. Naming conventions and test structure consistently mirror production code organization, supporting long-term maintainability at scale.
What Makes It Unique Twake Chat’s most distinctive technical contribution is the Tom protocol integration for federated contact discovery — users can find Matrix contacts by phone number or email address rather than opaque Matrix IDs, resolved through a federation of identity servers without centralizing contact data. The switch from libolm to Vodozemac (a Rust implementation of the Matrix encryption spec) provides a more auditable and memory-safe cryptographic foundation than the older C library. The ephemeral stories feature adapts the Matrix room event model to implement time-limited posts with room-specific visibility, extending the protocol beyond its typical messaging use case. The Chrome DevTools MCP profiling workflow — where an AI assistant automates trace collection, parsing, and comparison of 350,000-line performance traces — represents an unusually sophisticated approach to Flutter Web optimization embedded directly in the project’s development documentation.
Self-Hosting
Twake Chat is released under the GNU Affero General Public License v3.0 (AGPL-3.0). This is a strong copyleft license: you can use, modify, and distribute the software freely, including for commercial purposes, but any modified version you make available over a network must also be released under AGPL-3.0 with its source code accessible to users. For organizations deploying Twake Chat internally (not as a network service to outside users), the AGPL obligations are minimal — you can run a private deployment without publishing modifications. However, if you offer it as a hosted service to third parties, you must publish your changes. The license is well-suited for organizations that want to self-host without vendor lock-in and have no intent to commercialize a modified version.
Running Twake Chat yourself requires operating a Matrix homeserver (typically Synapse or Dendrite), which carries real operational overhead: you are responsible for server uptime, TLS certificate management, database backups, and Matrix federation configuration. The web client is straightforward to deploy via Docker — a single command mounts your config.json and exposes the nginx-served build. Mobile builds (Android APK, iOS IPA) must be compiled from source or obtained from the GitHub releases page and sideloaded; they are also available on Google Play and the Apple App Store under Linagora’s publisher account. Linux and Windows desktop builds require additional native system libraries. Self-hosters should plan for ongoing Flutter SDK updates when upgrading, as the project tracks a pinned Flutter version and breaks may occur across minor updates.
Linagora offers a managed cloud version of Twake Chat through their Twake Workplace suite, which adds enterprise support SLAs, managed upgrades, high-availability infrastructure, and integration with other Linagora productivity tools (Twake Drive, Twake Mail). The managed version removes the operational burden of running Synapse, handling push notification certificates, and managing TLS. Self-hosters trade these conveniences for full data sovereignty and no recurring per-seat costs. There is no feature-gating in the open-source build — all capabilities, including stories, federated contact discovery, and enterprise white-labeling via CozyConfigManager, are available without a commercial license.
Related Apps
Zed
Developer Tools · Collaboration · Code Editors
High-performance, multiplayer code editor built in Rust by the creators of Atom and Tree-sitter, with native AI integration and real-time collaboration.
Zed
OtherAppFlowy
Productivity · Project Management · Collaboration
The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.
AppFlowy
AGPL 3.0AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.