Read this in other languages: Русский
Monogram is a modern, lightning-fast, and elegant unofficial Telegram client for Android. Built with Jetpack Compose and Material Design 3, it aims to provide a native and fluid experience while leveraging the power of the official TDLib.
Note: Monogram is currently in active development. Expect frequent updates, architectural changes, and the occasional bug.
Support the project on Boosty.
- Material Design 3: A beautiful, adaptive UI that looks great on phones, tablets, and foldables.
- Clean Architecture: Separation of concerns with Domain, Data, and Presentation layers.
- MVI Pattern: Predictable state management using MVIKotlin.
- Secure: Built-in biometric locking and encrypted local storage.
- Media Rich: High-performance media playback with ExoPlayer and Coil 3.
- Fast & Efficient: Powered by Kotlin Coroutines and optimized for performance.
Monogram leverages the latest Android development tools and libraries:
| Category | Libraries |
|---|---|
| Language | Kotlin |
| UI Toolkit | Jetpack Compose (Material 3) |
| Architecture | Decompose (Navigation), MVIKotlin |
| Dependency Injection | Koin |
| Async | Coroutines & Flow |
| Telegram Core | TDLib (Telegram Database Library) |
| Image Loading | Coil 3 |
| Media | Media3 (ExoPlayer) |
| Maps | MapLibre |
| Local DB | Room |
The project follows a multi-module structure to ensure separation of concerns and scalability:
- :app - The main Android application module.
- :domain - Pure Kotlin module containing business logic, use cases, and repository interfaces.
- :data - Implementation of repositories, data sources, and TDLib integration.
- :presentation - UI components, screens, and view models (MVI Stores).
- :core - Common utility classes and extensions used across modules.
- :baselineprofile - Baseline Profiles for optimizing app startup and performance.
Follow these steps to set up the project locally.
- Android Studio: Ladybug or newer (recommended).
- JDK: Java 17 or newer.
git clone https://github.com/monogram-android/monogram.git
cd monogramTo connect to Telegram servers, you need your own API credentials.
- Log in to my.telegram.org.
- Go to API development tools.
- Create a new application to get your
App api_idandApp api_hash. - Create a file named
local.propertiesin the root directory of the project (if it doesn't exist). - Add the following lines:
API_ID=12345678
API_HASH=your_api_hash_here- Log in to the Firebase console
- Create a new project.
- Add a new application with the applicationId you need (if you have multiple applications with different IDs, you will need to create multiple applications). By default, the applicationId for debug and release builds is different!
- The console will create a
google-services.jsonfile, which you can copy to the root of the app module (monogram/app/google-services.json). If you have created multiple applications, only copy the most recent config. - Go to the "Cloud Messaging" section.
- Click on the Manage service accounts link.
- In the window that opens, select the top Keys section.
- Click on the Add key button and select the JSON option in the dialog box. Wait for the file to be downloaded to your computer.
- Return to the page where you received the App ID from Telegram.
- Click on the Update button next to the FCM credentials section.
- Upload the JSON of the service account in the page that opens.
- Open the project in Android Studio.
- Increase the IDE indexing limits so
TdApi.java(the TDLib wrapper) is indexed correctly:
# custom IntelliJ IDEA properties (expand/override 'bin\idea.properties')
# size in Kb
idea.max.intellisense.filesize=20480
# size in Kb
idea.max.content.load.filesize=20480- In Android Studio or IntelliJ IDEA, open Help -> Edit Custom Properties..., paste the lines above, and restart the IDE if prompted.
- Sync Gradle.
- Select the
apprun configuration. - Connect a device or start an emulator.
- Click Run.
If you need to build TDLib from source, you must first install the required dependencies on your system. For Debian/Ubuntu-based distributions, you can install them by running:
sudo apt-get update
sudo apt-get install build-essential git curl wget php perl gperf unzip zip default-jdk cmakeOnce the dependencies are installed, you can start the build process by executing the build script from the root of your project:
./build-tdlib.shWe welcome contributions! Whether it's fixing bugs, improving documentation, or suggesting new features.
- Check the Issues: Look for open issues or create a new one to discuss your ideas.
- Work from
develop: Create your branch fromdevelopand keep your work based on that branch. - Fork & Branch: Fork the repo and create a feature branch.
- Code Style: Please follow the existing Kotlin coding style and Clean Architecture guidelines.
- Submit a PR: Open a Pull Request to
developwith a clear description of your changes.
Important:
- Respect the Telegram API Terms of Service.
- Ensure your code passes all checks and tests.
This project is licensed under the GNU General Public License v3.0. See LICENSE for the full text.