{"id":20696396,"url":"https://github.com/jntakpe/mongo-reactor-adapter","last_synced_at":"2025-09-04T18:14:09.335Z","repository":{"id":37863095,"uuid":"304628892","full_name":"jntakpe/mongo-reactor-adapter","owner":"jntakpe","description":"MongoDB's Reactor adapter for ReactiveStreams driver","archived":false,"fork":false,"pushed_at":"2023-03-02T10:57:59.000Z","size":282,"stargazers_count":9,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T20:50:15.177Z","etag":null,"topics":["java","kotlin","mongodb","reactive-streams","reactor"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jntakpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-10-16T13:02:25.000Z","updated_at":"2023-06-02T05:56:47.000Z","dependencies_parsed_at":"2023-10-15T03:16:27.332Z","dependency_job_id":"275170d7-7542-47c2-8bff-72d8a66c6206","html_url":"https://github.com/jntakpe/mongo-reactor-adapter","commit_stats":{"total_commits":210,"total_committers":6,"mean_commits":35.0,"dds":0.5666666666666667,"last_synced_commit":"4f0430ab3e28ed90579a82ddcffdb334378ddbd0"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/jntakpe/mongo-reactor-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jntakpe%2Fmongo-reactor-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jntakpe%2Fmongo-reactor-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jntakpe%2Fmongo-reactor-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jntakpe%2Fmongo-reactor-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jntakpe","download_url":"https://codeload.github.com/jntakpe/mongo-reactor-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jntakpe%2Fmongo-reactor-adapter/sbom","scorecard":{"id":525276,"data":{"date":"2025-08-11","repo":{"name":"github.com/jntakpe/mongo-reactor-adapter","commit":"4f0430ab3e28ed90579a82ddcffdb334378ddbd0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jntakpe/mongo-reactor-adapter/publish.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T04:10:49.670Z","repository_id":37863095,"created_at":"2025-08-20T04:10:49.670Z","updated_at":"2025-08-20T04:10:49.670Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273650699,"owners_count":25143892,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","kotlin","mongodb","reactive-streams","reactor"],"created_at":"2024-11-17T00:13:50.335Z","updated_at":"2025-09-04T18:14:09.255Z","avatar_url":"https://github.com/jntakpe.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build](https://github.com/jntakpe/mongo-reactor-adapter/workflows/build/badge.svg) \n[![codecov](https://codecov.io/gh/jntakpe/mongo-reactor-adapter/branch/master/graph/badge.svg?token=5YCPKI2X1K)](https://codecov.io/gh/jntakpe/mongo-reactor-adapter) \n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jntakpe/mongo-reactor-adapter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jntakpe/mongo-reactor-adapter)\n![license](https://img.shields.io/github/license/jntakpe/mongo-reactor-adapter)\n\n# Java MongoDB's Reactor adapter\n\nSimple yet effective [Reactor](https://projectreactor.io) adapter for MongoDB's \n[reactivestreams driver](http://mongodb.github.io/mongo-java-driver/), written in Kotlin, works perfectly for both Java and Kotlin.\n\n## Installation\n\n### Requirements\n\n* Java 1.8 or later\n\n### Gradle users\n\nAdd this dependency to your project's build file :\n\n###### Groovy script\n\n````groovy\nimplementation \"com.github.jntakpe:mongo-reactor-adapter:0.3.2\"\n````\n\n###### Kotlin script\n\n```kotlin\nimplementation(\"com.github.jntakpe:mongo-reactor-adapter:0.3.2\")\n```\n\n### Maven users\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.jntakpe\u003c/groupId\u003e\n    \u003cartifactId\u003emongo-reactor-adapter\u003c/artifactId\u003e\n    \u003cversion\u003e0.3.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nWrappers are provided for main Reactive Streams MongoDB driver class including \n[MongoClient](driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/MongoClient.java),\n[MongoCollection](https://github.com/mongodb/mongo-java-driver/blob/master/driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/MongoCollection.java) \nand [MongoDatabase](https://github.com/mongodb/mongo-java-driver/blob/master/driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/MongoDatabase.java).\nReturn types are wrapped using Reactor's [Mono](https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html), \n[Flux](https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html) or compatible subtypes like \n[AggregateFlux](library/src/main/kotlin/com/mongodb/reactor/client/AggregateFlux.kt).\n\n### Java example\n\n```java\npublic class SampleService {\n\n    private final ReactorMongoClient reactorClient;\n\n    private final ReactorMongoDatabase reactorDb;\n\n    private final ReactorMongoCollection\u003cUser\u003e reactorCollection;\n\n    public SampleService(MongoClient reactiveStreamsClient) {\n        reactorClient = MongoReactorKt.toReactor(reactiveStreamsClient);\n        reactorDb = reactorClient.getDatabase(\"test\");\n        // or reactorDb = MongoReactorKt.toReactor(reactiveStreamsClient.getDatabase(\"test\"));\n        reactorCollection = reactorDb.getCollection(\"users\", User.class);\n        // or reactorCollection = MongoReactorKt.toReactor(reactiveStreamsClient.getDatabase(\"test\").getCollection(\"users\", User.class));\n    }\n\n    public Flux\u003cString\u003e listDatabasesNames() {\n        return reactorClient.listDatabaseNames();\n    }\n\n    public Flux\u003cString\u003e listCollections() {\n        return reactorDb.listCollectionNames();\n    }\n\n    public Flux\u003cUser\u003e findAll() {\n        return reactorCollection.find();\n    }\n\n    public Mono\u003cUser\u003e create(User user) {\n        return reactorCollection.insertOne(user).thenReturn(user);\n    }\n}\n```\n\n### Kotlin example\n\n```kotlin\nclass SampleService(reactiveStreamsClient: MongoClient) {\n\n    private val reactorClient: ReactorMongoClient = reactiveStreamsClient.toReactor()\n    private val reactorDb: ReactorMongoDatabase = reactorClient.getDatabase(\"test\")\n    // or private val reactorDb = reactiveStreamsClient.getDatabase(\"test\").toReactor()\n    private val reactorCollection: ReactorMongoCollection\u003cUser\u003e = reactorDb.getCollection(\"users\", User::class.java)\n    // or private val reactorCollection = reactiveStreamsClient.getDatabase(\"test\").getCollection(\"users\", User::class.java).toReactor()\n\n    fun listDatabasesNames(): Flux\u003cString\u003e = reactorClient.listDatabaseNames()\n    \n    fun listCollections(): Flux\u003cString\u003e = reactorDb.listCollectionNames()\n    \n    fun findAll(): FindFlux\u003cUser\u003e = reactorCollection.find()\n    \n    fun create(user: User): Mono\u003cUser\u003e = reactorCollection.insertOne(user).thenReturn(user)\n}\n```\n\nBoth Spring Boot and Micronaut samples written using Java and Kotlin are available in the [samples](samples) directory.\n\n## Why MongoDB reactor adapter\n\nMongoDB Reactive Streams Java driver API is a great way to leverage MongoDB's asynchronous capabilities. Nevertheless, the scope of \nReactive Streams is to find a minimal set of interfaces, methods and protocols that will describe the necessary operations \nand entities to achieve the goal—asynchronous streams of data with non-blocking back pressure.\nEnd-user DSLs or protocol binding APIs have purposefully been left out of the reactivestream's scope to encourage and enable different implementations \nthat potentially use different programming languages to stay as true as possible to the idioms of their platform.\nHowever, Reactor offers composable asynchronous sequence APIs - Flux (for [N] elements) and Mono (for [0|1] elements) - \nand extensively implements the Reactive Streams specification providing an efficient way for end user to create reactive system.\n\nMongoDB's reactor adapter combines both MongoDB Reactive Streams Java driver API's together with Reactor to offer the best of two worlds.\nNo more wrapping required, you can directly leverage Reactor's operators power when querying your Mongo database.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjntakpe%2Fmongo-reactor-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjntakpe%2Fmongo-reactor-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjntakpe%2Fmongo-reactor-adapter/lists"}