Case study · Kotlin Multiplatform · Server-driven UI · Internal
Anubis
Anubis (Automatic Network User Based Interface System): a server-driven UI framework for Kotlin Multiplatform. Screens are described as JSON on a Ktor server and rendered natively with Compose, so layouts can change without an app release.
Delivered at MerkleEnterprise mobile & digital engineering
- Context
- Internal engineering at Merkle
- My role
- Contributor: implementation and design
- Period
- Sep 2023 – Oct 2024 (approx.)
- Platform
- Kotlin Multiplatform · Compose · Ktor
The idea
App teams often need to change a screen faster than an App Store release allows. Anubis moves the layout to the server: the app knows how to draw a set of components, and the server decides which ones to show and in what order.
Adding an object to the JSON adds a component to the screen.
What I did
- Worked on the shared models for the components: card, container, divider, text and text button.
- Rendered the JSON object list natively with Compose Multiplatform, with images through Coil.
- Worked with the Ktor client in the app and a Ktor server that serves the screens.
- Built the sample Android and iOS apps and discussed the design with the team.
Modules
anubis-server
- Ktor
- JSON screens
anubis-common
- Card
- Container
- Divider
- Text
- TextButton
anubis-ui
- Compose Multiplatform
- Ktor client
- Coil
Samples
- Android app
- iOS app
Stack
- Kotlin Multiplatform
- Compose Multiplatform
- Ktor
- kotlinx.serialization
- Coil
- Gradle
Team
Built by the internal mobile engineering team at Merkle, as internal reference work.
The result
A working reference for server-driven native UI, later included in the team's KMP Template.