
Parses JSON models to describe user interfaces, featuring a reference GUI implementation and a sample application demonstrating usage.
Kodices is a Server-Driven UI framework for Kotlin Multiplatform. It allows you to define your user interfaces using JSON, which can be fetched from a server at runtime. This enables you to update your app's UI without shipping a new version to the app store. A reference implementation and an example that use Compose multiplatform are provided, however you can integrate Kodices with Native UI or other UI frameworks.
This repository contains different modules to help you get started:
+--------------+ +--------------------+ +-----------------+
| | | | | |
| KodexServer |---->| Kodices |---->| Piktographs |
| (JSON source)| | (Core functonality)| | (Reference UI) |
| | | | | |
+--------------+ +--------------------+ +-----------------+
To get started, clone the repository and build the project.
Clone the repository:
git clone https://github.com/Iktwo/Kodices.git
cd KodicesBuild the project: This command will build all the modules and make them ready for use.
./gradlew buildRun the SampleApp:
The easiest way to see Kodices in action is to run the SampleApp on your desktop.
./gradlew :SampleApp:runYou should see a window with the sample application, which demonstrates various features of the Kodices framework.
You can add Kodices to your own Kotlin Multiplatform project by adding the following dependencies to your build.gradle.kts file.
dependencies {
// Core parsing logic
implementation("com.iktwo:kodices:<latest_version>")
// Jetpack Compose UI rendering
implementation("com.iktwo:piktographs:<latest_version>")
}Please replace <latest_version> with the latest version from the releases page.
Here is a minimal example of how to parse a JSON string and render it with Piktographs:
import com.iktwo.kodices.KodicesParser
import com.iktwo.piktographs.PageUI
import androidx.compose.runtime.Composable
@Composable
fun MyScreen(jsonString: String) {
// 1. Initialize the parser
val kodicesParser = KodicesParser()
// 2. Parse the JSON string into a Content object
val content = kodicesParser.parseJSONToContent(jsonString)
// 3. Render the content using PageUI
if (content != null) {
PageUI(content)
}
}Kodices is a Server-Driven UI framework for Kotlin Multiplatform. It allows you to define your user interfaces using JSON, which can be fetched from a server at runtime. This enables you to update your app's UI without shipping a new version to the app store. A reference implementation and an example that use Compose multiplatform are provided, however you can integrate Kodices with Native UI or other UI frameworks.
This repository contains different modules to help you get started:
+--------------+ +--------------------+ +-----------------+
| | | | | |
| KodexServer |---->| Kodices |---->| Piktographs |
| (JSON source)| | (Core functonality)| | (Reference UI) |
| | | | | |
+--------------+ +--------------------+ +-----------------+
To get started, clone the repository and build the project.
Clone the repository:
git clone https://github.com/Iktwo/Kodices.git
cd KodicesBuild the project: This command will build all the modules and make them ready for use.
./gradlew buildRun the SampleApp:
The easiest way to see Kodices in action is to run the SampleApp on your desktop.
./gradlew :SampleApp:runYou should see a window with the sample application, which demonstrates various features of the Kodices framework.
You can add Kodices to your own Kotlin Multiplatform project by adding the following dependencies to your build.gradle.kts file.
dependencies {
// Core parsing logic
implementation("com.iktwo:kodices:<latest_version>")
// Jetpack Compose UI rendering
implementation("com.iktwo:piktographs:<latest_version>")
}Please replace <latest_version> with the latest version from the releases page.
Here is a minimal example of how to parse a JSON string and render it with Piktographs:
import com.iktwo.kodices.KodicesParser
import com.iktwo.piktographs.PageUI
import androidx.compose.runtime.Composable
@Composable
fun MyScreen(jsonString: String) {
// 1. Initialize the parser
val kodicesParser = KodicesParser()
// 2. Parse the JSON string into a Content object
val content = kodicesParser.parseJSONToContent(jsonString)
// 3. Render the content using PageUI
if (content != null) {
PageUI(content)
}
}