Comprehensive toolkit for building production-grade Telegram bots + Mini Apps in Node.js / TypeScript.
This repository is a collection of templates, recipes, and references designed for use with the grammY framework and the modern Telegram Mini App SDK.
templates/: Base skeletons for different parts of your project.monorepo/: Root configuration for a pnpm + Turborepo setup.bot/: Cloudflare Worker + Hono + grammY.miniapp/: Vite + React + TS + @telegram-apps/sdk.db/: Drizzle ORM + Neon/Postgres schema.
recipes/: End-to-end patterns for common bot types (Ecommerce, AI, Paywalls, etc.).references/: Technical deep-dives into the Bot API, Mini Apps, Payments, and Security.scripts/: Automation tools for setup, webhooks, and validation.SKILL.md: The decision core and master documentation for the builder.
To start a new project from these templates:
-
Scaffold the Monorepo:
mkdir my-new-bot && cd my-new-bot cp -r ../templates/monorepo/* . cp -r ../templates/monorepo/.[a-z]* . # copy hidden files
-
Add Apps and Packages:
mkdir -p apps/bot apps/miniapp packages/db packages/shared cp -r ../templates/bot/* apps/bot/ cp -r ../templates/miniapp/* apps/miniapp/ cp -r ../templates/db/* packages/db/
-
Install Dependencies:
pnpm install
-
Follow the Setup Guides:
- Refer to
references/botfather-flow.mdfor manual Telegram setup. - Use
templates/README.mdfor a detailed order of operations.
- Refer to
- Bot Framework: grammY
- Runtime: Cloudflare Workers (Hono)
- Frontend: React + Vite
- Database: Drizzle ORM + Neon
- Package Management: pnpm + Turborepo
Always refer to references/security.md before deploying. This stack enforces mandatory initData validation and secure webhook handling.
Generated for use with the Telegram Bot Builder Skill.