Skip to main content

Overview

The @databite/connect package provides React components to seamlessly integrate Databite connectors into your web applications. This guide shows how to add authentication flows and connection management to your frontend. The package also includes utility functions for server communication, so you don’t need to make manual API calls. All the examples below use these built-in utilities.

Prerequisites

  • A running Databite server (see Setting Up Your First Server)
  • React application (Next.js, Vite, or Create React App)
  • Your server’s API URL

Step 1: Install Dependencies

Step 2: Set Up Environment Variables

Add your server URL to your environment:

Step 3: Create a Connection Component

Create a component to handle connector authentication:

Step 4: Execute Actions

Once connected, you can execute actions on behalf of users: