Overview
This guide will walk you through creating your first connector using the Databite SDK. We’ll build a simple connector for a hypothetical API service that demonstrates the core concepts and patterns.Prerequisites
Before starting, make sure you have:- Node.js >= 16.0.0 installed
- Basic knowledge of TypeScript
- Understanding of REST APIs
Step 1: Installation
First, install the required packages:Step 2: Define Configuration Schemas
Start by defining the configuration schemas for your connector:Step 3: Create Authentication Flow
Create an authentication flow using the Flow engine:Step 4: Create Actions
Define the actions your connector will support:Step 5: Create Syncs
Define data synchronization operations:Step 6: Build the Connector
Now put it all together to create your connector:Step 7: Test Your Connector
Create a simple test to verify your connector works:Step 8: Use in a React Application
If you’re building a React application, you can use the Connect components:Best Practices
1. Error Handling
Always provide meaningful error messages:2. Input Validation
Use Zod schemas for robust input validation:3. Timeout Configuration
Set appropriate timeouts for different operations:4. Retry Logic
Configure retry logic based on the operation type:Next Steps
Authentication Flows
Learn about different authentication patterns and flows
Data Synchronization
Set up automated data synchronization
Custom Connectors
Build more complex connectors with advanced features
Testing Connectors
Learn how to test your connectors effectively
Troubleshooting
Common Issues
TypeScript Errors
TypeScript Errors
Make sure you have the correct types imported and your schemas are properly
defined.
Authentication Failures
Authentication Failures
Check that your authentication flow is correctly configured and your API
credentials are valid.
Action Execution Errors
Action Execution Errors
Verify that your action handlers are properly implemented and handle errors
gracefully.
Getting Help
If you run into issues:- Check the Common Issues guide
- Review the Debugging guide
- Join our Discord community
- Open an issue on GitHub