AI-powered Telegram bot with a comprehensive web dashboard for managing and enhancing AI-assisted conversations and content analysis.
- 📍 Overview
- 📦 Features
- 📂 Structure
- 💻 Installation
- 🏗️ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors
This repository houses the "ai-telegram-bot-dashboard" project, which brings together the power of AI and Telegram to provide a sophisticated communication and automation platform. The project features a robust web dashboard that allows for seamless management and configuration of the AI-powered bot.
| Feature | Description | |
|---|---|---|
| ⚙️ | Architecture | The project's architecture is designed for modularity, scalability, and maintainability, with separate components for bot logic, web dashboard, and AI integration. |
| 📄 | Documentation | This README file provides a comprehensive overview of the project, its features, dependencies, and instructions for installation and usage. |
| 🔗 | Dependencies | The project leverages a range of popular libraries and packages, including Next.js, Express.js, Prisma, OpenAI, and LangChain, to ensure efficient development and integration. |
| 🧩 | Modularity | The codebase is structured modularly, with distinct directories for frontend (web dashboard), backend (API), and telegram bot functionalities. This approach facilitates easier code maintenance and allows for efficient expansion. |
| 🧪 | Testing | Thorough testing is implemented to ensure the reliability and robustness of the codebase, utilizing frameworks like Jest. |
| ⚡️ | Performance | Performance optimization strategies are employed to ensure a smooth and responsive user experience, including caching, database optimization, and efficient resource utilization. |
| 🔐 | Security | Robust security measures are implemented to protect sensitive user data and ensure secure communication. These measures include input validation, data encryption, and regular security audits. |
| 🔀 | Version Control | The project utilizes Git for version control, with GitHub Actions workflow files for automated build and release processes. |
| 🔌 | Integrations | The platform integrates with various services and APIs, including the Telegram Bot API, OpenAI API, weather APIs, news APIs, image processing APIs, and translation APIs. |
| 📶 | Scalability | The project is designed for scalability to handle increased user loads and data volumes, leveraging cloud-based infrastructure and database optimizations. |
├── src
│ ├── telegram
│ │ ├── utils
│ │ │ └── bot.ts
│ │ ├── services
│ │ │ └── openai.service.ts
│ │ ├── types
│ │ │ └── types.ts
│ │ ├── commands
│ │ │ ├── help.ts
│ │ │ ├── start.ts
│ │ │ └── translate.ts
│ │ ├── events
│ │ │ └── message.ts
│ │ └── index.ts
│ │ └── constants.ts
│ ├── web
│ │ ├── api
│ │ │ ├── controllers
│ │ │ │ ├── user.controller.ts
│ │ │ │ ├── admin.controller.ts
│ │ │ │ ├── image.controller.ts
│ │ │ │ ├── conversation.controller.ts
│ │ │ │ └── bot.controller.ts
│ │ │ ├── middlewares
│ │ │ │ ├── auth.middleware.ts
│ │ │ │ └── validate.middleware.ts
│ │ │ ├── services
│ │ │ │ ├── user.service.ts
│ │ │ │ ├── image.service.ts
│ │ │ │ ├── conversation.service.ts
│ │ │ │ └── bot.service.ts
│ │ │ └── routes.ts
│ │ ├── pages
│ │ │ ├── admin
│ │ │ │ ├── dashboard
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── users
│ │ │ │ │ └── index.tsx
│ │ │ │ └── settings
│ │ │ │ └── index.tsx
│ │ │ ├── auth
│ │ │ │ └── login.tsx
│ │ │ ├── conversations
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── config
│ │ │ └── env.ts
│ │ ├── app.tsx
│ │ ├── db.ts
│ │ ├── utils
│ │ │ ├── error.ts
│ │ │ ├── logger.ts
│ │ │ └── response.ts
│ │ ├── types
│ │ │ ├── types.ts
│ │ │ └── user.ts
│ ├── core
│ │ ├── config
│ │ │ └── openai.config.ts
│ │ ├── utils
│ │ │ ├── string.ts
│ │ │ ├── time.ts
│ │ │ └── logger.ts
│ │ ├── types
│ │ │ └── types.ts
│ │ └── constants.ts
│ ├── models
│ │ ├── User.ts
│ │ ├── Conversation.ts
│ │ └── Image.ts
│ └── prisma
│ └── schema.prisma
├── .eslintrc.js
├── tsconfig.json
├── next.config.js
├── tailwind.config.js
└── package.json
- Node.js
- npm
- Docker
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/ai-telegram-bot-dashboard.git
- Navigate to the project directory:
cd ai-telegram-bot-dashboard
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and navigate to http://localhost:3000.
Adjust configuration settings in config.js or .env.
- 📝 Example 1: Send a text message to the bot and receive an AI-generated response.
- 📝 Example 2: Utilize the image processing features to extract text from an image or generate a caption for an image.
- 📝 Example 3: Access the web dashboard to manage bot settings, monitor bot usage, and configure user access.
- Build the Docker image:
docker build -t ai-telegram-bot-dashboard .
- Run the Docker container:
docker run -p 3000:3000 ai-telegram-bot-dashboard
- Install the Heroku CLI:
npm install -g heroku
- Login to Heroku:
heroku login
- Create a new Heroku app:
heroku create
- Deploy the code:
git push heroku main
TELEGRAM_BOT_TOKEN: Your Telegram bot tokenOPENAI_API_KEY: Your OpenAI API keyDATABASE_URL: Your database connection URL
- GET /api/bot/messages: Retrieves a list of messages sent to the bot.
- POST /api/bot/messages: Sends a message to the bot.
- GET /api/admin/users: Retrieves a list of users.
- POST /api/admin/users: Creates a new user.
Use JWT tokens for authentication.
curl -X GET http://localhost:3000/api/bot/messages
This project is licensed under the GNU AGPLv3.
-
Author Name - Spectra.codes
-
Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!