Skip to main content

Quickstart

Welcome to the SuperViz Collaboration Quickstart guide! This step-by-step guide will help you integrate our collaboration features into your web application using JavaScript. If you prefer to use React, you can switch to our React-specific SDK by selecting the appropriate language in the dropdown menu.

1

Before we start

Ensure your development environment is set up with Node.js (v14 or more recent) and either npm or yarn for package management.

2

Install the package

Install the SDK package with the npm package:

npm install --save @superviz/sdk
3

Import the Room

After installation, import the SuperVizRoom from the SDK into your application code:

import SuperVizRoom from '@superviz/sdk'
4

Initialize a Room

Next, initialize a room using your DEVELOPER_KEY and an options object. The room serves as the main access point for all collaboration features, with various methods to add components.

For details on the options object, refer to our API Reference page.

async function initializeSuperVizRoom() {
const room = await SuperVizRoom(DEVELOPER_KEY, {
roomId: "ROOM_ID",
group: {
id: "GROUP_ID",
name: "GROUP_NAME",
},
participant: {
id: "USER_ID",
name: "USER_NAME"
},
})

return room
}
5

Add a component to the room

Once your room is initialized, you can enhance your application by adding various collaboration components. Simply call the relevant methods to add: