{"id":13658405,"url":"https://github.com/jeffdgr8/kotbase","last_synced_at":"2025-10-09T21:56:18.002Z","repository":{"id":196710879,"uuid":"518984559","full_name":"jeffdgr8/kotbase","owner":"jeffdgr8","description":"Kotlin Multiplatform library for Couchbase Lite—a lightweight, embedded, syncable, NoSQL database","archived":false,"fork":false,"pushed_at":"2024-11-02T04:11:02.000Z","size":423598,"stargazers_count":67,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-02T05:17:41.965Z","etag":null,"topics":["couchbase","couchbase-lite","database","kotlin","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-native","mobile","nosql","nosql-database","sync"],"latest_commit_sha":null,"homepage":"https://kotbase.dev","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffdgr8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-28T20:23:20.000Z","updated_at":"2024-10-28T21:04:51.000Z","dependencies_parsed_at":"2023-10-14T19:03:24.448Z","dependency_job_id":"0f39217f-2f04-4ffc-9af0-5f183db9ebf4","html_url":"https://github.com/jeffdgr8/kotbase","commit_stats":null,"previous_names":["jeffdgr8/kotbase"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffdgr8%2Fkotbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffdgr8%2Fkotbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffdgr8%2Fkotbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffdgr8%2Fkotbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffdgr8","download_url":"https://codeload.github.com/jeffdgr8/kotbase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952507,"owners_count":17230899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["couchbase","couchbase-lite","database","kotlin","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-native","mobile","nosql","nosql-database","sync"],"created_at":"2024-08-02T05:00:59.342Z","updated_at":"2025-10-09T21:56:17.982Z","avatar_url":"https://github.com/jeffdgr8.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":["📦 Storage"],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/dev.kotbase/couchbase-lite)](\nhttps://central.sonatype.com/namespace/dev.kotbase)\n[![Kotlin](https://img.shields.io/badge/kotlin-2.2.10-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![GitHub License](https://img.shields.io/github/license/jeffdgr8/kotbase)](LICENSE)\n[![Couchbase Community](https://img.shields.io/badge/couchbase-community-ea2328?logo=couchbase\u0026logoColor=ea2328)](\nhttps://www.couchbase.com/developers/community/)\n[![Slack Channel](https://img.shields.io/badge/chat-%23couchbase-4a154b.svg?logo=slack)](\nhttps://kotlinlang.slack.com/messages/couchbase/)\n\n# Kotbase\n\n**Kot**lin Multiplatform library for Couch**base** Lite\n\n## Introduction\n\nKotbase pairs [Kotlin Multiplatform](https://www.jetbrains.com/kotlin-multiplatform/) with [Couchbase Lite](\nhttps://www.couchbase.com/products/lite/), an embedded NoSQL JSON document database. Couchbase Lite can be used as a\nstandalone client database, or paired with [Couchbase Server](https://www.couchbase.com/products/server/) and [Sync\nGateway](https://www.couchbase.com/products/sync-gateway/) or [Capella App Services](\nhttps://www.couchbase.com/products/capella/app-services/) for cloud to edge data synchronization. Features include:\n\n* [SQL++](https://www.couchbase.com/products/n1ql/), key/value, and full-text search queries\n* Observable queries, documents, databases, and replicators\n* Binary document attachments (blobs)\n* Peer-to-peer and cloud-to-edge data sync\n\nKotbase provides full Enterprise and Community Edition API support for Android and JVM ([via Java SDK](\nhttps://github.com/couchbase/couchbase-lite-java-ce-root)), native iOS and macOS ([via Objective-C SDK](\nhttps://github.com/couchbase/couchbase-lite-ios)), and experimental support for available APIs in native Linux and\nWindows ([via C SDK](https://github.com/couchbase/couchbase-lite-C)).\n\n## Installation\n\nAdd either the Community or Enterprise Edition dependency in the **commonMain** source set dependencies of your\nshared module's **build.gradle.kts**:\n\n```kotlin\nkotlin {\n    sourceSets {\n        commonMain.dependencies {\n            // Community Edition\n            implementation(\"dev.kotbase:couchbase-lite:3.1.11-1.1.2\")\n            // or Enterprise Edition\n            implementation(\"dev.kotbase:couchbase-lite-ee:3.1.11-1.1.2\")\n        }\n    }\n}\n```\n\n\u003e **Note**\n\u003e The Couchbase Lite Community Edition is free and open source. The Enterprise Edition is free for development and\n\u003e testing, but requires a [license from Couchbase](https://www.couchbase.com/pricing/#couchbase-mobile) for production\n\u003e use. [See Community vs Enterprise Edition.](https://www.couchbase.com/products/editions/mobile/)\n\nKotbase is published to Maven Central. The Couchbase Lite Enterprise Edition dependency additionally requires the\nCouchbase Maven repository.\n\n```kotlin\nrepositories {\n    mavenCentral()\n    maven(\"https://mobile.maven.couchbase.com/maven2/dev/\")\n}\n```\n\n### Native Platforms\n\nNative platform targets should additionally link to the Couchbase Lite dependency native binary. See [Supported\nPlatforms](https://kotbase.dev/current/platforms/) for more details.\n\n### Linux\n\nTargeting JVM running on Linux or native Linux, both require a specific version of the libicu dependency. (You will see\nan error such as `libLiteCore.so: libicuuc.so.71: cannot open shared object file: No such file or directory` indicating\nthe expected version.) If the required version isn't available from your distribution's package manager, you can\ndownload it from [GitHub](https://github.com/unicode-org/icu/releases).\n\n## Documentation\n\nKotbase documentation can be found at [kotbase.dev](https://kotbase.dev/), including [getting started examples](\nhttps://kotbase.dev/current/getting-started/), [usage guide](https://kotbase.dev/current/databases/), and [API reference](\nhttps://kotbase.dev/api/).\n\n## Differences from Java SDK\n\nKotbase's API aligns with the Couchbase Lite [Java](\nhttps://docs.couchbase.com/couchbase-lite/current/java/quickstart.html) and [Android KTX](\nhttps://docs.couchbase.com/couchbase-lite/current/android/quickstart.html) SDKs. Migrating existing Kotlin code can be\nas straightforward as changing the import package from `com.couchbase.lite` to `kotbase`, with some exceptions:\n\n* Java callback functional interfaces are implemented as Kotlin function types.\n* `File`, `URL`, and `URI` APIs are represented as strings.\n* `Date` APIs use [kotlinx-datetime's `Instant`](\nhttps://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/kotlinx.datetime/-instant/).\n* `InputStream` APIs use [kotlinx-io's `Source`](\n  https://kotlinlang.org/api/kotlinx-io/kotlinx-io-core/kotlinx.io/-source/).\n* `Executor` APIs use Kotlin's `CoroutineContext`.\n* Certificate APIs are available as raw `ByteArray`s or in platform-specific code.\n* There's no need to explicitly call `CouchbaseLite.init()`. Initialization functions can still be called with custom\n  parameters in JVM and Android platform code.\n* Efforts have been made to detect and throw Kotlin exceptions for common error conditions, but `NSError` may still leak\n  through on Apple platforms. [Please report](https://github.com/jeffdgr8/kotbase/issues/new) any occurrences that may\n  deserve addressing.\n* Some deprecated APIs are omitted.\n* While not available in the Java SDK, as Java doesn't support operator overloading, [`Fragment` subscript APIs](\n  https://kotbase.dev/current/kotlin-extensions/#fragment-subscripts) are available in Kotbase, similar to [Swift](\n  https://docs.couchbase.com/mobile/3.1.10/couchbase-lite-swift/Classes/Fragment.html), [Objective-C](\n  https://docs.couchbase.com/mobile/3.1.10/couchbase-lite-objc/Protocols/CBLFragment.html), and [.NET](\n  https://docs.couchbase.com/mobile/3.1.10/couchbase-lite-net/api/Couchbase.Lite.IFragment.html).\n\n## Extension Libraries\n\nKotbase includes some convenient extensions on top of Couchbase Lite's official API as additional library artifacts.\n\n### Kotbase KTX\n\nThe [KTX extensions](couchbase-lite-ktx/README.md) include the excellent [Kotlin extensions by MOLO17](https://github.com/MOLO17/couchbase-lite-kotlin),\nas well as other convenience functions for composing queries, observing change `Flow`s, and creating indexes.\n\n#### Installation\n\n```kotlin\n// Community Edition\nimplementation(\"dev.kotbase:couchbase-lite-ktx:3.1.11-1.1.2\")\n// or Enterprise Edition\nimplementation(\"dev.kotbase:couchbase-lite-ee-ktx:3.1.11-1.1.2\")\n```\n\n### Kotbase Kermit\n\n[Kotbase Kermit](couchbase-lite-kermit/README.md) is a Couchbase Lite custom logger which logs to [Kermit](\nhttps://kermit.touchlab.co/). Kermit can direct its logs to any number of log outputs, including the console.\n\n#### Installation\n\n```kotlin\n// Community Edition\nimplementation(\"dev.kotbase:couchbase-lite-kermit:3.1.11-1.1.2\")\n// or Enterprise Edition\nimplementation(\"dev.kotbase:couchbase-lite-ee-kermit:3.1.11-1.1.2\")\n```\n\n### Kotbase Paging\n\nThe [paging extensions](couchbase-lite-paging/README.md) are built on Google's [AndroidX Paging](\nhttps://developer.android.com/topic/libraries/architecture/paging/v3-overview). Kotbase Paging provides a\n[`PagingSource`](https://developer.android.com/reference/kotlin/androidx/paging/PagingSource) which performs\nlimit/offset paging queries based on a user-supplied database query.\n\n#### Installation\n\n```kotlin\n// Community Edition\nimplementation(\"dev.kotbase:couchbase-lite-paging:3.1.11-1.1.2\")\n// or Enterprise Edition\nimplementation(\"dev.kotbase:couchbase-lite-ee-paging:3.1.11-1.1.2\")\n```\n\n## Roadmap\n\n* [x] Documentation website ([kotbase.dev](https://kotbase.dev/))\n* [x] `NSInputStream` interoperability ~~(Okio [#1123](https://github.com/square/okio/pull/1123))~~ (kotlinx-io [#174](\n  https://github.com/Kotlin/kotlinx-io/pull/174))\n* [x] Linux ARM64 support\n* [x] Public release\n* [ ] Sample apps\n    * [x] [Getting Started](examples/getting-started)\n    * [x] [Getting Started Compose Multiplatform](examples/getting-started-compose)\n    * [x] [Kotbase Notes](examples/kotbase-notes)\n    * [ ] SwiftUI for Kotbase Notes\n* [x] Couchbase Lite [3.1 API](https://docs.couchbase.com/couchbase-lite/3.1/cbl-whatsnew.html) - Scopes and Collections\n* [x] Versioned docs\n* [ ] Couchbase Lite [3.2 API](https://docs.couchbase.com/couchbase-lite/3.2/cbl-whatsnew.html) - [Vector Search](\n  https://www.couchbase.com/products/vector-search/)\n* [ ] Improve Swift API alignment with Couchbase Lite using [Swift\n  export](https://youtrack.jetbrains.com/issue/KT-64572), `@ObjCName`, and/or `@ShouldRefineInSwift`\n* [ ] Async coroutines API\n\n## Development\n\n* When building the project on Linux, be sure to install the libicu dependency.\n* When checking out the git repo on Windows, enable [developer mode](\n  https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) and symbolic links in\n  git with `git config --global core.symlinks true`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffdgr8%2Fkotbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffdgr8%2Fkotbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffdgr8%2Fkotbase/lists"}