DBFlow is a Kotlin Multiplatform ORM library that generates database adapters and a typed query DSL from annotated table and database definitions.
The library addresses the problem of writing repetitive database boilerplate by using compile-time code generation. Developers annotate their table and database classes, and a compiler plugin generates type-safe adapters, column properties, and database helpers. The runtime provides a query DSL for constructing database operations, along with transaction support and Flow observers for reactive database access. Coroutines are built into the core runtime library rather than offered as a separate artifact.
DBFlow targets Android, JVM, iOS, and macOS through Kotlin Multiplatform. It suits projects that want to avoid manual database layer code and benefit from compile-time type safety. The library includes optional Android-specific modules for LiveData, Paging, and reactive streams integration, plus SQLCipher support for encrypted databases. Projects using version catalogs can set up the compiler plugin and generated-sources directory with minimal configuration, though the plugin currently requires a composite build until it reaches Maven Central.
The project maintains active documentation with a published GitBook guide and usage examples in the repository. The maintainer accepts contributions that match existing Kotlin style and remain scoped to specific issues, with pull requests directed to the master branch.