定制 aicrion/tandroid 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aicrion/tandroid

Composer 安装命令:

composer require aicrion/tandroid

包简介

Android-inspired OS-like framework for building Telegram bots in PHP 8.5+

README 文档

README

Tandroid logo

Tandroid

An Android-inspired framework for building Telegram bots in PHP.

PHP Version License Tests Docs


Tandroid brings Android's application model to Telegram bot development. Every feature is an Activity, navigation between features is an Intent, every installable feature is a plugin with its own manifest, and state survives across requests via a ViewModel — concepts you already know, applied to a domain where they've never quite existed before.

Built on Symfony (DI, Cache, HTTP Client) and Doctrine ORM, Tandroid runs equally well on a $3/month shared host or a Dockerized VPS — migrations and plugin discovery happen automatically, with zero CLI commands required in production.

Why Tandroid

  • A real application model, not a router. Activities have a lifecycle (onCreate, onResume, onPause, onDestroy), a back stack, and explicit/implicit Intent resolution — the same mental model as native Android apps.
  • Plugins, not spaghetti. Every feature lives in its own plugins/<name>/ folder with an isolated manifest, entities, and migrations — install, remove, or share a feature without touching the rest of the bot.
  • Stateful conversations, done right. ViewModel + StateStore persist structured state between Activities and requests, so multi-step flows (forms, wizards, checkouts) stay simple.
  • Zero-ops deployment. Migrations run automatically on boot. Redis is optional — the cache layer falls back to the filesystem transparently, so shared hosting just works.
  • Full Telegram Bot API coverage. Messaging, media, payments & Stars, inline mode, forums, business accounts, gifts, and more — behind one fluent facade.

Quick Start

composer require aicrion/tandroid
use Aicrion\Tandroid\Activity\{BotActivity, NavigationRequest};
use Aicrion\Tandroid\Attribute\IntentFilter;
use Aicrion\Tandroid\Intent\Intent;
use Aicrion\Tandroid\View\View;

#[IntentFilter(action: 'MAIN', category: 'LAUNCHER')]
final class StartActivity extends BotActivity
{
    public function onCreate(Intent $intent): ?NavigationRequest
    {
        $this->setContentView(View::message('Welcome 👋'));

        return null;
    }
}
use Aicrion\Tandroid\Kernel\Kernel;

$kernel = Kernel::fromConfigFile(__DIR__ . '/config/aicrion.yaml')->boot();
$kernel->handle($update); // resolves the Activity and sends the reply

Documentation

Full documentation — installation, architecture, Activities & Intents, Views & Widgets, ViewModels, database, caching, plugins, broadcasts, deployment, and the complete API reference — is available at:

aicrion.github.io/tandroid

New to Tandroid? Start with the complete walkthrough tutorial — it takes you from an empty folder to a working bot with navigation, persisted state, and both run modes tested locally.

Testing

composer test

Contributing

Issues and pull requests are welcome. Please open an issue first for significant changes, and make sure composer test passes before submitting a PR.

License

Tandroid is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固