An open API service indexing awesome lists of open source software.

https://github.com/yonatankinfe/telegram-bot

Enterprise-grade Telegram bot system for challenge management, sales automation, and mass communication. Built with battle-tested Node.js stack.
https://github.com/yonatankinfe/telegram-bot

admin admin-panel bot challenge nodejs telegram-bot telegram-bot-api

Last synced: 5 months ago
JSON representation

Enterprise-grade Telegram bot system for challenge management, sales automation, and mass communication. Built with battle-tested Node.js stack.

Awesome Lists containing this project

README

          

# Telegram Admin & User Bot Suite

![Node.js](https://img.shields.io/badge/Node.js-18%2B-green)
![License](https://img.shields.io/badge/License-MIT-blue)
![Dependencies](https://img.shields.io/badge/dependencies-telegraf%20|%20mongodb%20|%20mongoose-orange)

Enterprise-grade Telegram bot system for challenge management, sales automation, and mass communication. Built with battle-tested Node.js stack.

---

## ๐Ÿš€ Key Features
+ ๐Ÿ•’ Time-bound competitions with configurable durations

+ ๐Ÿ”— Unique participant links (UUIDv4 + HMAC validation)

+ ๐Ÿ† Real-time leaderboard with Redis caching

+ ๐Ÿ“Š Advanced analytics dashboard
### โšก Admin Bot Core

#### Challenge Management
- Time-bound competitions with auto-winner selection
- Custom participation links generation (UUIDv4)
- Real-time leaderboard tracking

#### Broadcast System
- Multi-format messaging (text/image/video/documents)
- Scheduled campaigns with send-rate controls
- User segmentation by engagement level
## ๐Ÿ‘ค User Bot Core
### Sales Automation
+ ๐Ÿ›’ Interactive product carousels

+ ๐Ÿ”„ Order status tracking with webhooks

+ ๐Ÿ’ฌ Live chat handoff to human agents

+ ๐Ÿ“ฆ Inventory sync with external APIs

### Data Management
+ ๐Ÿ›ก๏ธ GDPR-compliant PII handling

+ ๐Ÿ“† Challenge participation history

+ ๐Ÿ“Š Interaction analytics pipeline

+ ๐Ÿ”„ Data export/portability tools

## ๐Ÿ›  Tech Stack
+ Runtime: Node.js 18+

+ Framework: Telegraf (Telegram Bot API)

+ Database: MongoDB Atlas (NoSQL)

+ ORM: Mongoose ODM

+ Security: Bcrypt hashing + Encryption-at-rest

## ๐Ÿ“ฆ Installation

1. **Clone Repository**
```bash
git clone https://github.com/yourusername/telegram-bot-suite.git
cd telegram-bot-suite
```
## ๐ŸŒŸ Roadmap
+ Multi-admin role system

+ SMS verification layer

+ Premium challenge tiers

+ AI-powered spam detection

+ Revenue dashboard (Stripe integration)

### Development Setup
+ Fork repository and create feature branch
+ Include Jest tests for all new features

+ Maintain 90%+ test coverage

+ Update documentation accordingly

+ Submit PR with detailed changelog

```bash
git clone https://github.com/Yonatankinfe/Telegram-bot.git
cd telegram-bot-suite
npm install
npm run dev
```
# Testing
๐Ÿงช This project uses Jest for comprehensive unit testing. We heavily rely on mocking to test logic in isolation from external services and files, making tests fast and reliable.
Mocks include:
+ ๐Ÿค– Telegram Bot API (node-telegram-bot-api): Simulate bot interactions.
+ ๐Ÿ’พ File System (fs, path): Read/write virtual files.
+ ๐ŸŒ HTTP Requests (axios): Mock external API calls like media downloads.
+ ๐Ÿ“Š CSV Handling (csv-parser, json2csv): Control data parsing and generation.

Tests cover key flows like:
+ ๐Ÿ‘‹ Admin /start & Menu Actions
+ ๐Ÿ“ข Sending Mass Messages (Text & Media)
+ ๐Ÿ† Challenge Setup & Data Saving
+ โœจ Winner Picking Logic (Data Filtering & Selection)
+ โœ… Input Validations

To run the tests:
```bash
npm test
```
Please ensure your contributions include tests and pass the suite!
```bash
npm run lint # Code style check
npm run audit # Security audit
```
## ๐Ÿค Contribution Guidelines