A Cloudflare Workers-powered Telegram AI chat bot that leverages Google Gemini to deliver intelligent customer support. Built for speed, deployed globally, and designed for the modern web.
- 🤖 AI-Powered Responses — Google Gemini integration for smart, conversational replies
- ⚡ Edge-Runtime Performance — Deployed on Cloudflare Workers' global network
- 📱 Telegram Bot Integration — Webhook-based Telegram bot handling
- 📝 Markdown Support — Converts markdown messages to Telegram-compatible HTML
- 🔒 Secure by Default — Environment-based API key management
- Runtime: Cloudflare Workers
- Package Manager: Bun
- Build Tool: Vite+
- Testing: Vitest + Cloudflare Workers test pool
- Linting/Formatting: Oxlint & Oxfmt
- Language: JavaScript (ES Modules)
# Install dependencies
bun install
# Start local development
bun run dev
# Run tests
bun test
# Deploy to Cloudflare
bun run deployCopy .dev.vars.example to .dev.vars and fill in your keys:
API_KEY=your_telegram_bot_token
GEN_KEY=your_google_generative_ai_key| Command | Description |
|---|---|
bun run dev |
Start local development server |
bun test |
Run Vitest suite |
bun run ui |
Open Vitest UI |
bun run deploy |
Deploy to Cloudflare Workers |
├── src/ # Worker source code
├── test/ # Vitest test files
├── .github/ # GitHub workflows and templates
├── wrangler.jsonc # Cloudflare Workers configuration
├── vite.config.js # Vite+ configuration
└── vitest.config.js # Vitest configuration
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License — see LICENSE for details.