{"id":13552296,"url":"https://github.com/pulyaevskiy/firebase-admin-interop","last_synced_at":"2025-09-08T18:31:03.743Z","repository":{"id":45921640,"uuid":"96622198","full_name":"pulyaevskiy/firebase-admin-interop","owner":"pulyaevskiy","description":"Firebase Admin Interop Library for Dart","archived":false,"fork":false,"pushed_at":"2024-06-16T09:09:30.000Z","size":308,"stargazers_count":78,"open_issues_count":23,"forks_count":39,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-09T04:34:19.220Z","etag":null,"topics":["dart","dartlang","firebase","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulyaevskiy.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-08T13:57:09.000Z","updated_at":"2024-11-27T04:16:20.000Z","dependencies_parsed_at":"2024-01-19T07:00:02.450Z","dependency_job_id":"4b1cd69a-0c73-4643-8126-aafb104cdb42","html_url":"https://github.com/pulyaevskiy/firebase-admin-interop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pulyaevskiy/firebase-admin-interop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Ffirebase-admin-interop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Ffirebase-admin-interop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Ffirebase-admin-interop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Ffirebase-admin-interop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulyaevskiy","download_url":"https://codeload.github.com/pulyaevskiy/firebase-admin-interop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Ffirebase-admin-interop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229367,"owners_count":25245187,"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-08T02:00:09.813Z","response_time":121,"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":["dart","dartlang","firebase","nodejs"],"created_at":"2024-08-01T12:02:01.878Z","updated_at":"2025-09-08T18:31:03.386Z","avatar_url":"https://github.com/pulyaevskiy.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/pulyaevskiy/firebase-admin-interop.svg?branch=master)](https://travis-ci.org/pulyaevskiy/firebase-admin-interop)\n\nWrite server-side Firebase applications in Dart using Node.js as a runtime.\n\n\u003e ### Firestore Timestamps migration:\n\u003e Firestore deprecated usage of DateTime objects in favor of custom Timestamp type and recommends\n\u003e migrating as soon as possible.\n\u003e By default all timestamps are still returned as DateTime objects and you can access them with\n\u003e `DocumentData.getDateTime` or `DocumentData.setDateTime`.\n\u003e To start using Timestamps you must configure Firestore as follows:\n\u003e\n\u003e ```dart\n\u003e final app = FirebaseAdmin.instance.initializeApp();\n\u003e final firestore = app.firestore();\n\u003e // Call Firestore.settings at the very beginning before any other calls:\n\u003e firestore.settings(FirestoreSettings(timestampsInSnapshots: true));\n\u003e // You can read and write data now, but make sure to use new `setTimestamp` and `getTimestamp`\n\u003e // methods of `DocumentData`.\n\u003e ```\n\n## Installation\n\n1. Add this package as a dependency to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  firebase_admin_interop: [latest_version]\n```\n\nRun `pub get`.\n\n2. Create `package.json` file to install Node.js modules used by this library:\n\n```json\n{\n  \"dependencies\": {\n    \"firebase-admin\": \"8.5.0\",\n    \"@google-cloud/firestore\": \"2.0.0\"\n  }\n}\n```\n\nRun `npm install`.\n\n## Usage\n\nBelow is a simple example of using Realtime Database client:\n\n```dart\nimport 'dart:async';\nimport 'package:firebase_admin_interop/firebase_admin_interop.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final serviceAccountKeyFilename = '/absolute/path/to/service-account.json';\n  final admin = FirebaseAdmin.instance;\n  final cert = admin.certFromPath(serviceAccountKeyFilename);\n  final app = admin.initializeApp(new AppOptions(\n    credential: cert,\n    databaseURL: \"YOUR_DB_URL\",\n  ));\n  final ref = app.database().ref('/test-path');\n  // Write value to the database at \"/test-path\" location.\n  await ref.setValue(\"Hello world\");\n  // Read value from the same database location.\n  var snapshot = await ref.once(\"value\");\n  print(snapshot.val()); // prints \"Hello world\".\n}\n\n```\n\nNote that it is only possible to use JSON-compatible values when reading\nand writing data to the Realtime Database. This includes all primitive\ntypes (`int`, `double`, `bool`), string values (`String`) as well as\nany `List` or `Map` instance.\n\n\u003e For Firestore there are a few more supported data types, like `DateTime`\n\u003e and `GeoPoint`.\n\n## Building\n\nThis library depends on [node_interop][] package which provides Node.js\nbindings and [build_node_compilers][] package which allows compiling\nDart applications as Node.js modules.\n\n[node_interop]: https://pub.dartlang.org/packages/node_interop\n[build_node_compilers]: https://pub.dartlang.org/packages/build_node_compilers\n\nTo enable builders provided by [build_node_compilers][] first add following\ndev dependencies to your `pubspec.yaml`:\n\n```yaml\ndev_dependencies:\n  build_runner: ^1.0.0\n  build_node_compilers: ^0.2.0\n```\n\nNext, create `build.yaml` file with following contents:\n\n```yaml\ntargets:\n  $default:\n    sources:\n      - \"lib/**\"\n      - \"node/**\" # Assuming your main Dart files is in node/ folder (recommended).\n      - \"test/**\"\n    builders:\n      build_node_compilers|entrypoint:\n        options:\n          compiler: dart2js # To compile with dart2js by default\n```\n\nYou can now build your project using `build_runner`:\n\n```bash\n# By default compiles with DDC\npub run build_runner build --output=build\n\n# To compile with dart2js:\npub run build_runner build \\\n  --define=\"build_node_compilers|entrypoint=compiler=dart2js\" \\\n  --define=\"build_node_compilers|entrypoint=dart2js_args=[\\\"--minify\\\"]\" \\ # optional, minifies resulting code\n  --output=build/\n```\n\n## Status\n\nThis library is considered stable though not feature complete. It is recommended to check\ndev versions for latest updates and bug fixes.\n\nMake sure to checkout [CHANGELOG.md](https://github.com/pulyaevskiy/firebase-admin-interop/blob/master/CHANGELOG.md)\nafter every release, all notable changes and upgrade instructions will\nbe described there.\n\nCurrent implementation coverage report:\n\n- [x] admin\n- [x] admin.auth\n- [x] admin.app\n- [x] admin.credential\n- [x] admin.database\n- [x] admin.firestore\n- [x] admin.messaging\n- [ ] admin.storage\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/pulyaevskiy/firebase-admin-interop/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulyaevskiy%2Ffirebase-admin-interop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulyaevskiy%2Ffirebase-admin-interop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulyaevskiy%2Ffirebase-admin-interop/lists"}