kmp-supportchat
In-app support chat for Kotlin/Compose Multiplatform (Android · iOS · web) over a
dedicated Supabase backend. Pairs with the multi-app Support Console (agent side):
both read/write the same tables, so users and agents see one conversation state —
messages, media, emoji reactions, and swipe-to-reply quotes.
commonMain.dependencies {
implementation("io.github.xemb0:supportchat:1.0.0")
}
Wire-up (Koin)
single {
SupportChatConfig(
appId = "yourapp",
accent = Color(0xFF7C3AED),
currentUserId = { yourAuth.userId() },
userName = { yourAuth.displayName() },
userEmail = { yourAuth.email() },
userAvatarUrl = { yourAuth.photoUrl() },
extraMeta = { mapOf("device" to deviceLabel, "os" to osLabel, "app_version" to version) },
)
}
single<SupportChatRepository> { SupabaseSupportChatRepository(createSupportBackendClient(), get()) }
viewModel { SupportChatViewModel(get(), get()) }
Then render SupportChatRoot(onBack = …) anywhere, or SupportUnreadViewModel
for the unread badge.
Notes
- The module signs users in anonymously on its own Supabase client — the host
app's auth/session is never touched; identity travels as plain conversation data.
- Before the app is registered in the console, all queries 404 (
PGRST205) —
surfaced as "support not available yet", never a crash.
- Reactions/quotes live in shared tables (
message_reactions / message_quotes);
social fetches are best-effort and never hide messages.
MIT licensed.