PHPackages                             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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nutgram/starter-kit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

Starter kit for Nutgram

1.0.0(5mo ago)320MITPHPPHP ^8.2

Since Jan 11Pushed 5mo agoCompare

[ Source](https://github.com/nutgram/starter-kit)[ Packagist](https://packagist.org/packages/nutgram/starter-kit)[ Docs](https://github.com/nutgram/starter-kit)[ RSS](/packages/nutgram-starter-kit/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

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

[](#nutgram-starter-kit)

This is a lightweight starter kit for building Telegram bots using the [Nutgram](https://nutgram.dev) PHP framework.

Features
--------

[](#features)

- **Nutgram Framework**: High-performance Telegram Bot framework.
- **Environment Configuration**: Easy management of environment variables with `phpdotenv`.
- **Caching**: PSR-16 cache support out of the box.
- **Testing**: Ready-to-use testing environment with [Pest](https://pestphp.com/).
- **Structured**: Organized directory structure for Commands and Conversations.

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

[](#requirements)

- PHP 8.2 or higher
- Composer

Usage
-----

[](#usage)

1. **Create the project**:

    ```
    composer create-project nutgram/starter-kit my-telegram-bot
    cd my-telegram-bot
    ```
2. **Install dependencies**:

    ```
    composer install
    ```
3. **Configure the environment**: Copy the example environment file and add your Telegram Bot token:

    ```
    cp .env.example .env
    ```

    Edit `.env` and set your `TOKEN`:

    ```
    TOKEN=your_telegram_bot_token_here
    WEBHOOK_TOKEN=random_webhook_token
    ```

Usage
-----

[](#usage-1)

### Running the Bot

[](#running-the-bot)

#### Polling Mode

[](#polling-mode)

To run the bot in polling mode (ideal for development), execute:

```
php bot.php
```

#### Webhook Mode

[](#webhook-mode)

To use the webhook mode, point your web server's document root to the `public/` directory. Ensure your server is accessible via HTTPS.

Finally, you need to register your webhook URL with Telegram. You can do this by making an HTTP request (e.g., using `curl`) to the following address:

```
curl "https://api.telegram.org/botTOKEN/setWebhook?secret_token=WEBHOOK_TOKEN&url=https://YOUR_DOMAIN"
```

Replace:

- `TOKEN` with the same value you used in your `.env` file
- `https://YOUR_DOMAIN` with your actual webhook URL.
- `WEBHOOK_TOKEN` with the same value you used in your `.env` file

### Project Structure

[](#project-structure)

- `src/routes.php`: Register your commands, conversations, and handlers.
- `src/bootstrap.php`: Bot initialization and configuration.
- `public/index.php`: Entry point for both polling and webhook.
- `tests/`: Feature and unit tests.

### Running Tests

[](#running-tests)

You can run the tests using Pest:

```
composer test
```

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance70

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

172d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba98a3b5b1a03bc4c37de57b9d2aefbba31c73570e10df5833a50ad4106fc583?d=identicon)[Lukasss93](/maintainers/Lukasss93)

![](https://www.gravatar.com/avatar/08bc14acf1f7db717de09e715047f5b5684841d6b9712129334931fa8833beda?d=identicon)[SergiX44](/maintainers/SergiX44)

---

Top Contributors

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

---

Tags

bottelegramnutgram

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)[nutgram/laravel

Laravel package for Nutgram

49135.4k4](/packages/nutgram-laravel)[php-telegram-bot/telegram-bot-manager

PHP Telegram Bot Manager

22115.3k](/packages/php-telegram-bot-telegram-bot-manager)[doppar/framework

The Doppar Framework

4012.4k14](/packages/doppar-framework)[onmotion/yii2-telegram

Support chat for site based on Telegram bot

526.4k](/packages/onmotion-yii2-telegram)

PHPackages © 2026

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