Skip to content

Telegram-Mini-Apps/tma.js

Repository files navigation

@tma.js

Mono-repository, containing all the packages, connected with comfortable and safe TypeScript development on Telegram Mini Apps platform. To learn more about specific packages, follow their own documentations.

⚠️ Working with @tma.js packages, you must not install the SDK from Telegram presented by a single file - telegram-web-app.js. Using both @tma.js packages and telegram-web-app.js will surely lead to bugs.

Packages

@tma.js/sdk

docs-badge sdk-npm-badge Size code-badge

Made from scratch TypeScript library for seamless communication with Telegram Mini Apps functionality.

The code of this library is designed to simplify the process of developers interacting with Telegram Mini Apps. It consists of several individual components, each responsible for a specific aspect of the Telegram Mini Apps ecosystem.

Before you begin using the SDK, we highly recommend familiarizing yourself with the Telegram Mini Apps documentation to grasp the fundamental concepts of the platform.

@tma.js/sdk-react

docs-badge sdk-react-npm-badge Size code-badge

React JS bindings for client SDK. Includes hooks, components and utilities for comfortable usage of React JS on the Telegram Mini Apps platform.

@tma.js/sdk-solid

docs-badge sdk-solid-npm-badge Size code-badge

Solid JS bindings for client SDK. Includes hooks, components and utilities for comfortable usage of Solid JS on the Telegram Mini Apps platform.

@tma.js/init-data-node

docs-badge init-data-node-npm-badge Size code-badge

The package provides utilities to work with the initialization data of Telegram Mini Apps on the server side. To learn more about the initialization data and its usage, please refer to the documentation.

@tma.js/solid-router-integration

docs-badge solid-router-integration-npm-badge Size code-badge

Telegram Mini Apps Navigator integration for @solidjs/router.

@tma.js/react-router-integration

docs-badge react-router-integration-npm-badge Size code-badge

Telegram Mini Apps Navigator integration for react-router-dom.

Why not Telegram SDK

Why bother creating a project like @tma.js when there are existing solutions from the developers who own the platform? The answer is rather simple: the currently provided solution (SDK) does not seem to meet the required minimum quality standards. Of course, the term 'quality' is rather specific and subjective, but this section should make it more objective.

This project was born during the research of a solution provided by Telegram - telegram-web-app.js, which is considered the only existing official SDK for Telegram Mini Apps by Telegram. Therefore, all the points described in this section will be related to this package.

Because of the large section size, the complete motivation description has been moved to a separate document.

Contribution

Any contribution is appreaciated. To start contributing, please, follow the Contribution Guidelines.