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:
- SDK loader (
sdk.js) is embedded on your page via a script tag or npm package. - The loader creates a launcher bubble and an iframe that hosts the React chat widget.
- The widget communicates with the Lovina backend over WebSocket (with SSE and long-polling fallbacks).
- On mobile, a thin native shell (Kotlin, Swift, React Native, or Flutter) loads the same widget URL in a platform WebView.
Feature Matrix
| Feature | Web | Android | iOS | React Native | Flutter |
|---|---|---|---|---|---|
| Text messaging | Yes | Yes | Yes | Yes | Yes |
| File upload (image, PDF, audio, video) | Yes | Yes | Yes | Yes | Yes |
| Real-time (WebSocket) | Yes | Yes | Yes | Yes | Yes |
| Typing indicators | Yes | Yes | Yes | Yes | Yes |
| Retry failed messages | Yes | Yes | Yes | Yes | Yes |
| i18n (3 languages) | Yes | Yes | Yes | Yes | Yes |
| Dark mode | Yes | Yes | Yes | Yes | Yes |
| White-label theming | Yes | Yes | Yes | Yes | Yes |
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