A self‑hosted Telegram bot for task management: create tasks, set reminders, and track progress on your own server—no third‑party services required.
This README first provides instructions in English. Русская версия ниже.
- PHP 8.1 or higher
- Composer
- MySQL or MariaDB
- Telegram Bot Token
- Copy
.env.example→.envand fill in credentials
- Clone the repo
git clone https://github.com/stick231/tg-bot-iskra.git cd tg-bot-iskra - Install dependencies
composer install
- Configure environment
cp .env.example .env php artisan key:generate # Edit .env: # BOT_TOKEN=your_telegram_token # DB_HOST=127.0.0.1 # DB_DATABASE=your_db # DB_USERNAME=your_user # DB_PASSWORD=your_pass
- Run database migrations
php artisan migrate
- Start the bot locally
php artisan serve
- Expose your local bot to the Internet via ngrok
ngrok http 127.0.0.1:8000
- Set your Telegram webhook
curl -X POST "https://api.telegram.org/bot<YOUR_TG_BOT_TOKEN>/setWebhook" \ -d "url=https://<YOUR-NGROK-URL>/api/webhook"
- You must create a
.envfile based on.env.exampleand update it with your actual configuration.
/start— register or welcome the user/show_tasks— list all your pending tasks/add_task— create a new task (uses interactive state flow)/complete_task— mark the last shown task as complete
/statistics— display summary stats (total tasks, completed, pending)
Feel free to fork the repo and submit pull requests!
This project is licensed under the MIT License.
Manage your tasks. Stay focused.
Самостоятельно развертываемый Telegram-бот для управления задачами: создание задач, напоминания и отслеживание прогресса — работает на вашем сервере без зависимости от сторонних сервисов.
- PHP 8.1 или новее
- Composer
- MySQL или MariaDB
- Токен Telegram бота
- Скопируйте
.env.example→.envи заполните настройки
- Клонируйте репозиторий
git clone https://github.com/stick231/tg-bot-iskra.git cd tg-bot-iskra - Установите зависимости
composer install
- Настройте окружение
cp .env.example .env php artisan key:generate # Отредактируйте .env: # BOT_TOKEN=ваш_токен_бота # DB_HOST=127.0.0.1 # DB_DATABASE=ваша_бд # DB_USERNAME=ваш_пользователь # DB_PASSWORD=ваш_пароль
- Запустите миграции БД
php artisan migrate
- Запустите бота локально
php artisan serve
- Настройте доступ через ngrok
ngrok http 127.0.0.1:8000
- Установите вебхук для Telegram
curl -X POST "https://api.telegram.org/bot<ВАШ_ТОКЕН>/setWebhook" \ -d "url=https://<NGROK-URL>/api/webhook"
Создайте и настройте файл .env на основе примера .env.example.
/start— регистрация и приветствие/show_tasks— список активных задач/add_task— добавление новой задачи (интерактивный режим)/complete_task— отметка задачи как выполненной
/statistics— статистика выполнения задач
Приветствуются форки и пул-реквесты!
Распространяется под лицензией MIT.
Эффективное управление задачами. Максимальная продуктивность.