[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10414":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":18,"lastSyncTime":37,"discoverSource":38},10414,"orbitdb","orbitdb\u002Forbitdb","Peer-to-Peer Databases for the Decentralized Web","",null,"JavaScript",8792,597,152,14,0,5,20,2,39.33,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33],"crdt","database","decentralized","distributed","ipfs","libp2p","merkle-crdt","p2p","peer-to-peer","2026-06-12 02:02:21","# OrbitDB\n\n\u003Cp align=\"left\">\n  \u003Cimg src=\"images\u002Forbit_db_logo_color.png\" width=\"256\" \u002F>\n\u003C\u002Fp>\n\n[![Matrix](https:\u002F\u002Fimg.shields.io\u002Fmatrix\u002Forbit-db%3Amatrix.org)](https:\u002F\u002Fapp.element.io\u002F#\u002Froom\u002F#orbit-db:matrix.org) [![npm (scoped)](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F%40orbitdb\u002Fcore)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@orbitdb\u002Fcore) [![node-current (scoped)](https:\u002F\u002Fimg.shields.io\u002Fnode\u002Fv\u002F%40orbitdb\u002Fcore)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@orbitdb\u002Fcore)\n\nOrbitDB is a **serverless, distributed, peer-to-peer database**. OrbitDB uses [IPFS](https:\u002F\u002Fipfs.tech) as its data storage and [Libp2p Pubsub](https:\u002F\u002Fdocs.libp2p.io\u002Fconcepts\u002Fpubsub\u002Foverview\u002F) to automatically sync databases with peers. It's an eventually consistent database that uses [Merkle-CRDTs](https:\u002F\u002Farxiv.org\u002Fabs\u002F2004.00107) for conflict-free database writes and merges making OrbitDB an excellent choice for p2p and decentralized apps, blockchain applications and [local-first](https:\u002F\u002Fwww.inkandswitch.com\u002Flocal-first\u002F) web applications.\n\nOrbitDB provides various types of databases for different data models and use cases:\n\n- **[events](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmaster\u002FAPI.md#orbitdblognameaddress)**: an immutable (append-only) log with traversable history. Useful for *\"latest N\"* use cases or as a message queue.\n- **[documents](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmaster\u002FAPI.md#orbitdbdocsnameaddress-options)**: a document database to which JSON documents can be stored and indexed by a specified key. Useful for building search indices or version controlling documents and data.\n- **[keyvalue](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmaster\u002FAPI.md#orbitdbkeyvaluenameaddress)**: a key-value database just like your favourite key-value database.\n- **[keyvalue-indexed](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmaster\u002FAPI.md#orbitdbkeyvaluenameaddress)**: key-value data indexed in a Level key-value database.\n\nAll databases are [implemented](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Ftree\u002Fmain\u002Fsrc\u002Fdatabases\u002F) on top of OrbitDB's [OpLog](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Ftree\u002Fmain\u002Fsrc\u002Foplog\u002F), an immutable, cryptographically verifiable, operation-based conflict-free replicated data structure ([CRDT](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FConflict-free_replicated_data_type)) for distributed systems. OpLog is formalized in the paper [Merkle-CRDTs](https:\u002F\u002Farxiv.org\u002Fabs\u002F2004.00107). You can also easily extend OrbitDB by [implementing and using a custom data model](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FDATABASES.md#building-a-custom-database) benefitting from the same properties as the default data models provided by the underlying Merkle-CRDTs.\n\nThis is the Javascript implementation and it works both in **Browsers** and **Node.js** with support for Linux, OS X, and Windows.\n\nA Go implementation is developed and maintained by the [Berty](https:\u002F\u002Fgithub.com\u002Fberty) project at [berty\u002Fgo-orbit-db](https:\u002F\u002Fgithub.com\u002Fberty\u002Fgo-orbit-db).\n\n## Installation\n\nInstall OrbitDB and its dependencies:\n```\nnpm install @orbitdb\u002Fcore helia\n```\n\n### Browser `\u003Cscript>` tag\n\nOrbitDB can be loaded in the browser using the distributed js file with the `\u003Cscript\u002F>` tag. OrbitDB is the global namespace and all external functions are available via this namespace:\n\n`\u003Cscript>\u002Fpath\u002Fto\u002Forbitdb.min.js\u003C\u002Fscript>`\n\n## Quick Start\n\nIf you want to get up and running with OrbitDB quickly, install and follow the instructions in the [@orbitdb\u002Fquickstart](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fquickstart) module.\n\n## Usage\n\nIf you're using `@orbitdb\u002Fcore` to develop **browser** or **Node.js** applications, use it as a module with the javascript instance of IPFS.\n\n```javascript\nimport { createHelia } from 'helia'\nimport { createOrbitDB } from '@orbitdb\u002Fcore'\nimport { gossipsub } from \"@chainsafe\u002Flibp2p-gossipsub\";\nimport { identify } from \"@libp2p\u002Fidentify\";\nimport { createLibp2p } from 'libp2p'\n\nconst Libp2pOptions = {\n  services: {\n    pubsub: gossipsub({\n      \u002F\u002F neccessary to run a single peer\n      allowPublishToZeroTopicPeers: true\n    }),\n    identify: identify()\n  }\n}\n\n;(async function () {\n  const libp2p = await createLibp2p({ ...Libp2pOptions })\n  const ipfs = await createHelia({libp2p})\n  const orbitdb = await createOrbitDB({ ipfs })\n\n  \u002F\u002F Create \u002F Open a database. Defaults to db type \"events\".\n  const db = await orbitdb.open(\"hello\")\n  \n  const address = db.address\n  console.log(address)\n  \u002F\u002F \"\u002Forbitdb\u002FzdpuAkstgbTVGHQmMi5TC84auhJ8rL5qoaNEtXo2d5PHXs2To\"\n  \u002F\u002F The above address can be used on another peer to open the same database\n\n  \u002F\u002F Listen for updates from peers\n  db.events.on(\"update\", async entry => {\n    console.log(entry)\n    const all = await db.all()\n    console.log(all)\n  })\n\n  \u002F\u002F Add an entry\n  const hash = await db.add(\"world\")\n  console.log(hash)\n\n  \u002F\u002F Query\n  for await (const record of db.iterator()) {\n    console.log(record)\n  }\n  \n  await db.close()\n  await orbitdb.stop()\n  await ipfs.stop()\n})()\n\n```\n\nTo configure your [IPFS instance](https:\u002F\u002Fgithub.com\u002Fipfs\u002Fhelia) for persistency and [Libp2p](https:\u002F\u002Fgithub.com\u002Flibp2p\u002Fjs-libp2p) to connect to peers, see [Creating a Helia instance](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fquickstart\u002Fblob\u002Fmain\u002Fsrc\u002Findex.js) and the [Default Libp2p Configurations](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fquickstart\u002Fblob\u002Fmain\u002Fsrc\u002Fconfig\u002Flibp2p\u002Findex.js) in [@orbitdb\u002Fquickstart](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fquickstart\u002Fblob\u002Fmain\u002Fsrc\u002Fconfig\u002Flibp2p\u002Findex.js) for examples.\n\n## Documentation\n\nUse the **[Getting Started](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FGETTING_STARTED.md)** guide for an initial introduction to OrbitDB.\n\nYou can find more advanced topics in our [docs](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs) covering:\n- [Databases](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FDATABASES.md)\n- [Storage](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FSTORAGE.md)\n- [Identities](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FIDENTITIES.md)\n- [Access Controllers](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FACCESS_CONTROLLERS.md)\n- [Connecting Peers](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FCONNECTING_PEERS.md)\n- [Replication](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FREPLICATION.md)\n- [Oplog](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FOPLOG.md)\n- [Encryption](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fblob\u002Fmain\u002Fdocs\u002FENCRYPTION.md)\n\n### API\n\nSee [https:\u002F\u002Fapi.orbitdb.org](https:\u002F\u002Fapi.orbitdb.org) for the full API documentation.\n\n## Development\n\n### Run Tests\n```sh\nnpm run test\n```\n\n### Build\n```sh\nnpm run build\n```\n\n### Benchmark\n```sh\nnode benchmarks\u002Forbitdb-events.js\n```\n\nSee [benchmarks\u002F](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Ftree\u002Fmaster\u002Fbenchmarks) for more benchmarks.\n\n### API\n\nTo build the API documentation, run:\n\n```sh\nnpm run build:docs\n```\n\nDocumentation is output to .\u002Fdocs\u002Fapi.\n\n## Other implementations\n\n- Golang: [berty\u002Fgo-orbit-db](https:\u002F\u002Fgithub.com\u002Fberty\u002Fgo-orbit-db)\n- Python: [orbitdb\u002Fpy-orbit-db-http-client](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fpy-orbit-db-http-client)\n\nIf you know of any other repos that ought to be included in this section, please open a PR and add them.\n\n## Contributing\n\n**Take a look at our organization-wide [Contributing Guide](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Fwelcome\u002Fblob\u002Fmaster\u002Fcontributing.md).** You'll find most of your questions answered there.\n\nIf you want to code but don't know where to start, check out the issues labelled [\"help wanted\"](https:\u002F\u002Fgithub.com\u002Forbitdb\u002Forbitdb\u002Fissues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+sort%3Areactions-%2B1-desc).\n\n## Sponsors\n\nThe development of OrbitDB has been sponsored by:\n\n* [Protocol Labs](https:\u002F\u002Fprotocol.ai\u002F)\n* [Haja Networks](https:\u002F\u002Fhaja.io)\n* [Maintainer Mountaineer](https:\u002F\u002Fmaintainer.io)\n* [OrbitDB Open Collective](https:\u002F\u002Fopencollective.com\u002Forbitdb)\n\nIf you want to sponsor developers to work on OrbitDB, please donate to our [OrbitDB Open Collective](https:\u002F\u002Fopencollective.com\u002Forbitdb) or reach out to [@haadcode](https:\u002F\u002Fgithub.com\u002Fhaadcode).\n\n## License\n\n[MIT](LICENSE) © 2015-2023 Protocol Labs Inc., Haja Networks Oy, OrbitDB Community\n","OrbitDB 是一个无服务器、分布式的点对点数据库，适用于去中心化网络。它利用 IPFS 作为数据存储，并通过 Libp2p Pubsub 自动与对等节点同步数据库。OrbitDB 基于 Merkle-CRDT 技术实现最终一致性，确保了写入和合并操作的无冲突性。该项目提供了多种类型的数据库，包括事件日志、文档数据库、键值数据库以及索引键值数据库，以满足不同应用场景的需求。这些数据库都建立在 OpLog 上，OpLog 是一种不可变的、基于操作的 CRDT 数据结构，保证了数据的一致性和可靠性。OrbitDB 适合用于开发 P2P 应用程序、区块链项目以及本地优先的 Web 应用。此项目主要使用 JavaScript 编写，兼容浏览器和 Node.js 环境。","2026-06-11 03:28:17","top_topic"]