- Home
- Skills
- APIs & Backend
- telegram-mini-app-pro
More screenshots
Works with the AI tools you already use
Telegram Mini App Pro
Scaffold production-grade Telegram Mini Apps with viewport height fixes, theme synchronization, secure initData verification, and native UI controls.
$8
telegram-mini-app-pro
Example session with this skill installed
Build a React scaffold for a Telegram Mini App with a checkout button and secure backend verification.
- Read your context and instructions
- Compiled the telegram-mini-app-pro
- Generated the app files
I have generated a production-grade React scaffold with a companion Node.js backend to handle Telegram's native UI and cryptographic security.
TMA Production Scaffold
Frontend: React + SDK Integration
import { useEffect } from 'react';
const TelegramApp = () => {
useEffect(() => {
const tg = window.Telegram.WebApp;
tg.ready();
tg.expand();
// Setup MainButton for Checkout
tg.MainButton.setText('CHECKOUT ($25.00)');
tg.MainButton.show();
tg.MainButton.onClick(() => {
tg.HapticFeedback.notificationOccurred('success');
console.log('Payment initiated');
});
return () => tg.MainButton.hide();
}, []);
return (
<div style={{
height: 'var(--tg-viewport-height)',
backgroundColor: 'var(--tg-theme-bg-color)',
color: 'var(--tg-theme-text-color)'
}}>
<h1>Premium Service</h1>
<p style={{ color: 'var(--tg-theme-hint-color)' }}>Secure Telegram Checkout</p>
</div>
);
};
Backend: Node.js Auth Middleware
const crypto = require('crypto');
function verifyTelegramAuth(initData, botToken) {
const urlParams = new URLSearchParams(initData);
const hash = urlParams.get('hash');
urlParams.delete('hash');
const dataCheckString = Array.from(urlParams.entries())
.sort(([a], [b]) => a.localeCompare(b))
.map(([key, value]) => `${key}=${value}`)
.join('\n');
const secretKey = crypto.createHmac('sha256', 'WebAppData').update(botToken).digest();
const signature = crypto.createHmac('sha256', secretKey).update(dataCheckString).digest('hex');
const authDate = parseInt(urlParams.get('auth_date'));
const isExpired = (Math.floor(Date.now() / 1000) - authDate) > 86400;
return signature === hash && !isExpired;
}
Next steps
- Set your WebApp URL in @BotFather using the
/setwebappcommand. - Deploy the backend with your
TELEGRAM_BOT_TOKENas an environment variable. - Include
<script src="https://telegram.org/js/telegram-web-app.js"></script>in your index.html.
telegram-mini-app-pro-app.zip
ZIP · project files
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The Problem: Fragile AI-Generated Telegram Mini Apps
AI coding agents like Cursor and Claude Code often fail when building Telegram Mini Apps (TMAs). They commonly introduce critical bugs: the notorious 100vh mobile viewport overflow (hiding checkout buttons behind Telegram's bottom bar), broken dark/light theme synchronization, insecure backend authentication, and missing native UI lifecycle hooks (MainButton, BackButton, Haptics).
What Telegram Mini App Pro Delivers
- Bulletproof Viewport & Safe-Area Architecture: Eliminates the 100vh scrolling bug with dynamic CSS viewport variables (
--tg-viewport-height,--tg-viewport-stable-height) and auto-expansion hooks. - Native UI Integration: Seamlessly binds Telegram's native
MainButton,BackButton, and multi-tierHapticFeedback(impact, notification, selection) to your app's state. - Zero-Trust Backend Authentication: Generates secure cryptographic HMAC-SHA256 signature verification algorithms for
initDataacross Node.js, Python, and Go backends to stop spoofed user IDs. - Dynamic Theme Sync: Maps Telegram's native
themeParamsdirectly to Tailwind CSS color palettes for instantaneous dark/light mode transitions without flashing. - E-Commerce & Web3 Ready: Includes battle-tested scaffolding for product catalogs, cart management, Telegram Star payments, and TON wallet integration.
Supported Frameworks
Optimized for React, Next.js (App Router), Vite, Tailwind CSS, and the official @telegram-apps/sdk.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 day ago
- Passed all security checks, Safe to install