A powerful Telegram bot for managing support tickets and topics with ease. Organize, track, and respond to support requests efficiently within Telegram groups.
Features β’ Quick Start β’ Container Usage β’ Configuration β’ CI/CD
SupportBoard is a feature-rich Telegram bot designed to streamline support ticket management. It allows teams to create, organize, and manage support topics directly within Telegram groups. With multi-language support, customizable topic limits, and flexible configuration options, SupportBoard is perfect for communities, teams, and businesses looking to centralize their support infrastructure.
The project is now distributed and deployed as a containerized application using Docker and GitHub Container Registry (GHCR).
- π€ Telegram Bot Integration - Direct integration with Telegram groups for seamless support management
- π Topic Management - Create, edit, and track support topics with ease
- π Multi-Language Support - Built-in support for English, Ukrainian, and Russian
- π₯ User Roles - Admin, client, and system-level role management
- πΎ Persistent Storage - Secure storage system for topics and user data
- π Key Control - Advanced permission and authentication system
- βοΈ Configurable Limits - Set maximum topic limits and manage storage retention
- π§Ή System Messages - Optional system message filtering to keep conversations clean
- π Data Management - Comprehensive data handling and retrieval system
- π³ Container-First Runtime - Multi-stage Docker build for reproducible deployments
- π Automated Image Publishing - CI builds and pushes images to GHCR
- Docker 24+
- Docker Compose v2+
- Telegram Bot Token (obtain from BotFather)
- Telegram Group ID where the bot will operate
-
Clone the repository
git clone https://github.com/XXanderWP/SupportBoard.git cd SupportBoard -
Create environment file
cp .env.defaults .env
-
Edit
.envwith your Telegram values -
Start with Docker Compose
docker compose up -d --build
-
Check logs
docker compose logs -f supportboard
docker compose up -d --buildStop the service:
docker compose downThe service configuration is defined in docker-compose.yml:
- image:
ghcr.io/xxanderwp/supportboard:latest - mounted storage:
./.storage:/app/.storage - environment source:
.env
docker pull ghcr.io/xxanderwp/supportboard:latest
docker run -d \
--name supportboard \
--restart unless-stopped \
--env-file .env \
-v "$(pwd)/.storage:/app/.storage" \
ghcr.io/xxanderwp/supportboard:latestdocker build -t ghcr.io/xxanderwp/supportboard:local -f Dockerfile .Dockerfile uses a multi-stage build:
builderstage installs dependencies and runsnpm run buildrunnerstage contains only runtime artifacts (/app/bundle)- persistent storage is exposed through volume
/app/.storage
Create a .env file in the project root based on .env.defaults:
# Telegram Bot Configuration
# Create a bot using BotFather (@BotFather on Telegram)
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
# Telegram group ID where support topics will be posted
# Use a negative number for supergroups (e.g., -1001234567890)
TELEGRAM_GROUP_ID=your-telegram-group-id
# System language for messages
# Options: 'en' (English), 'uk' (Ukrainian), 'ru' (Russian)
LANG=en
# Remove system messages (like "topic edited") from the Telegram group
REMOVE_SYSTEM_MESSAGES=true
# Keep closed topics in storage (marked as closed, not deleted)
KEEP_CLOSED_TOPICS=true
# Maximum number of topics to keep in storage
# Older topics will be deleted when this limit is exceeded
# If active topics exceed this limit, new ones cannot be created until some are closed
TOPIC_LIMITS=30| Variable | Type | Default | Description |
|---|---|---|---|
TELEGRAM_BOT_TOKEN |
string | - | Your Telegram bot token from BotFather |
TELEGRAM_GROUP_ID |
number | - | The ID of your Telegram group |
LANG |
string | en |
System language (en/uk/ru) |
REMOVE_SYSTEM_MESSAGES |
boolean | true |
Filter out system messages |
KEEP_CLOSED_TOPICS |
boolean | true |
Preserve closed topics in storage |
TOPIC_LIMITS |
number | 30 |
Maximum number of topics allowed |
# Build the project (TypeScript β JavaScript)
npm run build
# Watch mode - rebuild on file changes
npm run watch
# Development mode with auto-reload
npm run dev
# Run unit tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage report
npm run test:coverage
# Run tests in CI mode (serial + coverage)
npm run test:ciCoverage reports are generated into coverage/ locally.
In GitHub Actions, the workflow uploads coverage/ as an artifact (coverage-report-<run_id>).
-
Install dependencies:
npm install
-
Build in watch mode:
npm run watch
-
Run backend in dev mode:
npm run dev
Note: production deployment is intended to run in containers.
SupportBoard/
βββ .github/workflows/
β βββ build-on-main.yml # CI build/publish workflow (GHCR)
βββ Dockerfile # Multi-stage container build
βββ docker-compose.yml # Local/prod compose runtime
βββ src/
β βββ backend/
β β βββ index.ts # Backend entry point
β β βββ modules/ # Backend modules
β β βββ admin.ts # Admin functionality
β β βββ client.ts # Client-facing features
β β βββ data.ts # Data management
β β βββ keycontrol.ts # Permission control
β β βββ lang.ts # Language handling
β β βββ storage.ts # Storage management
β β βββ system.ts # System utilities
β β βββ telegram.ts # Telegram bot integration
β βββ frontend/ # Frontend components
β βββ lang/ # Language files (en, uk, ru)
β βββ shared/ # Shared utilities
β βββ types/ # TypeScript definitions
βββ bundle/ # Compiled output
βββ webpack.config.js # Webpack configuration
βββ tsconfig.json # TypeScript configuration
βββ eslint.config.mjs # ESLint configuration
βββ .prettierrc # Prettier configuration
βββ package.json # Project metadata
- Language: TypeScript
- Runtime: Node.js
- Container Runtime: Docker
- Bundler: Webpack
- Linter: ESLint
- Formatter: Prettier
- Telegram Integration: node-telegram-bot-api
The project includes:
- ESLint - Code style enforcement
- Prettier - Code formatting
- TypeScript - Type safety
- Webpack - Module bundling
- Write code in TypeScript
- Run
npm run watchfor automatic compilation - Use
npm run devfor development with auto-reload - Format code with Prettier
- Build with
npm run buildfor production
- Edit source files in
/src/directory - TypeScript will compile to
/bundle/directory - Webpack handles bundling and asset management
- ESLint and Prettier ensure code quality
SupportBoard supports multiple languages. Language files are located in src/lang/:
en.json- Englishuk.json- Ukrainianru.json- Russianshared.json- Shared translations
Set your preferred language in the .env file using the LANG variable.
- admin.ts - Administrative functions and controls
- client.ts - Client-side operations and interactions
- data.ts - Data retrieval and manipulation
- keycontrol.ts - Authentication and permission management
- lang.ts - Language management and translation
- storage.ts - Topic and data storage operations
- system.ts - System-wide utilities and helpers
- telegram.ts - Telegram bot integration and message handling
node-telegram-bot-api- Telegram bot API wrapperwebpack- Module bundlertypescript- Type-safe JavaScript
@typescript-eslint/parser- TypeScript ESLint parsereslint- Code linterprettier- Code formatternodemon- Development auto-reload@types/node-telegram-bot-api- Type definitions
GitHub Actions workflow in .github/workflows/build-on-main.yml automates image release on pushes to:
mainβ alias taglatestbetaβ alias tagbetadevelopβ alias tagpreview
Pipeline behavior:
- Reads
versionfrompackage.json - Checks if Git tag exists, and creates it if missing
- Checks if image
ghcr.io/xxanderwp/supportboard:<version>already exists - If image does not exist: builds and pushes both
<version>and branch alias tags - If image exists: re-tags existing version image to branch alias
Published image:
ghcr.io/xxanderwp/supportboard:<version>ghcr.io/xxanderwp/supportboard:latest|beta|preview
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Verify your
TELEGRAM_BOT_TOKENis correct - Check that the bot has permissions in your Telegram group
- Ensure
TELEGRAM_GROUP_IDis correct (use negative number for supergroups)
- Check that storage directory (
.storage) has write permissions - If using Docker, ensure
./.storage:/app/.storagevolume is mounted - Verify
TOPIC_LIMITSis configured appropriately
- Confirm
LANGvariable is set to a supported language (en/uk/ru) - Ensure language files exist in
src/lang/
- Validate
.envexists and contains required values - Check container logs:
docker compose logs -f supportboard - Ensure port/network policies on host allow Telegram API access
For support, issues, or feature requests, please visit the Issues page.
Made with β€οΈ by XXanderWP