> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/bim/framework-agnostic-setup.md).

# Framework Agnostic Setup

Learn how to set up a framework-agnostic project with this guide. Discover how to create a front-end setup independent of any specific platform. The Apryse Web SDK streamlines secure, serverless docum

{% hint style="info" %}
New licenses for WebViewer BIM are no longer offered.
{% endhint %}

This project sample uses React as the front-end framework, but you may wish to use (or not use) a different framework. This section shows how to setup the front-end agnostic of any framework:

## Prerequisites

It is recommended you install [Node](https://nodejs.org/) and [npm](https://www.npmjs.com/).

## NPM packages

* [https://www.npmjs.com/package/@pdftron/webviewer](https://www.npmjs.com/package/@pdftron/webviewer/)
* [https://www.npmjs.com/package/@pdftron/webviewer-bim-client](https://www.npmjs.com/package/@pdftron/webviewer-bim-client/)

## Copying resources to public/ folder

There are several directories that need to be copied and served locally in your application.

There are two folders you need to copy:

* node\_modules/@pdftron/webviewer/public
* node\_modules/@pdftron/webviewer-bim/dist

{% tabs %}
{% tab title="Bash" %}
{% code lineNumbers="true" %}

```bash
cp -R ./node_modules/@pdftron/webviewer/public public/webviewer/lib
cp -R ./node_modules/@pdftron/webviewer-bim/dist public/webviewer-bim
```

{% endcode %}
{% endtab %}
{% endtabs %}

See [scripts/copy-webviewer-files.js](https://github.com/ApryseSDK/webviewer-BIM-sample/blob/main/scripts/copy-webviewer-files.js) for a simple script to do this.

Afterwards the folder structure will look something like:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
public/
  webviewer/
    lib/
      ui/
      core/
  webviewer-bim/
    compress/
    oda/
    webviewer-bim-min.js
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Sample code

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
import  Webviewer  from  '@pdftron/webviewer';
import { initializeBimViewer } from '@pdftron/webivewer/bim-client'

Webviewer({
  path: '/webviewer/lib',
}, document.getElementById('viewer')).then(instance  => {

  const license = `---- Insert commercial license key here after purchase ----`;
  const serverURL = `---- Insert server URL after setup ----`;
  const options = { license: license };
  const WebViewerBIM = await initializeBimViewer(instance, serverURL, options);
  WebViewerBIM.File.load3dAsset('Add URL to your 3D asset here');

});
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/web/bim/framework-agnostic-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
