PHPackages                             bots8/nutgram-starter-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bots8/nutgram-starter-kit

ActiveProject[API Development](/categories/api)

bots8/nutgram-starter-kit
=========================

A starter kit for building telegram bot with Nutgram

4.0.0(2y ago)847MITPHP

Since Jan 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bots8/nutgram-starter-kit)[ Packagist](https://packagist.org/packages/bots8/nutgram-starter-kit)[ RSS](/packages/bots8-nutgram-starter-kit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (7)Used By (0)

Nutgram Starter Kit
===================

[](#nutgram-starter-kit)

Start your Telegram bot development journey with this simple starter kit, designed for beginners. It offers essential tools and guidelines to easily build your first Telegram bot, making it a great choice for those looking to create a ready-to-use bot for production.

Read nutgram documentation since this starter kit using that Library as core component (version 3.x)

Main Features
-------------

[](#main-features)

- Well-structured folder
- Ease database integration
- CLI for development
- Testing kit (Pest)
- Ready for production

Requirements
------------

[](#requirements)

Before you begin, ensure that you have the following requirements installed:

- PHP 8.1 or higher
- cURL extension for PHP
- Database (optional)

Installation
------------

[](#installation)

1. Clone the repository to your local machine or using composer:

    ```
    composer create-project bots8/nutgram-starter-kit mybot
    ```

Configuration
-------------

[](#configuration)

1. Copy the `.env.example` file and rename it to `.env`:

    ```
    cp .env.example .env
    ```
2. Open the `.env` file in a text editor and update the `BOT_TOKEN` with your actual bot token.

Structure
---------

[](#structure)

- **app/**
    - **Commands/**: This directory contains command classes for your bot application.
    - **Conversations/**: This directory contains conversation classes for your bot application.
    - **Database/**: This directory contains database-related classes for your bot application.
    - **Middleware/**: This directory contains middleware classes for your bot application.
    - **Kernel.php**: This file is the application's console kernel, which handles command execution and provides a central location for registering all of the application's console commands and more.
- **library/**: This directory can be used to store any additional libraries or utilities your bot might need. You can organize this folder based on your project's specific requirements.
- **.env.example**: This file serves as an example configuration file. It includes placeholders for environment variables that your application might need. Make a copy of this file as `.env` and fill in the actual values.
- **bootstrap.php**: This file is added to initialize the application. It may contain any necessary setup or bootstrapping logic.
- **handler.php**: This file is an example webhook handler. You can customize this file to handle incoming updates from Telegram.
- **index.php**: The main entry point of your bot. You may include your application logic or use it to bootstrap your bot.
- **tests/**: This directory contains test scripts and suites to verify the functionality and behavior of your bot application.
- **console/**: This directory houses command-line scripts and utilities for managing and interacting with your bot application.

Usage
-----

[](#usage)

1. For production release, run the `webhook` command to set up your webhook:

    ```
    php nutgram webhook set
    ```
2. Start your bot application (development):

    ```
    php nutgram run
    ```
3. Or if you want to remove webhhok:

    ```
    php nutgram webhook delete
    ```

Working with Database
---------------------

[](#working-with-database)

You can easily interact with database but for now you can only working with supported PDO Database, here a few example code to use query builder

```
use App\Database\DB;

$qb = new DB();

// Select first data
$res = $qb->table('users')
    ->select('id')
    ->where('username', '=', $username)
    ->first();

// Select all data
$res = $qb->table('users')
    ->select('*')
    ->where('id', '>', 10)
    ->findAll();

// Insert data
$qb->table('users')->insert([
    'telegramId' => $from->id,
    'username' => $from->username,
    'name' => $from->first_name.' '.$from->last_name,
]);

...
```

More method like: `update($arr)`, `count()`, `delete()`, `increment($col)`

License
-------

[](#license)

This Nutgram Starter Kit is open-sourced software licensed under the [MIT license](LICENSE).

Feel free to customize, extend, and share your bot based on this starter kit. Happy coding!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

839d ago

Major Versions

1.0.1 → 2.0.02024-01-20

2.0.0 → 3.0.02024-01-22

3.1.0 → 4.0.0-rc2024-01-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/42bcc960a940d1e785628a324fa0557a1027206ee8eaf6c5a7ca5e5b104625a0?d=identicon)[superXdev](/maintainers/superXdev)

---

Top Contributors

[![superXdev](https://avatars.githubusercontent.com/u/70060487?v=4)](https://github.com/superXdev "superXdev (30 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/bots8-nutgram-starter-kit/health.svg)

```
[![Health](https://phpackages.com/badges/bots8-nutgram-starter-kit/health.svg)](https://phpackages.com/packages/bots8-nutgram-starter-kit)
```

###  Alternatives

[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
