{"id":23483373,"url":"https://github.com/kikuchy/sumibi","last_synced_at":"2026-05-10T19:28:59.405Z","repository":{"id":62458305,"uuid":"264435872","full_name":"kikuchy/sumibi","owner":"kikuchy","description":"Simple hookable Firestore library 🔥","archived":false,"fork":false,"pushed_at":"2020-05-16T13:25:21.000Z","size":107,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T00:12:02.573Z","etag":null,"topics":["dart","firebase","firestore","flutter"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/sumibi","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kikuchy.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}},"created_at":"2020-05-16T12:48:28.000Z","updated_at":"2020-09-08T06:02:54.000Z","dependencies_parsed_at":"2022-11-02T00:16:16.071Z","dependency_job_id":null,"html_url":"https://github.com/kikuchy/sumibi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchy%2Fsumibi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchy%2Fsumibi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchy%2Fsumibi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchy%2Fsumibi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kikuchy","download_url":"https://codeload.github.com/kikuchy/sumibi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799954,"owners_count":21163404,"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":["dart","firebase","firestore","flutter"],"created_at":"2024-12-24T21:11:51.247Z","updated_at":"2026-05-10T19:28:59.362Z","avatar_url":"https://github.com/kikuchy.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sumibi\n\n![sumibi_logo](./art/logo.jpg)\n\n**Sumibi** is thin [could_firestore](https://pub.dev/packages/cloud_firestore) wrapper.\n\nSumibi can inject your own hooks on calling of `setData`/`set` and `updateData`/`update`.\n\n## Usage\n\n```dart\nfinal sumibi = SumibiFirestore(\n  Firestore.instance,\n  onSetDataHook: (String documentPath, Map\u003cString, dynamic\u003e data) {\n    data[\"createdAt\"] = FieldValue.serverTimestamp();\n    data[\"updatedAt\"] = FieldValue.serverTimestamp();\n  },\n  onUpdateDataHook: (String documentPath, Map\u003cString, dynamic\u003e data) {\n    data[\"updatedAt\"] = FieldValue.serverTimestamp();\n  },\n);\n\n\n// Now `user` have properties `name`, `createdAt` and `updatedAt`.\nfinal user = await sumibi.collection(\"/users\").add({\"name\": \"John\"});\n\n// Now `user.name` will be \"May\" and `user.updatedAt` will be updated. \nawait user.updateData({\"name\": \"May\"});\n\n\n\nfinal friends = user.collection(\"/friends\");\nawait sumibi.batch()\n  // Also `createdAt` and `updatedAt` will be created.\n  ..setData(friends.document(\"/a\"), {\"name\": \"Alex\"})\n  ..setData(friends.document(\"/b\"), {\"name\": \"Bob\"})\n  // `user.updatedAt` will be updated.\n  ..updateData(user, {\"numOfFriends\": 2})\n  ..commit();\n\n\n\nsumibi.runTransaction((transaction) {\n  // After this transaction, `user.updatedAt` will be updated.\n  transaction.update(user, {\"likeCount\": FieldValue.increment(1)});\n});\n```\n\n`SumibiFirestore` implements [`Firestore`](https://pub.dev/documentation/cloud_firestore/latest/cloud_firestore/Firestore-class.html)\nclass of [could_firestore](https://pub.dev/packages/cloud_firestore).\nSo you can use the instance of `SumibiFirestore` as `Firestore`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuchy%2Fsumibi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikuchy%2Fsumibi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuchy%2Fsumibi/lists"}