See API reference: https://ajacquierbret.github.io/kotlin-phoenix
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 {
mavenCentral()
}
Add the kotlinphoenix
dependency in commonMain
source set.
// shared/build.gradle.kts
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.github.ajacquierbret:kotlinphoenix-$moduleName:1.0.3")
}
}
}
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 andNSUrlSession
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
- Write and host proper documentation
- Refactor Presence with coroutines and suspending functions
- 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:
- @dsrees – For the JavaPhoenixClient library on which this project is based.
- @martinbonnin and @BoD – For their golden advices and help building the project !