# telegram-mini-app-pro

> Production-ready Telegram Mini App code: viewport and theme fixes, native buttons, server-side initData verification, Stars payments, TON Connect and Docker deploy.

telegram-mini-app-pro is a paid AI agent skill on Agensi by Asilbek Roʻziyev, in Frontend & Web Apps. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $8 (one-time purchase)
- Creator: [Asilbek Roʻziyev](https://www.agensi.io/creators/asilbek-ro-ziyev)
- Category: [Frontend & Web Apps](https://www.agensi.io/skills/frontend-web-apps)
- Version: 1.1
- Last updated: 2026-10-20
- Security: scan passed (2026-10-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/telegram-mini-app-pro
- Tags: telegram, mini-app, react, ton, payments

## About this skill

Telegram Mini Apps run in a special WebView, and most problems come from details the docs scatter across many pages: the 100vh bug, the app closing when the user scrolls, handlers firing twice, unverified user identity, and payments confirmed only on the client. Telegram Mini App Pro gives your AI coding agent a tested workflow and working reference code for each of these.

WHAT IT DOES
- Builds or fixes Mini Apps in React + Vite, Next.js or plain JS
- Verifies every user on the server before trusting their id
- Adds Telegram Stars payments and TON wallet connect with the server-side checks that protect your money
- Prepares deployment: Docker, nginx, HTTPS and BotFather setup

WHAT IS COVERED
- Viewport and layout: stable height variables instead of 100vh, safe areas for fullscreen mode and notches (Bot API 8.0+), disabling swipe-to-close while scrolling (Bot API 7.7+)
- Theme: Telegram theme variables mapped to Tailwind tokens, live light/dark updates, no flash on load
- Native UI: MainButton and BackButton React hooks with proper cleanup (no duplicate handlers), haptic feedback, confirm and alert popups
- Authentication: initData verification in Node.js and Python (HMAC with the bot token), plus the Ed25519 method for third-party verification, freshness checks and constant-time comparison
- Telegram Stars: server-created invoices, pre-checkout handling, idempotent fulfilment, refunds
- TON Connect: manifest, provider, wallet ownership proof, and on-chain confirmation before delivering goods
- Deployment: multi-stage Dockerfile, SPA nginx config that works inside Telegram Web's iframe, HTTPS notes, BotFather steps

WHAT YOU GET
- SKILL.md with a 5-step workflow (context, client scaffold, server auth, optional features, deploy)
- 6 reference files: viewport-and-theme, native-ui, init-data-verification, stars-payments, ton-connect, docker-and-botfather
- A test checklist in every reference, including a tampered-initData test that must return 401

HOW TO USE
Install the skill and ask, for example:
- "My Telegram Mini App is cut off at the bottom and closes when I scroll. Fix it."
- "Add secure login to my FastAPI backend using Telegram initData."
- "Add a 100 Stars purchase to my Mini App."
The skill asks up to 3 short questions (frontend, backend language, features), then continues.

HONEST LIMITS
Mini Apps must be tested inside Telegram on iOS, Android and Desktop; a normal browser does not reproduce everything. Some features need newer Bot API versions, and the skill adds version checks and fallbacks. Payment and wallet code is a starting point: review it and test with a test bot or testnet before real money. Stars are for digital goods; check Telegram's current terms before launch.

## Requires

- Python
- Node.js

## Known limitations

Requires valid SSL for production. Cryptographic verification requires a backend server; client-side-only validation is insecure.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the telegram-mini-app-pro skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill improve upon Telegram Mini Apps generated by standard AI coding agents?

This skill provides a production-grade scaffold that fixes common AI-generated bugs like the 100vh viewport overflow, insecure backend authentication, and broken theme synchronization between Telegram and your app.

### Which AI agents and frameworks is this skill compatible with?

It is optimized for use with Cursor, Claude Code, and Windsurf, providing the specific architecture and hooks these agents usually miss when working with the Telegram Web App SDK.

### What technical assets are included in the purchase?

You receive a comprehensive boilerplate featuring dynamic CSS viewport variables, native UI controllers (MainButton, Haptics), and secure cryptographic HMAC-SHA256 signature verification for Node.js, Python, and Go backends.

### Does this skill support e-commerce features and Telegram Star payments?

Yes, the scaffold includes battle-tested components for managing product catalogs, shopping carts, and native Telegram Star payments, as well as TON wallet integration for Web3 projects.

### How difficult is the installation process for an existing project?

Setup is streamlined for React and Next.js environments; you can initialize the core architecture in minutes by following the included implementation guide tailored for Vite and Tailwind CSS.

### How does the skill solve the '100vh' scrolling issue on mobile devices?

The skill includes a 'Safe-Area' hook that automatically maps Telegram's dynamic viewport height to CSS variables, ensuring your UI elements never get hidden behind the native bottom bar or header.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
