File-based routing
Guards, params, and navigate modes that feel like a mini SPA inside Telegram.
Teact turns JSX, hooks, routing, and keyboards into Telegram experiences — the same React you already know, with a runtime tuned for grammY and Bun.
$ bun create teact my-bot
Packages
@teactjs/*
Adapter
grammY
Runtime
Bun-first
License
MIT
import { createBot } from "@teactjs/core";
import { Message, Button, InlineKeyboard } from "@teactjs/ui";
import { TelegramAdapter } from "@teactjs/telegram";
// Components + hooks — same as you know them
const bot = createBot({
component: App,
adapter: new TelegramAdapter(),
token: process.env.TELEGRAM_BOT_TOKEN,
});
bot.start();Ship inline keyboards, media, polls, and payments with declarative UI — then layer routing, sessions, i18n, and streaming when you need them.
Ecosystem
Guards, params, and navigate modes that feel like a mini SPA inside Telegram.
Multi-step flows with useConversation, useForm, and declarative prompts.
Hooks, context, Suspense — same patterns you use on the web, compiled with Bun.
Scaffold, dev with HMR, build for production, and generate components or plugins.
From zero to first message
Run create-teact, pick a template, and toggle plugins (storage, auth, i18n, and more).
Drop your bot token into .env and adjust teact.config.ts when you add plugins.
Use teact dev with HMR locally, then teact build and run with polling or webhooks.
Teact uses grammY under the adapter. You can stay in JSX land for most bots and drop down when you need raw API access.
The stack is designed for real bots: sessions, webhooks, storage drivers, tests with MockAdapter, and a production build path.
Yes. The scaffolder lets you pick bun, npm, or pnpm. Bun is the default sweet spot for dev speed.
Use createRouter for file-style paths and pass commands into createBot for Telegram menu commands and deep links.
Ready to prototype?
Installation, routing, hooks, and package reference live in the docs. Toggle theme anytime from the navbar.