Skip to main content
Suada provides official SDKs for multiple platforms and frameworks to help you integrate business analytics into your applications. Choose the SDK that best matches your tech stack:

Available SDKs

Frontend SDKs

Backend SDKs

Quick Comparison

Choose the right SDK based on your needs:
SDKBest ForKey FeaturesRequirements
ReactWeb applications using ReactComponent library, hooks, TypeScript supportReact 18+
Next.jsServer-side rendered React appsServer Components, API routes, App RouterNext.js 13+
AngularEnterprise Angular applicationsInjectable services, components, TypeScriptAngular 17.3+
VueVue.js applicationsComposables, components, TypeScriptVue 3.0+
React NativeMobile applicationsNative components, deep linking supportReact Native 0.73+
Vanilla JSAny web applicationFramework agnostic, CDN supportModern browsers
Node.jsBackend services, LangChainLangChain integration, async supportNode.js 18+
PythonData analysis, LangChainLangChain integration, type hintsPython 3.8+

Core Features

🔒 OAuth Integration

All SDKs provide secure OAuth integration:
OAuth Integration Flow
  1. Initialize Connection
    • User clicks connect button
    • SDK handles OAuth redirect
    • Secure token exchange
  2. Authorization
    • User authenticates with provider
    • Secure callback handling
    • Token management
  3. Integration Complete
    • Success confirmation
    • Ready to use

🛠️ Common Features

All SDKs share these core features:
  • Type Safety: Built-in TypeScript/type hints support
  • Error Handling: Comprehensive error types and handling
  • API Consistency: Similar patterns across all SDKs
  • LangChain Support: Integration with LangChain (Node.js and Python)
  • Passthrough Mode: Support for using with external user identifiers

Getting Started

Prerequisites

Before you begin, ensure you have:
  • A Suada API key
  • Node.js 16.0.0 or higher (for JavaScript/TypeScript SDKs)
  • Python 3.8+ (for Python SDK)
  • Your preferred package manager

Installation

Each SDK can be installed via its respective package manager:
# React/Next.js/Angular/Vue/React Native/Node.js
npm install @suada/[sdk-name] @suada/core

Environment Setup

Set up your environment variables based on your framework:
# React/Vue/Angular
VITE_SUADA_API_KEY=your-api-key
VITE_SUADA_BASE_URL=https://api.suada.ai

# Next.js
NEXT_PUBLIC_SUADA_API_KEY=your-api-key
NEXT_PUBLIC_SUADA_BASE_URL=https://api.suada.ai

# React Native
SUADA_API_KEY=your-api-key
SUADA_BASE_URL=https://api.suada.ai

# Node.js/Python
SUADA_API_KEY=your-api-key
SUADA_BASE_URL=https://api.suada.ai

Basic Integration

  1. Install SDK
    npm install @suada/react @suada/core
    
  2. Configure Provider
    import { SuadaProvider } from '@suada/react';
    
    function App() {
      return (
        <SuadaProvider config={{
          apiKey: process.env.SUADA_API_KEY
        }}>
          <YourApp />
        </SuadaProvider>
      );
    }
    
  3. Add Components
    <IntegrationButton provider="notion" />
    

Best Practices

Security

  • Store API keys in environment variables
  • Use HTTPS for all API calls
  • Implement proper error handling
  • Secure OAuth callback endpoints
  • Validate user sessions

Performance

  • Initialize SDK instances once and reuse them
  • Implement proper cleanup
  • Handle offline scenarios
  • Optimize network requests
  • Use proper caching

Development

  • Use TypeScript/type hints when available
  • Follow framework best practices
  • Write unit tests
  • Keep dependencies updated
  • Use proper error boundaries

FAQ

How do I handle OAuth callbacks?

  1. Set up your callback URL in the Suada dashboard
  2. Configure the redirect URI in your component
  3. Handle the callback in your application
// Example callback handler
const handleCallback = async (code: string) => {
  try {
    await suada.handleOAuthCallback(code);
    // Handle success
  } catch (error) {
    // Handle error
  }
};

How do I manage user sessions?

  1. Use the built-in session management
  2. Implement proper cleanup
  3. Handle token refresh
// Example session management
const { session, refreshToken } = useSession();

// Refresh token when needed
await refreshToken();

How do I debug integration issues?

  1. Enable debug mode
  2. Check network requests
  3. Validate OAuth flow
// Enable debug mode
const suada = new Suada({
  debug: true,
  logger: console.log
});

How do I handle offline scenarios?

  1. Implement proper error handling
  2. Use retry mechanisms
  3. Cache responses
// Example offline handling
const handleRequest = async () => {
  try {
    return await suada.request();
  } catch (error) {
    if (error.code === 'OFFLINE') {
      // Handle offline scenario
    }
  }
};

Support & Resources

Documentation

Support

I