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.
- Host: GitHub
- URL: https://github.com/yonatankinfe/telegram-bot
- Owner: Yonatankinfe
- Created: 2025-05-18T18:45:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-25T16:22:25.000Z (about 1 year ago)
- Last Synced: 2025-09-14T17:18:06.691Z (10 months ago)
- Topics: admin, admin-panel, bot, challenge, nodejs, telegram-bot, telegram-bot-api
- Language: JavaScript
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Telegram Admin & User Bot Suite



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