One package for the whole Telegram surface: native MTProto 2.0 for users and bots, the Bot HTTP API, Mini App auth, Passport KYC, and — merged in as modules — the consumer layer (tenant-scoped Ingest, Redis stream Bus + daemon + backfill, encrypted backup vault) plus a one-class handler facade.
composer require merezarezaei/teleframeuse MeRezaRezaei\Teleframe\Teleframe;
$teleframe = app(Teleframe::class);
$teleframe->onMessage(function ($update) use ($teleframe) {
// every stored update reaches you through one pipeline
$teleframe->send($update->accountId, ['random_id' => random_int(1, PHP_INT_MAX), 'text' => 'got it']);
});Teleframe— compose-not-own facade:ingest,ingestResponse,onMessage/on(route by constructor, zero-regex),run(fixtures through the REAL pipeline),user/chat/channel,route,backup,schemaLayer,send(writes the Q2d echo-elimination registry).Teleclient— the ingest-only public face, retained byte-stable.
| Area | Namespace / docs | What it is |
|---|---|---|
| MTProto engine | MeRezaRezaei\Teleframe\Core\ |
Raw binary wire: transport, crypto (DH + 2FA SRP), TL codec (zero-regex), method registry, typed RPC exceptions, Layer 227 wire |
| Bot HTTP API | MeRezaRezaei\Teleframe\Bot\ |
BotClient, scopes, fluent builders, webhooks & polling |
| Schema pipeline | MeRezaRezaei\Teleframe\Schema\ + generated/ |
.tl → models/Methods builders, teleframe:schema-update (diff + regenerate + stamp, no migrate), Layer 229 catalog |
| Laravel glue | MeRezaRezaei\Teleframe\Laravel\ |
TeleframeServiceProvider, teleframe:* commands, webhook route macro, Mini App middleware, facades |
| Consumer modules | MeRezaRezaei\Teleframe\{Ingest,Bus,Daemon,Backfill,Backup}\ |
ingest.md · bus.md · backup.md |
| Handlers | MeRezaRezaei\Teleframe\Handler\ |
handlers.md — registry + 26-line onion + echo elimination + Testing\FakeDispatcher |
Docs: quickstart.md · index.md ·
php artisan teleframe:doctor.
Teleframe draws heavily on the Nutgram-style handler ergonomics and follows the
owner's unification design (see docs/superpowers/specs/). The original
teleclient package that held the consumer layer is archived.
MIT licensed.