< Go Back

Telegram $TON mini-apps Best development practices

What are mini-apps in Telegram?

Mini-apps in Telegram are lightweight web applications integrated into the messenger interface. They allow users to interact with services and get information directly inside Telegram.

👀Ton mini apps , Github

Article preview

But Telegram also has bots, let's understand the key difference between them:

Key Differences Between Mini-Apps and Bots

AspectMini-AppsBots
DefinitionWeb applications embedded within the Telegram interface.Automated accounts performing tasks through chat interactions.
InterfaceGraphical interface, running within the web window.Chat interface with text commands and buttons.
TechnologiesUse HTML, CSS, JavaScript to build web pages.Interact via Telegram Bot API, function as server-side applications.
User InteractionInteractive and visually rich, support multimedia content and complex forms.Primarily text-based interactions through commands and inline buttons.
Creation ProcessDeveloped as web apps using standard web technologies.Programmed using various languages, integrated with Telegram through API.
Use CasesOnline shopping, booking, games, dashboards.Customer support, notifications, data collection, task automation.
Access ScenariosAccessed via links in chats or menu, open within the messenger window.Interaction through chat window, commands, and requests.
Advantages- Rich user interface.
- Instant access without installation.
- Easy to update.
- Simple interaction via text.
- Flexible task execution.
- Notifications and auto-responses.
Limitations- Dependence on web technologies.
- Limited to client-side use.
- Limited graphical interface.
- Complexity in creating interactive elements.
Table: Key differences between bots & mini-apps in Telegram


Poor Practices in Mini-Apps: Common Issues and How to Avoid Them

1. Content in the window is not fixed, random swipes close the Telegram app easily.

Issue:

  • When the mini-apps interface is not properly anchored, unintentional swipes or gestures by users can close the application, disrupting their experience.

Solution:
👀Link
- Implement swipe gesture handling to ensure that navigation gestures within the mini-app are properly contained and do not conflict with Telegram's default behavior. Use this Link

2. Content larger than the webview window in Telegram.

Issue:

  • If the mini-app content exceeds the size of the WebView window, users may experience difficulty navigating or viewing content, leading to a frustrating experience.

Solution:

👀Link

  • Design the mini-apps content to be responsive and adaptive to various screen sizes.
  • Use CSS media queries and flexible layouts to ensure the content fits well within the available viewportHeight space.

3. Non-native interface animations, users closes app.

Issue:

  • Implementing animations that are not aligned with native mobile interactions can confuse users, as they might expect different behaviors.

Solution:

  • Utilize animations that mimic native behaviors to create a more intuitive experience.
  • Align interface interactions with the expected mobile gestures, like swipe-to-refresh or drag-and-drop, where appropriate.

4. Login through a bot, added security but potential can block some users to interact with bot due to high load.

Issue:

  • Using a bot as a gateway to the mini-app can add an extra layer of security from botnets, but it can also risk the bot can block some users to interact with bot due to high load. Because telegram have restrictions about 30 messages in second to all users.

Solution:

  • Use direct links to the mini-app for promoting & inviting.
  • Use Telegram’s built-in Web Apps feature for secure and seamless authentication without relying excessively on bots.
  • Use some services like AWS Lambda for high-load apps. https://aws.amazon.com/ru/lambda/


To create effective and user-friendly mini-apps in Telegram, it is crucial to avoid common pitfalls such as unanchored content, oversized interfaces, non-native animations, bot-based logins that might lead to blocking, and improper scrolling behavior. By following good practices like responsive design, native-like animations, secure and efficient login methods, and proper scroll handling, developers can enhance the usability and reliability of their mini-apps.

And don't forget that we in Unlima can help you with development qulity and reliable product for you needs!

@mint0x

We are happy to talk with you!

Connect with us via social messenger, chat or other legal method!

Contact us

Last Posts

Let’s connect✌️

You can fill form or write directly to
info@unlima.com

    THANK YOU 🤗

    We will contact you soon as possible !