{"id":13565674,"url":"https://github.com/orbitdb-archive/orbit-db-eventstore","last_synced_at":"2025-04-03T23:30:29.818Z","repository":{"id":8398949,"uuid":"58256945","full_name":"orbitdb-archive/orbit-db-eventstore","owner":"orbitdb-archive","description":"Append-Only Log database for orbit-db","archived":true,"fork":false,"pushed_at":"2023-01-18T23:10:15.000Z","size":949,"stargazers_count":30,"open_issues_count":2,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-04T19:42:03.990Z","etag":null,"topics":["eventstore","log-database","orbit-db","orbitdb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/orbitdb-archive.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-07T08:27:18.000Z","updated_at":"2024-02-01T06:54:41.000Z","dependencies_parsed_at":"2023-02-10T18:46:15.665Z","dependency_job_id":null,"html_url":"https://github.com/orbitdb-archive/orbit-db-eventstore","commit_stats":null,"previous_names":["orbitdb-archive/orbit-db-eventstore","orbitdb/orbit-db-eventstore"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb-archive%2Forbit-db-eventstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb-archive%2Forbit-db-eventstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb-archive%2Forbit-db-eventstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitdb-archive%2Forbit-db-eventstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitdb-archive","download_url":"https://codeload.github.com/orbitdb-archive/orbit-db-eventstore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097557,"owners_count":20883121,"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":["eventstore","log-database","orbit-db","orbitdb"],"created_at":"2024-08-01T13:01:52.735Z","updated_at":"2025-04-03T23:30:29.293Z","avatar_url":"https://github.com/orbitdb-archive.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# orbit-db-eventstore\n\n[![npm version](https://badge.fury.io/js/orbit-db-eventstore.svg)](https://badge.fury.io/js/orbit-db-eventstore)\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) \n\n\u003e Append-Only Log database for orbit-db\n\nAn append-only log with traversable history. Useful for *\"latest N\"* use cases or as a message queue.\n\nUsed in [orbit-db](https://github.com/haadcode/orbit-db).\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Install\n\nThis project uses [npm](https://npmjs.com) and [nodejs](https://nodejs.org)\n\n```sh\nnpm install orbit-db ipfs\n```\n\n## Usage\n\nFirst, create an instance of OrbitDB:\n\n```javascript\nimport * as IPFS from 'ipfs'\nimport OrbitDB from 'orbit-db'\n\nconst ipfs = new IPFS()\nconst orbitdb = await OrbitDB.createInstance(ipfs)\n```\n\nGet a log database and add an entry to it:\n\n```javascript\nconst log = await orbitdb.eventlog('haad.posts')\nlog.add({ name: 'hello world' })\n  .then(() =\u003e {\n    const items = log.iterator().collect().map(e =\u003e e.payload.value)\n    items.forEach(e =\u003e console.log(e.name))\n    // \"hello world\"\n  })\n```\n\nLater, when the database contains data, load the history and query when ready:\n\n```javascript\nconst log = await orbitdb.eventlog('haad.posts')\nlog.events.on('ready', () =\u003e {\n  const items = log.iterator().collect().map(e =\u003e e.payload.value)\n  items.forEach(e =\u003e console.log(e.name))\n  // \"hello world\"\n})\n```\n\nSee [example/index.html](https://github.com/haadcode/orbit-db-eventstore/blob/master/example/index.html) for a detailed example. Note that to run this example, you need to have a local [IPFS daemon](https://dist.ipfs.io/go-ipfs/floodsub-2) [running](https://ipfs.io/docs/getting-started/) at port 5001.\n\n## API\n\nSee [orbit-db's API Documenations](https://github.com/haadcode/orbit-db/blob/master/API.md#eventlogname) for full details.\n\n## Contributing\n\nIf you think this could be better, please [open an issue](https://github.com/orbitdb/orbit-db-eventstore/issues/new)!\n\nPlease note that all interactions in @orbitdb fall under our [Code of Conduct](CODE_OF_CONDUCT.md).\n\nNote that tests for this module are in the [`orbit-db`](https://github.com/orbitdb/orbit-db) repository.\n\n## License\n\n[MIT](LICENSE) © 2016-2020 Protocol Labs Inc., Haja Networks Oy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitdb-archive%2Forbit-db-eventstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitdb-archive%2Forbit-db-eventstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitdb-archive%2Forbit-db-eventstore/lists"}