Chat-robot telegram @arming_bot https://t.me/arming_bot
Go to file
Arsen Mirzaev Tatyano-Muradovich af48d505bf import from excel + broken dependencies see next commit 2024-10-11 09:58:35 +03:00
mirzaev/arming_bot/system import from excel + broken dependencies see next commit 2024-10-11 09:58:35 +03:00
.gitignore перенос из другого репозитория 2024-08-30 22:04:28 +07:00
LICENSE перенос из другого репозитория 2024-08-30 22:04:28 +07:00
README.md import from excel + broken dependencies see next commit 2024-10-11 09:58:35 +03:00
composer.json import from excel + broken dependencies see next commit 2024-10-11 09:58:35 +03:00
composer.lock import from excel + broken dependencies see next commit 2024-10-11 09:58:35 +03:00
telegram-arming_bot.service процесс идёт 2024-09-30 14:29:41 +03:00

huesos

Basis for developing chat-robots with "Web App" technology for Telegram

Installation

AnangoDB

  1. Create a Graph with the specified values Name: catalog

edgeDefinition: entry fromCollections: categoy, product toCollections: category

  1. Create a Graph with the specified values Name: sessions

edgeDefinition: connect fromCollections: account toCollections: session

  1. Create indexes for the "product" collection Type: "Inverted Index" Fields: name.ru Analyzer: "text_ru" Search field: true Name: name_ru

Add indexes for all search parameters and for all languages (search language is selected based on the user's language, otherwise from the default language specified in the active settings from settings collection document)

See fields in the mirzaev/arming_bot/models/product name.ru, description.ru and compatibility.ru

  1. Create a View with the specified values type: search-alias (you can also use "arangosearch") name: products_search indexes: "indexes": [ { "collection": "product", "index": "title_ru" (THIS IS AN EXAMPLE) } ]

NGINX

  1. Example of NGINX server file ` location / { try_files $uri $uri/ /index.php; }

location ~ /(?categories|products) { root /var/www/arming_bot/mirzaev/arming_bot/system/storage; try_files $uri =404; }

location ~ .php$ { ... } `

SystemD (or any alternative you like)

  1. Execute: sudo cp telegram-huesos.service /etc/systemd/system/telegram-huesos.service

before you execute the command think about what it does and whether the paths are specified correctly the configuration file is very simple and you can remake it for any alternative to SystemD that you like

Settings

Settings of chat-robot and Web App

Make sure you have a settings collection (can be created automatically) and at least one document with the "status" parameter set to "active" { "status": "active" }

language

Language for system messages if user language could not be determined

Value: en

Suspensions

System of suspensions of chat-robot and Web App

Make sure you have a suspension collection (can be created automatically) { "end": 1726068961, "targets": { "chat-robot": true, "web app": true } "access": { "tester": true, "developer": true }, "description": { "ru": "Разрабатываю каталог, поиск и корзину", "en": "I am developing a catalog, search and cart" } }