---
# System prepended metadata

title: Documentation service

---

# Documentation service

## Requirements
* Each doc must have premission level access 
* Own css style
* Version
    * docs.rake.ai/v3 and docs.rake.ai/ return same docs

> We will create own service for render and host docs
> 

TODO
1. Check gitLab + hackmd in public repo
2. Finish work of folder structure


##  Work flow

1. Create file in GitLab UI
2. Edit this file
4. Send review request to develop team
    > autodeploy on UAT env 
5. After aprove developer team, send review request to Mike and Andy
6. After aprove Mike and Andy
    > autodeploy on PROD env 

## Levels

Highest level structure:
- System (not public)  docs.rake.ai/system
- Introduction         docs.rake.ai
- Users Guide          docs.rake.ai/user
- Administration Guide docs.rake.ai/admin/v2
- API Developers Guide docs-uat.rake.ai/api
- Platforms

### Release v1.4.10.3
- (empty)System (not public)           docs.rake.ai/system
    - index.md
- (empty)Introduction(Home Page)       docs.rake.ai
    - index.md
    - Get started
- (empty)User                          docs.rake.ai/user
    - index.md
- (empty)Administration                docs.rake.ai/admin/v2
    - index.md
- Platforms                            docs.rake.ai/platforms
    - Rake live chat                   docs.rake.ai/platforms/rake-live-chat
        - JS API                       docs.rake.ai/platforms/rake-live-chat/js-api
            - Widget JS API overview.md
            - Widget methods           docs.rake.ai/platforms/rake-live-chat/js-api/methods
                - List of methods.md
                - ...
            - Widget events            docs.rake.ai/platforms/rake-live-chat/js-api/events
                - List of events.md
                - ...
- (empty)API                           docs-uat.rake.ai/api
    

## Repositories structure
| branch | description        | 
| ------ | ------------------ |
| master | autodeploy on PROD |
| uat    | autodeploy on UAT  |

### File system:
* widget-service
    * proactive message logic
        * menu.json 
            ```javascript=
            {
                title: "Proactive message rule",
                tree: [
                    { 
                         permisssionIds: [1,2,3],
                         title: 'v1',
                         file: './v1.md'
                    },
                    { 
                         permisssionIds: [1,2,3],
                         title: 'v2',
                         file: './v2.md'
                    }
                ]
            }
            ```
        * v1
            * menu.json 
                ```javascript=
                {
                   tree: [
                     { 
                         title: 'Proactive message dismiss logic',
                         file: './api-1.md'
                     },
                     { 
                         title: 'Proactive message click logic',
                         file: './api-2.md'
                     },
                     {
                         permisssionIds: [3],
                         title: 'Proactive message click logic - 4',
                         file: './api-3.md'
                     }
                   ]
                 }
                 ```
            * api-1.md
            * api-2.md
            * api-3.md
        * v2
            * menu.json 
              ```javascript=
                {
                   tree: [
                     { 
                         title: 'Proactive message dismiss logic',
                         file: '../v1/api-1.md'
                     },
                     { 
                         title: 'Proactive message click logic',
                         file: './api-2.md'
                     },
                     { 
                         title: 'Proactive message click logic - 2',
                         file: './api-2.md'
                     }
                   ]
                 }
                 ```
            * api-2.md
            * api-3.md
    * JS API description
        * v1
* admin-service


### Examples

#### v1
```javascript=
* repository(master)
    * <other folders with code>
    * docs
        * menu.json
        * System
            * menu.json
            * core-service
                * menu.json
                * v1
                    * menu.json
                    * v1.4.0
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
                    * v1.4.1
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
                * v2
                    * menu.json
                    * v2.0
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
            * worker-service
            * admin-service
            * widget-service
        * User (rake-user-app-service)
            * menu.json
            * user guide
            * Release list
                * menu.json
                * v1.4.0.md
                * v1.4.1.md
                * v2.0.md
        * Admin (admin-service)
            * menu.json
            * user guide
            * Release list
                * menu.json
                * v1.4.0.md
                * v1.4.1.md
                * v2.0.md
        * API
            * core-service
            * worker-serivce
            * admin-service
            * rake-user-app-serivce
```
```javascript=
* repository(uat)
    * <other folders with code>
    * docs
        * menu.json
        * System
            * menu.json
            * core-service
                * menu.json
                * v1
                    * menu.json
                    * v1.4.0
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
                    * v1.4.1
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
                * v2
                    * menu.json
                    * v2.0
                        * menu.json
                        * doc-1
                        * doc-2
                        * ...
            * worker-service
            * admin-service
            * widget-service
        * User
            * menu.json
            * Release list
                * menu.json
                * v1.4.0.md
                * v1.4.1.md
                * v2.0.md
            * admin service
                * menu.json
                * user guide
            * rake user app
                * menu.json
                * user guide
        * Admin
        * API
            * core-service
            * worker-serivce
            * admin-service
            * rake-user-app-serivce
```

#### v2

```javascript=
Repo folder

    * Folder 1.11
        * UAT Folder
            * JS API Description    
        * PROD Folder (access to only product owners)
            * JS API Description
    * Folder 1.12
        * UAT Folder
            * JS API Description
        * PROD Folder
            * JS API Description
    * Folder 1.13
        * UAT Folder
            * JS API Description
        * PPOD Folder
            * JS API Description

```