Kotlin Phoenix

Maven Central

This project is aimed to allow developers to work with Phoenix Channels in Kotlin Multiplatform projects, and is composed of several modules:

  • A modern Kotlin Multiplatform Phoenix Channels client, built with coroutines.
  • Adapters designed for specific GraphQL clients (e.g. Apollo Client) allowing them to handle subscriptions via Phoenix Channels

As of now, this project is still experimental and should NOT be used in production.
Please feel free to contribute and to share feedbacks and issues.



Add the mavenCentral repository

// build.gradle.kts

repositories {

Add the kotlinphoenix dependency in commonMain source set.

// shared/build.gradle.kts

sourceSets {
  val commonMain by getting {
    dependencies {

Enable coroutines multithreading (required for iOS)

// gradle.properties


If some of your dependencies rely on coroutines, please force the dependency resolution to version 1.6.0-native-mt with:

// shared/build.gradle.kts

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-native-mt") {
    version {

OR :

// shared/build.gradle.kts

configurations {
    all {
        resolutionStrategy {


See each module’s documentation for example usages.


  • Fork and re-design the JavaPhoenixClient library in order to build a Multiplatform library (at least iOS & Android), using OkHttp for Android and NSUrlSession for iOS
  • Switch all the JavaPhoenixClient library callbacks to a coroutine based approach
  • Publish this brand new library as Kotlin Phoenix Client on Github and Maven
  • Create a PhoenixNetworkTransport adapter for Apollo Kotlin using Kotlin Phoenix Client, which will be available in the same repo, but inside another module.
  • Clean both module’s code and add detailed comment blocks
  • Host Dokka generated API reference on Github Pages (API ref. is already generated by Dokka at /dokka, it just needs to go live)
  • Write and host proper documentation
  • Mock a simple Phoenix server & test the Kotlin Phoenix library
  • Encourage the community to contribute to the project


I strongly believe that this library will be useful to a lot of Kotlin developers wishing to create engaging Phoenix Channels experiences on many platforms !

Any contribution, issue, feature request, feedback you make is greatly appreciated !


Distributed under the MIT License. See LICENSE for more information.


Huge thanks to these people, they helped a lot in many different ways:


View Github