LaraGram - A Laravel-Inspired Framework for Building Telegram Bots #57261
Unanswered
AmirHkrg
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I'm excited to share a project I've been working on, built specifically for developers who love the structure and elegance of Laravel. It's called LaraGram, an open-source framework for building powerful and scalable Telegram bots, with a familiar Laravel flavor.
We all know how amazing Laravel is for building web applications. But when it comes to Telegram bots, we often end up with messy, single-file scripts or libraries that don't enforce a clean architecture. LaraGram aims to solve that by reimagining Laravel's core concepts for the bot development world.
Core Concepts: Laravel, but for Telegram
The main idea is to provide a development experience that feels just like home for a Laravel developer. Here’s how it reinterprets some key features:
The Listening System (Instead of Routing)
In a web app, you handle HTTP requests. In a bot, you handle "updates" from Telegram (like new messages, button clicks, etc.). LaraGram replaces Laravel's router with a powerful Listener.
Instead of defining a route for a URL, you define a listener for a specific message pattern or update type. It feels incredibly intuitive:
The Template System (Instead of Blade Views)
Just as Blade helps you separate your presentation logic from your application logic, LaraGram’s Template System helps you design your bot's responses cleanly. Instead of building messy arrays for the Telegram API, you use a fluent interface.
Creating a message with a custom keyboard is simple and readable:
A Full-Fledged Framework: Key Features at a Glance
LaraGram goes far beyond the basics and provides the robust tooling you'd expect from a modern framework.
Database & ORM: It includes a rewritten Eloquent ORM with multi-DB support, complete with Migrations, Seeders, and Factories. And yes, it comes with Laravel's beloved Fluent Collections.
Application Architecture:
Developer Experience & Tooling:
Performance & Scalability:
Why Give LaraGram a Try?
I would love for you all to check it out, give it a star on GitHub if you like the concept, and share any feedback or ideas you might have.
What do you think of this approach to bot development?
Beta Was this translation helpful? Give feedback.
All reactions