fixed for github

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2025-01-16 14:27:27 +07:00
parent 19a797cdf3
commit d0930fd73a

View File

@ -3,7 +3,7 @@ Base for creating shop chat-robots using Web App technology for ![Telegram](http
## Functions ## Functions
1. Tree-structured catalog 1. Tree-structured catalog
2. Product cards with images carousel based on ![mirzaev/hotline.mjs](https://git.svoboda.works/mirzaev/hotline.mjs) 2. Product cards with images carousel (![mirzaev/hotline.mjs](https://git.svoboda.works/mirzaev/hotline.mjs))
3. Cart (CRUD with limits and session binding) 3. Cart (CRUD with limits and session binding)
4. Saving user data (and session) for all devices 4. Saving user data (and session) for all devices
5. Deliveries settings (with interactive maps and automatic geolocation detection on smartphones) 5. Deliveries settings (with interactive maps and automatic geolocation detection on smartphones)
@ -67,7 +67,7 @@ Base for creating shop chat-robots using Web App technology for ![Telegram](http
### AnangoDB ### AnangoDB
1. **Configure unix-socket**<br> 1. **Configure unix-socket**<br>
<br>
Edit the file `/etc/arangodb3/arangod.conf`<br> Edit the file `/etc/arangodb3/arangod.conf`<br>
`endpoint = tcp://127.0.0.1:8529` -> `endpoint = unix:///var/run/arangodb3/arango.sock` (this will disable the web panel)<br> `endpoint = tcp://127.0.0.1:8529` -> `endpoint = unix:///var/run/arangodb3/arango.sock` (this will disable the web panel)<br>
<br> <br>
@ -98,15 +98,16 @@ upstream arangodb {
![here is my solution for "permission denied" problem on Ubuntu (accepted by ArangoDB maintainer)](https://github.com/arangodb/arangodb/issues/17302)<br> ![here is my solution for "permission denied" problem on Ubuntu (accepted by ArangoDB maintainer)](https://github.com/arangodb/arangodb/issues/17302)<br>
1. **Configure TCP (instead of unix-socket)**<br> 1. **Configure TCP (instead of unix-socket)**<br>
<br>
Edit the file `/etc/arangodb3/arangod.conf`<br> Edit the file `/etc/arangodb3/arangod.conf`<br>
`endpoint = tcp://127.0.0.1:8529` -> `endpoint = tcp://0.0.0.0:8529`<br> `endpoint = tcp://127.0.0.1:8529` -> `endpoint = tcp://0.0.0.0:8529`<br>
<br>
Edit the file `mirzaev/huesos/system/settings/arangodb.php`<br> Edit the file `mirzaev/huesos/system/settings/arangodb.php`<br>
`unix:///var/run/arangodb3/arango.sock` -> `tcp://YOUR_IP_ADDRESS:8529` (it is slow and not secure)<br> `unix:///var/run/arangodb3/arango.sock` -> `tcp://YOUR_IP_ADDRESS:8529` (it is slow and not secure)
--- ---
2. **Create a Graph with the specified values**<br> 2. **Create a Graph with the specified values**<br>
<br>
**Name:** catalog<br> **Name:** catalog<br>
* Relation 1<br> * Relation 1<br>
@ -118,37 +119,42 @@ Edit the file `mirzaev/huesos/system/settings/arangodb.php`<br>
**edgeDefinition:** reservation<br> **edgeDefinition:** reservation<br>
**fromCollections:** product<br> **fromCollections:** product<br>
**toCollections:** cart **toCollections:** cart
--- ---
3. **Create a Graph with the specified values**<br> 3. **Create a Graph with the specified values**<br>
<br>
**Name:** users<br> **Name:** users<br>
* Relation 1<br> * Relation 1<br>
**edgeDefinition:** connect<br> **edgeDefinition:** connect<br>
**fromCollections:** cart, session<br> **fromCollections:** cart, session<br>
**toCollections:** account, session<br> **toCollections:** account, session<br>
<br>
**Orphan Collections:** product * Orphan Collections<br>
product
--- ---
4. **Create indexes for the "product" collection**<br> 4. **Create indexes for the "product" collection**<br>
<br>
**Type:** "Inverted Index"<br> **Type:** "Inverted Index"<br>
**Fields:** name.ru<br> **Fields:** name.ru<br>
**Analyzer:** "text_ru"<br> **Analyzer:** "text_ru"<br>
**Search field:** true<br> **Search field:** true<br>
**Name:** name_ru<br> **Name:** name_ru<br><br>
<br>
*Add indexes for all search parameters and for all languages (search language is selected based on the user's language, <br> *Add indexes for all search parameters and for all languages (search language is selected based on the user's language, <br>
otherwise from the default language specified in the active settings from **settings** collection document)*<br> otherwise from the default language specified in the active settings from **settings** collection document)*<br>
<br> <br>
*See fields in the `mirzaev/arming_bot/models/product`<br> *See fields in the `mirzaev/arming_bot/models/product`<br>
**name.ru**, **description.ru** and **compatibility.ru***<br> **name.ru**, **description.ru** and **compatibility.ru***<br>
--- ---
5. **Create a View with the specified values**
5. **Create a View with the specified values**<br>
**type:** search-alias (you can also use "arangosearch")<br> **type:** search-alias (you can also use "arangosearch")<br>
**name:** **product**s_search<br> **name:** **product**s_search<br>
**indexes:**<br> **indexes:**<br><br>
<br>
You can copy an example of view file from here: `/examples/arangodb/views/products_search.json` You can copy an example of view file from here: `/examples/arangodb/views/products_search.json`
```json ```json
@ -170,17 +176,14 @@ Edit the file `/etc/nginx/mime.types`<br>
`application/javascript js;` -> `application/javascript js mjs;` `application/javascript js;` -> `application/javascript js mjs;`
### SystemD (or any alternative you like) ### SystemD (or any alternative you like)
You can copy an example of systemd file from here: `/examples/systemd/huesos.service`<br> You can copy an example of systemd file from here: `/examples/systemd/huesos.service`<br><br>
<br> **Execute:** `sudo cp huesos.service /etc/systemd/system/huesos.service && sudo chmod +x /etc/systemd/system/huesos.service`<br><br>
**Execute:** `sudo cp huesos.service /etc/systemd/system/huesos.service && sudo chmod +x /etc/systemd/system/huesos.service`<br>
<br>
*before you execute the command think about **what it does** and whether the **paths** are specified correctly*<br> *before you execute the command think about **what it does** and whether the **paths** are specified correctly*<br>
*the configuration file is very simple and you can remake it for any alternative to SystemD that you like* *the configuration file is very simple and you can remake it for any alternative to SystemD that you like*
## Menu ## Menu
Menu inside the Web App<br> *Menu inside the Web App*<br><br>
<br>
Make sure you have a **menu** collection (can be created automatically)<br> Make sure you have a **menu** collection (can be created automatically)<br>
You can copy a clean menu documents without comments from here: `/examples/arangodb/collections/menu` You can copy a clean menu documents without comments from here: `/examples/arangodb/collections/menu`
@ -208,8 +211,7 @@ You can copy a clean menu documents without comments from here: `/examples/arang
``` ```
## Settings ## Settings
Settings of chat-robot and Web App<br> *Settings of chat-robot and Web App*<br><br>
<br>
Make sure you have a **settings** collection (can be created automatically) and at least one document with the "status" parameter set to "active"<br> Make sure you have a **settings** collection (can be created automatically) and at least one document with the "status" parameter set to "active"<br>
You can copy a clean settings document without comments from here: `/examples/arangodb/collections/settings.json` You can copy a clean settings document without comments from here: `/examples/arangodb/collections/settings.json`
@ -233,8 +235,7 @@ You can copy a clean settings document without comments from here: `/examples/ar
``` ```
## Suspensions ## Suspensions
System of suspensions of chat-robot and Web App<br> *System of suspensions of chat-robot and Web App*<br><br>
<br>
Make sure you have a **suspension** collection (can be created automatically)<br> Make sure you have a **suspension** collection (can be created automatically)<br>
You can copy a clean suspension document without comments from here: `/examples/arangodb/collections/suspension.json` You can copy a clean suspension document without comments from here: `/examples/arangodb/collections/suspension.json`
```json ```json