
Enables development of a multiplatform application with features for Android, iOS, desktop, and web. Supports hot reload and comprehensive UI testing across platforms.
This document explains the project architecture of the Pinqponq Chat SDK and how different customer types can integrate it based on their platform and development needs. After reading this document, developers will understand the SDK's modular structure, available components, and integration approaches for various platforms.
The Pinqponq Chat SDK is built using Kotlin Multiplatform technology, providing a unified codebase that compiles to multiple platforms while maintaining platform-specific optimizations.
pinqponq-chat-kmp/
├── pinqponqchat-core/ # Core business logic (Kotlin Multiplatform)
├── pinqponqchat-ui/ # Internal UI components (used by core)
├── pinqponqchat/ # Full SDK (Core + UI integrated)
├── sample/ # Sample applications
├── vanilla-ios/ # Native iOS integration examples (SPM)
└── vanilla-web/ # Web integration examples (Not supported, working on it)
Core Layer (pinqponqchat-core)
UI Layer (pinqponqchat-ui) - Internal Only
Full SDK (pinqponqchat)
You have a Kotlin Multiplatform project targeting Android, iOS, Desktop, and/or Web (WASM). You want to add chat functionality while maintaining code sharing across platforms.
The SDK integrates seamlessly with your existing KMP architecture, providing shared business logic and UI components that work across all your target platforms.
pinqponqchat → Full SDK (Complete UI + Business Logic)pinqponqchat-core → Core SDK (Business Logic Only)Note: UI components are integrated within the Full SDK and not available as a separate module.
Full SDK Integration:
// In your commonMain module
import pinqponqchat.PinqponqChat
import pinqponqchat.PinqponqChatConfig
class ChatFeature {
fun initializeChat() {
PinqponqChat.init(PinqponqChatConfig(
apiKey = "your-api-key",
// other configuration
))
}
@Composable
fun ChatScreen() {
PinqponqChat.screens.ChatScreen()
}
}Core SDK Integration:
// In your commonMain module
import pinqponqchat.core.PinqponqChatCore
class CustomChatManager {
fun initialize() {
PinqponqChatCore.init(apiKey = "your-api-key")
}
fun getMessages(): List<ChatMessage> {
return PinqponqChatCore.getChatMessages()
}
fun sendMessage(text: String) {
PinqponqChatCore.sendMessage(text)
}
}You have a native Android project using Kotlin, targeting Android devices only. You want to add chat functionality with either pre-built UI or custom implementation.
The SDK provides Android-specific optimizations while maintaining the same API surface as the multiplatform version. You can choose between complete UI solutions or just the business logic layer.
pinqponqchat → Full SDK (Complete UI + Business Logic)pinqponqchat-core → Core SDK (Business Logic Only)Note: UI components are integrated within the Full SDK and not available as a separate module.
Full SDK Integration (Jetpack Compose):
// In your Android Activity/Fragment
import pinqponqchat.PinqponqChat
import pinqponqchat.PinqponqChatConfig
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Initialize the SDK
PinqponqChat.init(PinqponqChatConfig(
apiKey = "your-api-key",
context = this
))
setContent {
MyAppTheme {
PinqponqChat.screens.ChatScreen()
}
}
}
}Core SDK Integration (Custom UI):
// In your Android project
import pinqponqchat.core.PinqponqChatCore
class ChatViewModel : ViewModel() {
private val _messages = MutableLiveData<List<ChatMessage>>()
val messages: LiveData<List<ChatMessage>> = _messages
init {
PinqponqChatCore.init(apiKey = "your-api-key")
loadMessages()
}
fun sendMessage(text: String) {
PinqponqChatCore.sendMessage(text)
loadMessages()
}
private fun loadMessages() {
_messages.value = PinqponqChatCore.getChatMessages()
}
}You have a native iOS project using Swift, targeting iOS devices. You want to integrate chat functionality while maintaining full control over the iOS-native user experience.
The SDK provides the core business logic as a Kotlin/Native framework that integrates with your Swift project via Swift Package Manager. You build your own UI using SwiftUI or UIKit.
pinqponqchat-core → Core SDK (Business Logic Only) via Swift Package ManagerNote: Only the Core SDK is available for iOS. UI components are not accessible on iOS platform.
Swift Package Manager Integration:
// In your iOS project
import PinqponqChatCore
class ChatManager: ObservableObject {
@Published var messages: [ChatMessage] = []
@Published var isInitialized = false
private let core = PinqponqChatCore()
func initialize(apiKey: String) {
core.initialize(apiKey: apiKey)
isInitialized = true
loadMessages()
}
func sendMessage(_ text: String) {
core.sendMessage(text)
loadMessages()
}
private func loadMessages() {
messages = core.getChatMessages().map { text in
ChatMessage(text: text, timestamp: Date())
}
}
}SwiftUI Integration:
import SwiftUI
import PinqponqChatCore
struct ChatView: View {
@StateObject private var chatManager = ChatManager()
var body: some View {
VStack {
// Your custom chat UI
ScrollView {
LazyVStack {
ForEach(chatManager.messages) { message in
MessageBubble(message: message)
}
}
}
// Your custom input
MessageInput(chatManager: chatManager)
}
.onAppear {
chatManager.initialize(apiKey: "your-api-key")
}
}
}| Customer Type | Platform | SDK | UI Provided? | Integration Method | Use Case |
|---|---|---|---|---|---|
| Compose Multiplatform | Android, iOS, Desktop, Web (WASM) | pinqponqchat |
✅ Yes | Gradle/SPM | Full UI + Logic |
| Compose Multiplatform | Android, iOS, Desktop, Web (WASM) | pinqponqchat-core |
❌ No | Gradle/SPM | Custom Compose UI |
| Android Kotlin | Android | pinqponqchat |
✅ Yes | Gradle | Drop-in chat screens |
| Android Kotlin | Android | pinqponqchat-core |
❌ No | Gradle | Custom UI/Game integration |
| iOS Swift | iOS | pinqponqchat-core |
❌ No | Swift Package Manager | Native iOS UI |
| Web JS Export | Not supported (JS export limitations) |
Note: UI is provided within the pinqponqchat module for Compose Multiplatform and Kotlin projects. UI SDK is internal and not directly accessible to customers. Desktop and Web platforms are only supported within Compose Multiplatform projects. Web JS export is not currently supported due to Kotlin/JS export limitations.
| Platform | Minimum Version | Dependencies | Package Manager | Supported Project Types |
|---|---|---|---|---|
| Android | API 21+ | Jetpack Compose (for UI) | Gradle | Native Android, Compose Multiplatform, Kotlin |
| iOS | iOS 15.0+ | SwiftUI/UIKit | Swift Package Manager | Native iOS, Compose Multiplatform |
| Desktop | Windows 10+, macOS 10.15+, Linux | Compose Desktop | Gradle | Compose Multiplatform only |
| Web (WASM) | Modern browsers | Compose Web | Gradle | Compose Multiplatform WASM only |
| Web (JS Export) | Modern browsers | N/A | NPM | Not supported (JS export limitations) |
Note: UI is provided within the pinqponqchat module for Compose Multiplatform and Kotlin projects. Desktop and Web platforms are only supported within Compose Multiplatform projects. Web JS export is not currently supported due to Kotlin/JS export limitations.
We are actively monitoring the latest developments in Kotlin/JS export capabilities and JavaScript interoperability. While Web JS export is not currently supported due to technical limitations, we are following:
When these limitations are resolved, we plan to add full Web JS export support with NPM package distribution. Stay updated by following our repository for announcements.
This document explains the project architecture of the Pinqponq Chat SDK and how different customer types can integrate it based on their platform and development needs. After reading this document, developers will understand the SDK's modular structure, available components, and integration approaches for various platforms.
The Pinqponq Chat SDK is built using Kotlin Multiplatform technology, providing a unified codebase that compiles to multiple platforms while maintaining platform-specific optimizations.
pinqponq-chat-kmp/
├── pinqponqchat-core/ # Core business logic (Kotlin Multiplatform)
├── pinqponqchat-ui/ # Internal UI components (used by core)
├── pinqponqchat/ # Full SDK (Core + UI integrated)
├── sample/ # Sample applications
├── vanilla-ios/ # Native iOS integration examples (SPM)
└── vanilla-web/ # Web integration examples (Not supported, working on it)
Core Layer (pinqponqchat-core)
UI Layer (pinqponqchat-ui) - Internal Only
Full SDK (pinqponqchat)
You have a Kotlin Multiplatform project targeting Android, iOS, Desktop, and/or Web (WASM). You want to add chat functionality while maintaining code sharing across platforms.
The SDK integrates seamlessly with your existing KMP architecture, providing shared business logic and UI components that work across all your target platforms.
pinqponqchat → Full SDK (Complete UI + Business Logic)pinqponqchat-core → Core SDK (Business Logic Only)Note: UI components are integrated within the Full SDK and not available as a separate module.
Full SDK Integration:
// In your commonMain module
import pinqponqchat.PinqponqChat
import pinqponqchat.PinqponqChatConfig
class ChatFeature {
fun initializeChat() {
PinqponqChat.init(PinqponqChatConfig(
apiKey = "your-api-key",
// other configuration
))
}
@Composable
fun ChatScreen() {
PinqponqChat.screens.ChatScreen()
}
}Core SDK Integration:
// In your commonMain module
import pinqponqchat.core.PinqponqChatCore
class CustomChatManager {
fun initialize() {
PinqponqChatCore.init(apiKey = "your-api-key")
}
fun getMessages(): List<ChatMessage> {
return PinqponqChatCore.getChatMessages()
}
fun sendMessage(text: String) {
PinqponqChatCore.sendMessage(text)
}
}You have a native Android project using Kotlin, targeting Android devices only. You want to add chat functionality with either pre-built UI or custom implementation.
The SDK provides Android-specific optimizations while maintaining the same API surface as the multiplatform version. You can choose between complete UI solutions or just the business logic layer.
pinqponqchat → Full SDK (Complete UI + Business Logic)pinqponqchat-core → Core SDK (Business Logic Only)Note: UI components are integrated within the Full SDK and not available as a separate module.
Full SDK Integration (Jetpack Compose):
// In your Android Activity/Fragment
import pinqponqchat.PinqponqChat
import pinqponqchat.PinqponqChatConfig
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Initialize the SDK
PinqponqChat.init(PinqponqChatConfig(
apiKey = "your-api-key",
context = this
))
setContent {
MyAppTheme {
PinqponqChat.screens.ChatScreen()
}
}
}
}Core SDK Integration (Custom UI):
// In your Android project
import pinqponqchat.core.PinqponqChatCore
class ChatViewModel : ViewModel() {
private val _messages = MutableLiveData<List<ChatMessage>>()
val messages: LiveData<List<ChatMessage>> = _messages
init {
PinqponqChatCore.init(apiKey = "your-api-key")
loadMessages()
}
fun sendMessage(text: String) {
PinqponqChatCore.sendMessage(text)
loadMessages()
}
private fun loadMessages() {
_messages.value = PinqponqChatCore.getChatMessages()
}
}You have a native iOS project using Swift, targeting iOS devices. You want to integrate chat functionality while maintaining full control over the iOS-native user experience.
The SDK provides the core business logic as a Kotlin/Native framework that integrates with your Swift project via Swift Package Manager. You build your own UI using SwiftUI or UIKit.
pinqponqchat-core → Core SDK (Business Logic Only) via Swift Package ManagerNote: Only the Core SDK is available for iOS. UI components are not accessible on iOS platform.
Swift Package Manager Integration:
// In your iOS project
import PinqponqChatCore
class ChatManager: ObservableObject {
@Published var messages: [ChatMessage] = []
@Published var isInitialized = false
private let core = PinqponqChatCore()
func initialize(apiKey: String) {
core.initialize(apiKey: apiKey)
isInitialized = true
loadMessages()
}
func sendMessage(_ text: String) {
core.sendMessage(text)
loadMessages()
}
private func loadMessages() {
messages = core.getChatMessages().map { text in
ChatMessage(text: text, timestamp: Date())
}
}
}SwiftUI Integration:
import SwiftUI
import PinqponqChatCore
struct ChatView: View {
@StateObject private var chatManager = ChatManager()
var body: some View {
VStack {
// Your custom chat UI
ScrollView {
LazyVStack {
ForEach(chatManager.messages) { message in
MessageBubble(message: message)
}
}
}
// Your custom input
MessageInput(chatManager: chatManager)
}
.onAppear {
chatManager.initialize(apiKey: "your-api-key")
}
}
}| Customer Type | Platform | SDK | UI Provided? | Integration Method | Use Case |
|---|---|---|---|---|---|
| Compose Multiplatform | Android, iOS, Desktop, Web (WASM) | pinqponqchat |
✅ Yes | Gradle/SPM | Full UI + Logic |
| Compose Multiplatform | Android, iOS, Desktop, Web (WASM) | pinqponqchat-core |
❌ No | Gradle/SPM | Custom Compose UI |
| Android Kotlin | Android | pinqponqchat |
✅ Yes | Gradle | Drop-in chat screens |
| Android Kotlin | Android | pinqponqchat-core |
❌ No | Gradle | Custom UI/Game integration |
| iOS Swift | iOS | pinqponqchat-core |
❌ No | Swift Package Manager | Native iOS UI |
| Web JS Export | Not supported (JS export limitations) |
Note: UI is provided within the pinqponqchat module for Compose Multiplatform and Kotlin projects. UI SDK is internal and not directly accessible to customers. Desktop and Web platforms are only supported within Compose Multiplatform projects. Web JS export is not currently supported due to Kotlin/JS export limitations.
| Platform | Minimum Version | Dependencies | Package Manager | Supported Project Types |
|---|---|---|---|---|
| Android | API 21+ | Jetpack Compose (for UI) | Gradle | Native Android, Compose Multiplatform, Kotlin |
| iOS | iOS 15.0+ | SwiftUI/UIKit | Swift Package Manager | Native iOS, Compose Multiplatform |
| Desktop | Windows 10+, macOS 10.15+, Linux | Compose Desktop | Gradle | Compose Multiplatform only |
| Web (WASM) | Modern browsers | Compose Web | Gradle | Compose Multiplatform WASM only |
| Web (JS Export) | Modern browsers | N/A | NPM | Not supported (JS export limitations) |
Note: UI is provided within the pinqponqchat module for Compose Multiplatform and Kotlin projects. Desktop and Web platforms are only supported within Compose Multiplatform projects. Web JS export is not currently supported due to Kotlin/JS export limitations.
We are actively monitoring the latest developments in Kotlin/JS export capabilities and JavaScript interoperability. While Web JS export is not currently supported due to technical limitations, we are following:
When these limitations are resolved, we plan to add full Web JS export support with NPM package distribution. Stay updated by following our repository for announcements.