huesos/README.md

99 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2024-09-30 18:29:41 +07:00
# huesos
2024-09-30 18:29:41 +07:00
Basis for developing chat-robots with "Web App" technology for Telegram
## Installation
### AnangoDB
1. Create a View in ArangoDB for the document "product"
`
"links": {
"product": {
"fields": {
"description": {
"analyzers": [
"text_ru"
]
}
}
}
}
`
2. Create a Graph with the specified values
**Name:** hierarchy
**edgeDefinition:** entry
**fromCollections:** part, product...
**toCollections:** category, part...
3. Create indexes for the "product" collection
**Type:** "Inverted Index"
**Fields:** title.RU
**Analyzer:** "text_ru"
**Search field:** true
**Name:** title_ru
4. Create a View with the specified values
**Name:** products_search
**type:** search-alias (you can also use "arangosearch")
**indexes:**
`
"indexes": [
{
"collection": "product",
"index": "title_ru" (THIS IS AN EXAMPLE)
}
]
`
### NGINX
1. Add this to a NGINX config: `try_files $uri $uri/ /index.php;`
2. Add this to a NGINX config
`
location /images {
alias /PATH/TO/public/themes/default/images;
}
`
## 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"
}
}
`