linagora / twake-on-matrix
A multi-platform (Flutter) application for connecting to Matrix - an open network for secure, decentralized communication, with your favorite devices.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing linagora/twake-on-matrix in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewTwake Chat Client Website • View Demo • Report Bug • Roadmap • Translate Twake Twake Chat is an open source, decentralized chat app based on the Matrix protocol. It was developed by Linagora. Twake Chat is a good option for individuals and organizations who are looking for a secure and decentralized chat app. It is also a good choice for developers who want to build their own Matrix-based chat apps. Features • Send all kinds of messages, images and files • Voice messages • Location sharing • Push notifications • Unlimited private and public group chats • Public channels with thousands of participants • Feature rich group moderation including all matrix features • Discover and join public groups • Dark mode • Custom themes • Hides complexity of Matrix IDs behind simple QR codes • Custom emotes and stickers • Spaces • Compatible with Element, Nheko, NeoChat and all other Matrix apps • End to end encryption • Emoji verification & cross signing • And much more... Development Please make sure to run the following command at first, to verify your code before each commit: Requirements • [ ] Flutter 3.38.9 You can at any moment verify your flutter installation using: Web If you only plan to work on the target we recommend installing Google Chrome as it is the default supported target _(Flutter being developped by Google)_. It is also **required** to have a web ready version of libolm available in the folder. You can build a version using: Android • [ ] An implementation of JDK 17 _(tested with openjdk-17.0.13+11)_ • [ ] (Optional) Android Studio • [ ] An Android SDK with: • [ ] Android build tools: 34.0.0 • [ ] Android platform: 31, 32, 33, 34, 35 • [ ] CMake: 3.22.1 • [ ] Android NDK: 26.1.10909125 • [ ] Google APIs: enabled _Note: Gradle will try to install the JDK 8. If for any reasons the operation failed, try to install your own and use this method to tell Gradle where to find it._ Linux • [ ] Lib JsonCPP • [ ] Lib Secret • [ ] Lib RHash • [ ] Lib WebKit 2 GTK • [ ] Lib OLM _If needed, a complete list is available in the ._ On Ubuntu, the following command should install all the required elements: --- In addition, the Linux build requires Rust. For macOS or Linux, execute the following command in a terminal emulator: For Windows, you can use the Rust Installer. In case you have Rust already installed, make sure to update it to latest version: A is provided in order to ease the process of setting up your dev environment. Check out the install instructions: https://devenv.sh/getting-started/ Then you can use to fire up your environment. _This can be automated thanks to: _ Supported platforms: • [x] Linux x86_64 • [ ] MacOS aarch_64 • [ ] MacOS x86_64 • [ ] Windows WSL Configure the app In order to run the web target you must provide a default configuration file. This can be done by copying the to . Here is an example working with : Running the code Before running the app, please update the dependencies: Now you can run the project: Build Please use the helper script corresponding to your target in order to build: Web Linux Android Performance Profiling Why Chrome DevTools instead of Flutter DevTools? Flutter DevTools is designed for native (iOS/Android/Desktop) profiling and provides frame-level insights via the Dart VM. On **Flutter Web** however, the Dart code is compiled to JavaScript and runs inside a browser engine. Flutter DevTools cannot profile the JavaScript execution, browser rendering pipeline, or web worker scheduling. **Chrome DevTools Performance panel** is the right tool for Flutter Web because it captures the actual browser behavior: main thread long tasks, animation frame durations, garbage collection pauses, network timing, and GPU compositing — which is where the real bottlenecks are on web. The problem with manual analysis A Chrome DevTools performance trace recorded over a typical user session (navigating conversations, scrolling, viewing members) produces a **JSON file exceeding 350,000 lines**. The flame chart is virtually unreadable by eye for identifying patterns across hundreds of animation frames and long tasks. Automated profiling with Chrome DevTools MCP We use the Chrome DevTools MCP server connected to an AI coding assistant (OpenCode + Claude Code) to **automate the entire profiling workflow**: • **Install the MCP server** — add to your OpenCode MCP configuration (~/.config/opencode/opencode.json): • **Switch to the original branch you want to compare with your changes** • **Ask Claude Opus 4.6 to perform the profiling** — example prompt: > Run the app on Chrome, in profile mode, connect via the Chrome DevTools MCP, set CPU throttling to 4x (recommended threshold to simulate a low-end device), start a performance trace, navigate through the app (open DM conversations, group rooms, scroll through messages, view member lists), stop the trace, and analyze the results. Compare before/after if applicable (Sync XHR (main thread), Animation frame avg, Jank, Long tasks, JS Heap). Every now and then, manually scroll through the app using your mouse to make sure that the programmatic scrolling isn't skewing the data. • **Switch to the branch where your changes are and ask again the AI to run the app and compare with the first run** • **What the AI does automatically**: • Connects to the running Chrome instance via the DevTools Protocol • Sets CPU 4x throttling to simulate a low-end device • Starts a performance trace recording • Navigates the app by dispatching pointer/wheel events on the Flutter canvas • Stops the trace and saves the raw JSON (typically 20+ MB compressed) • Parses the trace programmatically to extract: long tasks (>50ms), animation frame durations (avg, P95, P99, jank %), GC pauses, XHR/sync timing, JS heap size • Produces a comparison table if a baseline trace exists Key metrics to watch | Metric | Target | Description | | ---------------------- | -------- | -----------------------------------------…