{"id":21242209,"url":"https://github.com/bitspittle/firebase-kotlin-bindings","last_synced_at":"2025-10-26T23:49:55.515Z","repository":{"id":132173756,"uuid":"587156273","full_name":"bitspittle/firebase-kotlin-bindings","owner":"bitspittle","description":"A set of Kotlin-idiomatic bindings allowing Kotlin/JS projects to use the Firebase web APIs","archived":false,"fork":false,"pushed_at":"2025-08-05T19:04:34.000Z","size":182,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T21:07:41.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bitspittle.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-10T04:52:04.000Z","updated_at":"2025-07-28T13:35:11.000Z","dependencies_parsed_at":"2025-06-20T21:48:01.752Z","dependency_job_id":null,"html_url":"https://github.com/bitspittle/firebase-kotlin-bindings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitspittle/firebase-kotlin-bindings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitspittle%2Ffirebase-kotlin-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitspittle%2Ffirebase-kotlin-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitspittle%2Ffirebase-kotlin-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitspittle%2Ffirebase-kotlin-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitspittle","download_url":"https://codeload.github.com/bitspittle/firebase-kotlin-bindings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitspittle%2Ffirebase-kotlin-bindings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281191587,"owners_count":26458805,"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-10-26T02:00:06.575Z","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":[],"created_at":"2024-11-21T00:58:42.937Z","updated_at":"2025-10-26T23:49:55.484Z","avatar_url":"https://github.com/bitspittle.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project is a collection of bindings for working with various Firebase services in Kotlin/JS.\n\n*\u003cspan style=\"color:red\"\u003eTHIS PROJECT IS STILL VERY EXPERIMENTAL AND NOT READY FOR PUBLIC USE.\u003c/span\u003e*\n\nThe goal of these bindings are to provide a clean, Kotlin-idiomatic view of Firebase web services:\n* JavaScript methods that return `Promise`s are converted to `suspend fun`s in Kotlin\n* Class design is updated for an API that is more object-oriented.\n* Some methods which take in / return JSON-objects in JavaScript are changed to typed objects in Kotlin.\n* Constructor (factory) methods are added when possible to make constructing JavaScript interfaces with optional\n  parameters easier.\n\n## Gradle\n\nAt the moment, this library is not published anywhere. To use it, clone this project, and then run\n\n```bash\n$ ./gradlew publishToMavenLocal\n```\n\nThen, in your own project:\n\n```kotlin\n// build.gradle.kts\n\nrepositories {\n  /* ... other repositories ... */\n  mavenLocal()\n}\n\nkotlin {\n  js(IR) { /* ... */ }\n  sourceSets {\n    val jsMain by getting {\n      dependencies {\n        // TODO: Replace with a real version when this library gets more mature\n        implementation(\"dev.bitspittle:firebase-kotlin-bindings:+\")\n      }\n    }\n  }\n}\n```\n\n## Background\n\nThis project contains bindings I need for using various Firebase services, wrapping API calls from\n[the web API](https://firebase.google.com/docs/reference/js) and porting them to Kotlin.\n\nHonestly, I probably should have used an existing solution (for example,\n[GitLiveApp/firebase-kotlin-sdk](https://github.com/GitLiveApp/firebase-kotlin-sdk)), but I wanted to see what it's like\nto wrap a JS API with a Kotlin one. This is, at the moment, a learning project.\n\n## Usage\n\nThis library provides a handcrafted Kotlin layer backed by external JS APIs that it delegates to.\n\nThese custom classes are provided instead of the underlying JS APIs as those are designed somewhat inconsistently and\noccasionally using features that don't map cleanly to Kotlin concepts.\n\nTo get started, initialize a `FirebaseApp` class, and use that to access the remaining APIs.\n\nSo for example, this JavaScript code (taken from\n[the tutorials](https://firebase.google.com/docs/database/web/read-and-write#basic_write)):\n\n```javascript\nimport { initializeApp } from \"firebase/app\";\nimport { getDatabase, ref, set } from \"firebase/database\";\n\nconst firebaseOptions = { /* ... */ };\nconst app = initializeApp(firebaseOptions)\n\nfunction writeUserData(userId, name, email, imageUrl) {\n  const db = getDatabase(app);\n  set(ref(db, 'users/' + userId), {\n    username: name,\n    email: email,\n    profile_picture : imageUrl\n  });\n}\n```\n\ntranslates to the following Kotlin code:\n\n```kotlin\nval app = FirebaseApp.initialize(FirebaseOptions(/*...*/))\n\nfun writeUserData(userId: String, name: String, email: String, imageUrl: String) {\n    val db = app.getDatabase()\n    db.ref(\"users/$userId\").set(json(\n        \"username\" to name,\n        \"email\" to email,\n        \"profile_picture\" to imageUrl\n    ))\n}\n```\n\n## API support\n\n- @firebase/analytics (\u003cspan style=\"color:yellow\"\u003elow\u003c/span\u003e)\n- @firebase/app (\u003cspan style=\"color:yellow\"\u003elow\u003c/span\u003e)\n- @firebase/app-check (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e) \n- @firebase/auth (\u003cspan style=\"color:yellow\"\u003elow\u003c/span\u003e)\n- @firebase/database (\u003cspan style=\"color:yellow\"\u003elow\u003c/span\u003e)\n- @firebase/firestore (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/functions (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/installations (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/messaging (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/performance (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/remote-config (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)\n- @firebase/storage (\u003cspan style=\"color:red\"\u003enone\u003c/span\u003e)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitspittle%2Ffirebase-kotlin-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitspittle%2Ffirebase-kotlin-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitspittle%2Ffirebase-kotlin-bindings/lists"}