Skip to main content

Lovina Chat SDK

Cross-platform AI-powered chat for your apps.

Lovina Chat SDK lets you embed real-time customer conversations in any web, Android, iOS, React Native, or Flutter application. Connect your users to live agents and AI assistants with a single integration.

Architecture

The SDK follows a web-first design. One React widget powers every platform. Native mobile SDKs wrap the same widget in a WebView, so all platforms share identical UI, logic, and real-time capabilities.

Web App ──── sdk.js (6 KB) ───┐
Android ──── WebView ────────┤
iOS ──────── WKWebView ──────┤──── Widget App (React) ──── Lovina Backend
React Native ─ WebView ──────┤
Flutter ───── WebView ───────┘

How it works:

  1. SDK loader (sdk.js) is embedded on your page via a script tag or npm package.
  2. The loader creates a launcher bubble and an iframe that hosts the React chat widget.
  3. The widget communicates with the Lovina backend over WebSocket (with SSE and long-polling fallbacks).
  4. On mobile, a thin native shell (Kotlin, Swift, React Native, or Flutter) loads the same widget URL in a platform WebView.

Feature Matrix

FeatureWebAndroidiOSReact NativeFlutter
Text messagingYesYesYesYesYes
File upload (image, PDF, audio, video)YesYesYesYesYes
Real-time (WebSocket)YesYesYesYesYes
Typing indicatorsYesYesYesYesYes
Retry failed messagesYesYesYesYesYes
i18n (3 languages)YesYesYesYesYes
Dark modeYesYesYesYesYes
White-label themingYesYesYesYesYes

Quick Start Guides

Get up and running in under 5 minutes on your platform of choice:

  • Web (JavaScript) -- Script tag or npm, works in any browser
  • Android -- Kotlin WebView wrapper via Gradle/JitPack
  • iOS -- Swift WKWebView wrapper via Swift Package Manager
  • React Native -- WebView component with hooks API
  • Flutter -- WebView widget with typed event callbacks

Tech Stack

  • Widget: React 19, Zustand, React Router, Vite
  • SDK Loader: Zero-dependency IIFE (6.3 KB gzipped)
  • Android: Kotlin, WebView, JavaScriptInterface
  • iOS: Swift, WKWebView, WKScriptMessageHandler
  • React Native: react-native-webview, TypeScript
  • Flutter: webview_flutter, Dart
  • Transport: WebSocket (primary), SSE (fallback), Long Polling (final fallback)
  • Tests: Vitest, 514+ passing