Guide
Prepare a Superblocks app for building Weavy components
Prerequisites
You will need:
- A Weavy API key
- A Superblocks account with admin rights
- Git
- Node.js
You will need:
Before you can work with Weavy, you'll need to sign up for an account or sign into your existing account.
We need to create a bridge between Weavy and Superblocks. We'll define a new WeavyAPI
REST integration. This is where you securely can configure the server connection to the Weavy backend.
REST API
.WeavyAPI
. Make sure you get the name right as it will be referenced later.WY_BACKEND_URL
as Base URL, which is the url you your Weavy environment.Authentication
, select Bearer Token
.Token
.Content-Type
and set the value to application/json
.WY_API_*****************
WY_BACKEND_URL
with the URL to your Weavy backend.WY_API_*****************
with an API key for your Weavy backend.You can find this information in your Weavy account.
You haven't selected an API key. If you do - code snippets, scripts and files you download will automatically be updated with API key and backend URL.
To prepare the app for Weavy Components, we need to configure the Weavy environment url in a Frontend variable in the App scope of your Superblocks app.
WEAVY_URL
.WY_BACKEND_URL
which is the url to your Weavy environment.git clone https://github.com/weavy-labs/superblocks-weavy-components.git superblocks-weavy-components
Change your directory to superblocks-weavy-components
and run:
npm install
The component repo is using the Superblocks CLI to work with the custom components. Log in to your Superblocks account.
npx superblocks login
Once you have your Superblocks authentication configured, you can run the create:components
script to upload and configure the Weavy workflows.
During the installation you will have to deploy the created workflows to make them available for your apps. Just follow the instructions in the terminal to open the workflows in the browser and deploy them.
The installation will ask you which app to use and which pages to install to.
npm run create:components
The script will automatically configure the following:
WeavyAuthentication
workflow for user authentication token handling. The workflow is using the WeavyAPI
you created.WeavyPageNavigation
workflow for saving page metadata that is needed by Weavy Notifications to be able to navigate back to the container their content originated from. The workflow is using the WeavyAPI
you created.GetWeavyToken
backend API in each page you have selected. The API is using the WeavyAuthentication workflow.SetWeavyNavigation
backend API in each page you have selected. The API is using the WeavyPageNavigation workflow.Open your app and start adding Weavy components by just drag-n-dropping them onto your canvas from the Add components panel.
Start playing with the components and have a look at the other tutorials to add more features!
We need an API key to communicate with Weavy for authentication, etc
Select what technology you want to ask about
Get answers faster with our tailored generative AI. Learn more about how it works
This is a custom LLM for answering your questions. Answers are based on the contents of the documentation and this feature is experimental.
To access live chat with our developer success team you need a Weavy account.