Overview
What is Lovina Chat SDK?
Lovina Chat SDK is a cross-platform messaging SDK for the Lovina AI platform. It provides a fully featured, real-time chat widget that connects your customers to live agents and AI assistants -- all within your own application.
Who it is for:
- Product teams embedding customer support chat into web or mobile apps
- Developers building white-labeled messaging experiences
- Organizations that need multi-platform chat with a single codebase
Architecture at a Glance
The SDK uses a layered architecture where a lightweight loader on your page creates an iframe that hosts the full chat widget. On mobile, a native WebView replaces the iframe.
Your Website / App
|
+-- sdk.js (parent page)
| Creates the launcher bubble and iframe
| Exposes window.$lovina API
| PostMessage bridge to widget
|
+-- <iframe> Widget App
React SPA: chat UI, message composer, history
REST API for messages, contacts, conversations
WebSocket / SSE / Long Polling for real-time events
On mobile platforms, the architecture is identical -- the native SDK provides a thin WebView shell that loads the widget URL, handles lifecycle, network monitoring, and session persistence.
Key design decisions:
- Web-first: One React widget powers all platforms. No duplicated UI code.
- Async loading: The SDK script loads asynchronously and never blocks page rendering.
- Transport fallback: WebSocket is preferred, with automatic downgrade to SSE or long polling behind restrictive firewalls.
- White-label ready: Every visual aspect (colors, fonts, icons, text) is configurable via a single settings object.
Prerequisites
| Requirement | Version |
|---|---|
| Node.js | 20+ (for development) |
| pnpm | 9+ (for development) |
| Modern browser | ES2020+ support |
For mobile platforms, see the specific quick start guides for minimum OS and tooling versions.
Supported Platforms
| Platform | Minimum Version | Integration Method |
|---|---|---|
| Web (all modern browsers) | ES2020+ | Script tag or npm package |
| Android | API 24 (Android 7.0) | Gradle / JitPack |
| iOS | iOS 15.0 | Swift Package Manager |
| React Native | 0.70+ | npm package + react-native-webview |
| Flutter | 3.0+ | pubspec.yaml dependency |
Next Steps
Choose your platform and follow the quick start guide: