Kodein Open Source Initiative documentation

The Kodein Open Source Initiative is a suite of libraries that aims to help you to develop Kotlin Multiplatform (mobile) applications.

The Kodein Open Source Initiative:

  • provides high level tools that enhance your Kotlin/Multiplatform experience

  • help you maximize your Kotlin common code, with almost everything but the UI

  • and keeps your focus on your business code.

Libraries

The Kodein Open Source Initiative libraries provide:

  • the ability to manage your code and isolate your tests easily, with the dependency injection pattern.

  • a quick and easy way to persist data model in a performant NoSQL database, for each mobile platforms.

Each library can be used independently of each other.

Kodein-DI: Dependency Injection

Kodein-DI is a very useful dependency injection / retrieval container, it is very easy to use and configure.

Kodein-DI allows you to:
  • Lazily instantiate your dependencies when needed.

  • Stop caring about dependency initialization order.

  • Easily bind classes or interfaces to their instance, provider or factory.

  • Easily debug your dependency bindings and recursions.

Kodein-DI is a good choice because:
  • It is small, fast and optimized (makes extensive use of inline).

  • It proposes a very simple and readable declarative DSL.

  • It is not subject to type erasure (like Java).

  • It integrates nicely with Android.

  • It proposes a very kotlin-esque idiomatic API.

  • It (also) can be used in plain Java.

Canard: Logging

Canard is a lightweight logging library with a simple API.

Canard allows you to:
  • Easily set up logging in a Kotlin Multiplatform project.

  • Log what you need on different levels.

  • Avoid worrying about platform-specific frontend implementations.

Canard is a good choice because:
  • It integrates nicely with all Kotlin/Multiplatform targets.

  • It has a straightforward design with a user-friendly and comprehensible API.

MocKMP: Mocking for tests

MocKMP is a Kotlin Symbol Processor that generates Mocks & Fakes for your test classes.

MocKMP allows you to:
  • Generate interface mocks & configure their behaviour.

  • Instantiate data classes with fake data.

  • Verify calls in order and exhaustively.

MocKMP is a good choice because:
  • It mimics, as much as possible, the API of other JVM-only mocking frameworks.

  • It offers a clean and easy-to-understand API

Support

If you need any help do not hesitate to through questions or issues:

Contribute

Contributions are very welcome and greatly appreciated! The great majority of pull requests are eventually merged.

To contribute, simply fork any of our projects on Github, fix whatever is iching you, and submit a pull request!

We are sure that there is still room for improvement, either in code or documentation.