Overview
The Databite Example Web App is a comprehensive Next.js application that demonstrates how to integrate the Databite SDK into a real-world web application. It showcases connector integration, connection management, data synchronization workflows, and UI components.Repository
The example web app is available in our open-source repository:View on GitHub
Explore the complete implementation with source code, tests, and deployment
configuration
Features Demonstrated
Connector Integration
- Multiple Connectors: Integration with Slack, Trello, and other popular services
- Authentication Flows: OAuth and API key authentication patterns
- Type Safety: Full TypeScript integration with the Databite SDK
Connection Management
- Connection UI: Pre-built React components for connection management
- Status Tracking: Real-time connection status and health monitoring
- Error Handling: Robust error handling and user feedback
Data Synchronization
- Real-time Sync: Live data synchronization with external services
- Scheduled Sync: Automated data synchronization with cron scheduling
- Data Export: Automatic data persistence and export functionality
Flow Execution
- Interactive Workflows: User-friendly authentication and data processing flows
- Form Handling: Built-in form validation and user input processing
- Progress Tracking: Visual progress indicators and status updates
Project Structure
Getting Started
Prerequisites
- Node.js >= 16.0.0
- npm, yarn, pnpm, or bun
Installation
Development
Start the development server:Key Implementation Examples
Basic Connector Setup
Data Synchronization
Flow Execution
Configuration
Environment Variables
Create a.env.local
file in the root directory:
Database Setup
This example uses Prisma for database management:Testing
Run the test suite:Deployment
Vercel (Recommended)
The easiest way to deploy your Next.js app is to use the Vercel Platform:- Push your code to GitHub
- Connect your repository to Vercel
- Set your environment variables in the Vercel dashboard
- Deploy!
Other Platforms
This application can be deployed to any platform that supports Next.js:- Netlify: Use the Next.js build command
- Railway: Deploy directly from GitHub
- Docker: Use the included Dockerfile
- AWS/GCP/Azure: Use their respective deployment services
Key Learning Points
1. Connector Integration Patterns
The example demonstrates several patterns for integrating connectors:- Modal-based Authentication: Using
ConnectModal
for user-friendly authentication - Connection State Management: Managing connection status and health
- Error Handling: Graceful error handling and user feedback
2. Data Synchronization Strategies
- Real-time Sync: Immediate data synchronization when connections are established
- Scheduled Sync: Automated data synchronization using cron schedules
- Data Export: Automatic data persistence and export functionality
3. Flow-based User Experiences
- Interactive Forms: User-friendly forms with validation and error handling
- Progress Tracking: Visual progress indicators and status updates
- Workflow Management: Complex multi-step workflows with conditional logic
4. Type Safety and Error Handling
- TypeScript Integration: Full type safety across all components
- Error Boundaries: React error boundaries for graceful error handling
- Validation: Form validation and data validation using Zod schemas
Extending the Example
Adding New Connectors
Custom UI Components
Custom Flows
Contributing
We welcome contributions to the example web app! Please see our Contributing Guide for details.Related Resources
- Databite SDK Documentation - Core SDK documentation
- Flow Engine Documentation - Flow engine documentation
- Connectors Documentation - Pre-built connectors
- Engine Documentation - Data synchronization and execution engine
- GitHub Repository - Source code and issues