> For the complete documentation index, see [llms.txt](https://neurosell.gitbook.io/parallelix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neurosell.gitbook.io/parallelix/get-started/installation-and-usage.md).

# Installation and Usage

{% hint style="warning" %}
**Warning!** This library is deprectated. Please, [use Cross Mind Framework](https://neurosell.gitbook.io/crossmind/) instead.
{% endhint %}

### Downloading and Installation

Before you start, download Parallelix libraries from the [release page from our official GitHub](https://github.com/Neurosell/parallelix/releases).

**Or clone repository into your project:**

```bash
git clone https://github.com/Neurosell/parallelix.git
```

**Now connect the main script to work with Parallelix in body tag:**

```html
<script type="text/javascript" src="/libraries/parallelix.js"></script>
```

**And start connecting the client in your JS application:**

```javascript
// Configure Parallelix
const client = new Parallelix({
    baseModulesPath: "/libraries/",            // Where your modules located
    supportedPlatforms: ["vk", "telegram"],    // Modules to initialize
    vk: {},                                    // VK Module Config Example
    telegram: {}                               // Telegram Module Config Example
});

// Add Error and Initialization Handler
client.OnError = (error) => {};
client.OnInitialized = (data) => {
    // Work with Parallelix Here
};

// Initialize Client
client.Initialize();
```

{% hint style="warning" %}
**Make sure** that **parallelix.\*\*\*\*.js** modules are located **on the same relative path** that you set in the **Parallelix** object **configuration**.
{% endhint %}

**Done.** We've got the basic connection sorted out. If you want to learn more about configuration options - visit our section in API Reference

***

### Connect your Modules and Usage

Modules are connected automatically when you specify their name in the Parallelix object configuration. The module name is also contained in the script (parallelix.MODULE\_NAME.js).

If you don't need a particular module, you can simply remove it from the configuration.

{% hint style="success" %}
All modules automatically detect for your application which platform Parallelix is currently running on. Thus, our library automatically switches between them, and all you need to do is to use the Unified API
{% endhint %}

**Once connected and initialized, you are notified that the client is ready for use. This is how you can start using it:**

<pre class="language-javascript"><code class="lang-javascript">// Your Client Initialization Handler
client.OnInitialized = (data) => {
    // Publish story to social Network
    client.Platform.PublishStory("mediaURL", {
        vk: {
            // Platform Specific Request Parameters from VK Bridge Docs
        },
        telegram: {
            // Platform Specific Request Parameters from Telegram SDK Docs
        }
    }, (data)=> {
        console.log(data);
    }, (error)=> {
        console.error(error.message);
<strong>    });
</strong>};
</code></pre>

***

### Working with Platform-Specific Libraries

You can also plug in platform-specific scripts, for example, using two different ad networks or analytics systems on different platforms.

**To do this, specify these libraries and the platform on which they should be connected in the Parallelix client configuration:**

```javascript
// Configure Parallelix
const client = new Parallelix({
    // Add Platform Specific Libraires
    specificLibraries: [
        { platform: "vk", script: "https://example.com/script_only_vk.js" },
        { platform: "telegram", script: "https://example.com/script_only_telegram.js" }
    ],
    
    // You Basic Config
    baseModulesPath: "/libraries/",            // Where your modules located
    supportedPlatforms: ["vk", "telegram"],    // Modules to initialize
    vk: {},                                    // VK Module Config Example
    telegram: {}                               // Telegram Module Config Example
});
```

***

### API Reference

So, you have learned the main points on connecting and basic use of Parallelix. [Let's start reviewing the API itself and its methods](/parallelix/api-reference/general-client.md).
