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!