This is an experiment on Kotlin multiplatform using Compose for UI components.
- api: Layer to communicate with Mastodon API using Ktor client and Kotlinx for serialization and co-routines.
- ui: Compose multiplatform layer that uses the api module to login and post a toot.
- android: Android layer that uses the ui module to publish an Android application.
- desktop: Compose Desktop layer that uses the ui module to publish a desktop app. At the moment, only macOS is fully configured.
Create a local.properties
file similar to:
instance=https://mastodon.social
clientId=rjw6...2a8
clientSecret=ZDnE...xih4
scope=read write
redirectScheme=rsstodon
After that, sync the project and run either Android app or Desktop app.
Note: You can create an app on your Mastodon account, in the "Development" section. Once the app is created, you can copy the client id and client key from the profile. Remember that the scope and redirect scheme in your local.properties also needs to match the scope configured in the server.