framebot

framebot Framework is a powerful and flexible open-source framework designed to simplify the creation and management of Telegram bots. Whether you're a seasoned developer or just starting out, framebot Framework provides the tools you need to build feature-rich bots with ease.

FrameBot

Version
License: MIT
GitHub Stars

A Modern PHP Framework for Telegram Bot Development & Database Management

Fast ยท Secure ยท Eloquent-style ORM ยท Telegram API First

๐Ÿ“บ Getting Started Video

FrameBot Tutorial

โœจ Key Features

๐Ÿ—„๏ธ Database Superpowers

  • Eloquent-style ORM - Familiar Active Record implementation
    $user = User::find(1)->update(['username' => 'framebot_user']);
    
  • Migrations System - Version-controlled database schema management
  • Relationship Support - HasMany, BelongsTo, Polymorphic relations

๐Ÿค– Telegram Integration

  • Auto-Send Architecture - RAII pattern for seamless API calls
 Message::chatId($this->chatID)->text("welcome to my telegram bot");
 // Automatically sends on destruct

25+ API Components - Pre-built classes for:

  • ๐Ÿ“ Locations & Venues
  • ๐ŸŽฒ Interactive Dice/Polls
  • ๐Ÿ’Œ Media Groups & Paid Content
  • ๐ŸŽญ Message Reactions

๐Ÿ›ก๏ธ Security First

  • Dotenv Implementation - Secure credential management
  • Auto-Sanitization - Built-in parameter validation
  • Request Throttling - Protection against API abuse

Section 3: Quick Start

๐Ÿš€ Quick Start

Requirements

  • PHP 8.0+
  • Composer
  • MySQL

Installation

git clone https://github.com/alirezajavadigit/framebot.git
cd framebot
composer install
cp .env.example .env

Configuration (.env)

# Telegram Configuration
TOKEN=your_bot_token_here
APP_ENV=production

# Database Settings
DB_HOST=127.0.0.1
DB_NAME=framebot
DB_USERNAME=root
DB_PASSWORD=

Section 5: Contributing & Community

๐Ÿค Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add some amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contribution Guidelines:

  • Follow PSR-12 coding standards
  • Include PHPDoc comments
  • Add unit tests for new features
  • Update documentation accordingly

๐ŸŒ Community

๐Ÿ“œ License

MIT License - See LICENSE for full text

Created with โค๏ธ by Alireza Javadi
Part of the Open Source Telegram Bot Ecosystem ๐Ÿค–