Integrate Vercel with Astra DB Serverless
Vercel can use Astra DB Serverless to store and retrieve vectors for your frontend applications. This tutorial shows you how to integrate Astra DB Serverless with Vercel.
The DataStax Astra DB integration is available in the Vercel Integrations Marketplace.
Prerequisites
The steps on this page assume the following:
-
You have an active Astra account.
-
You have an active Vercel account.
-
You have created a Serverless (Vector) database.
-
You have created an application token with the Database Administrator role.
Add the DataStax Astra DB integration to your Vercel project
You can add the DataStax Astra DB integration using the Vercel Dashboard.
-
In the Vercel Dashboard, select an existing project or create a new project.
-
To integrate Astra into your Vercel project, navigate to the DataStax Astra DB page of the Vercel Integrations Marketplace.
-
Select Add Integration.
-
Select a Vercel account to install the integration to.
-
Select a Vercel project to integrate with Astra.
-
Select Install. You will be redirected to Astra to authorize the integration.
-
-
Authenticate to Astra with GitHub, Google, or your email and password.
-
Select the Astra organization this integration will have access to, and then select Continue. If you have multiple organizations, you can install the integration for each organization.
-
To integrate your Astra database and Vercel project, complete the fields as follows:
-
Select the Astra database this integration will have access to, and then select Continue.
-
Select the Vercel project to link to your Astra database, and then select Complete Integration.
-
The Astra integration is now installed.
Confirm the integration between Vercel and Astra
After you add the integration, you should verify that it’s working.
-
In the Astra Portal, select Settings > Tokens. A new token is generated with the role Integration Role - Vercel.
-
In the Vercel Dashboard, go to your Vercel project, and then select Settings > Integrations. A new integration is generated with the name DataStax Astra DB.
If these items are present, the integration was successful.
Manage Astra’s access to Vercel
After you add the integration, Astra is granted access to Vercel. You can view and manage this access using the Vercel Dashboard.
-
In the Vercel Dashboard, open your Vercel project.
-
Select Settings > Integrations.
-
To manage the Astra integration, select Configure to view the integration details:
-
Go to the Permissions section to see the permissions the integration has. For more on Vercel permissions, see the Vercel documentation.
-
Go to the Access section to see which Vercel projects the integration can access. You can have multiple projects in your Vercel team integrated with the same Astra database.
-
Select Manage Access to change which projects the integration has access to.
-
Manage Vercel’s access to Astra
After you add the integration, Vercel is granted access to Astra. You can view and manage this access using the Astra Portal, or remove the integration entirely.
-
In the Astra Portal, switch to the organization that you used when adding the integration.
-
Select Settings in the main navigation, and then go to Roles.
-
Find the Integration Role - Vercel role. This is the role that Astra generated when you added the integration to your Vercel project.
-
Select
More, and then select Edit Role.-
Use Add Permissions to control permissions for the Vercel integration role.
-
Use Add Databases to control the Astra databases and keyspaces the Vercel integration has access to.
-
-
Select Edit Role to save your changes.
Remove the Astra integration
To remove the Astra integration, you must delete the corresponding role and token from the Astra Portal.
-
In the Astra Portal, switch to the organization that you used when adding the integration.
-
Select Tokens in the main navigation, and go to the Manage Existing Tokens section.
-
Find the token with the Integration Role - Vercel role. This is the token that Astra generated when you added the integration to your Vercel project.
-
Select
More, and then select Delete. -
To permanently delete the token, select Delete Token.
-
-
Go to Roles.
-
Find the Integration Role - Vercel role. This is the role that Astra generated when you added the integration to your Vercel project.
-
Select
More, and then select Delete Role. -
To permanently delete the role, select Delete Role.
-
The Astra integration is deleted and the Vercel project can no longer access your organization or databases.