Integrating the SDK

A guide to configuring the Supernova SDK in your projects.

Installation

To install the Supernova SDK, simply run:


                                                        
                                                        
                                                            npm install @supernovaio/sdk
                                                        
                                                            

The SDK is made to run in both local (like Node.js) and remote (browser) environments. Some examples of where you can use the SDK:

  • React applications and websites
  • CI/CD pipelines
  • Figma plugins
  • VSCode extensions

And anywhere you can run JS environment.

Obtaining API Key

Before you can use the SDK to access your data, you must obtain your personal access key from your Supernova.io profile. To do this, sign in to Supernova Cloud, click through Profile > Settings > Authentication and generate a new key. 

Access rights

Usage of the SDK adheres to the general access rights that the account which generated the access key has.

For example, if you are a viewer in a specific workspace, then you will not be able to make any change to that workspace through the SDK and an error will be thrown instead. Make sure you are at least editor level (but ideally admin level) if you are developing with the SDK.

  • Viewers can read design system data, but can't do anything else.
  • Editors can read and write design system data but are unable to manipulate workspaces/design systems.
  • Admins can use all SDK operations.

Make sure to design your experience with the access rights system in mind. If needed, SDK also provides a simple way to check which operations your account is allowed to perform in what design system.