SkillAgentSearch skills...

Peerbit

P2P database framework with encryption, sharding and search

Install / Use

/learn @dao-xyz/Peerbit
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<br> <p align="center"> <img width="140" src="./docs/peerbit-logo.png" alt="Peerbit icon Icon"> </p> <h1 align="center" style="font-size: 5vmin;"> <strong> Peerbit </strong> </h1> <h3 align="center"> Develop for a distributed web with Peerbit </h3> <h3 align="center" >E2EE &nbsp; &nbsp; P2P &nbsp; &nbsp; Auto-sharding &nbsp; &nbsp; Searchable</h3> <h3 align="center"><a href="https://peerbit.org">Documentation</a> - <a href="https://github.com/dao-xyz/peerbit-examples">Examples</a> - <a href="https://matrix.to/#/#peerbit:matrix.org">Chat on Matrix</a></h3>

A building block for the decentralized web

Peerbit is as easy-to-use as Firebase and provide P2P functionality like OrbitDB or GunJS yet with performance for data-intensive applications like live-streaming and cloud-gaming. It’s built on top of Libp2p (and works with IPFS) supporting encryption, sharding and discoverability (searching).

Your database schema can remain very simple but still utilize P2P networks, auto-scaling, E2E-encryption, discoverability and all other features you’d expect from a database.

Optimized for performance

Peerbit is performant, so performant in fact you can use it for streaming video by having peers subscribing to database updates. In a low latency setting, you can achieve around 1000 replications a second and have a thoughput of 100 MB/s.

Dogestream

Other examples

Chat room

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/one-chat-room/demo.gif" width="600" />

Lobby + chat rooms

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/many-chat-rooms/demo.gif" width="600" />

Blog platform

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/blog-platform/demo-cli.gif" width="600" />

Sync files

React app

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/file-share/demo-frontend.gif" width="600" />

CLI

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/file-share/demo-cli.gif" width="600" />

Collaborative machine learning

<img src="https://github.com/dao-xyz/peerbit-examples/blob/master/packages/collaborative-learning/demo.gif" width="600" />

Get Started

  1. Install Peerbit by following the simple setup instructions in our Installation Guide.

  2. Dive into our comprehensive Documentation or checkout the Example repository to explore the powerful features and learn how to leverage Peerbit to its fullest potential.

  3. Join us on Matrix to connect, share ideas, and collaborate with like-minded individuals.

Contribute

Peerbit is an open-source project, and we welcome contributions from developers like you! Feel free to contribute code, report issues, and submit feature requests. Together, let's shape the future of Peerbit.

IMPORTANT: Peerbit uses pnpm.

  1. Check pnpm version: pnpm -v should print something
  2. Install: pnpm install
  3. Build: pnpm run build
  4. Run tests: pnpm run test in root or in a specific subpackage

You might possibly need to CMD + Shift + P and then enter to restart the typescript server after the build step.

Local coverage report (Codecov-style)

To generate a local, navigable HTML report with the same remapped source paths used for Codecov uploads:

  1. (Optional) clear old coverage artifacts: find . -type d -name .coverage -prune -exec rm -rf {} + && rm -rf .nyc_output coverage
  2. Rebuild workspace packages (refreshes generated dist type artifacts): pnpm run build
  3. Run the CI coverage shards you want to include: pnpm run test:ci:part-1 && pnpm run test:ci:part-2 && pnpm run test:ci:part-3 && pnpm run test:ci:part-4 && pnpm run test:ci:part-5 && pnpm run test:ci:part-6
  4. Generate the merged report: pnpm run coverage:report
  5. Open the report: macOS: open coverage/index.html Linux: xdg-open coverage/index.html

pnpm run coverage:report runs remapping first (coverage-remapped.json when available), then merges all workspace coverage files and creates HTML + text output via nyc.

To create a new package, follow the following steps:

  1. Clone the time folder within /packages/utils/time to the desired destination and rename it
  2. Update the package.json name, description, version fields
  3. Possibly add other depencencies to the package.json dependencies field (like @peerbit/crypto)
  4. Delete contents in CHANGELOG.md
  5. Update the root package.json workspaces field
  6. Update the root pnpm-workspace.yaml packages list
  7. Run pnpm install once in the root

We recommend running tests with the VS Code integration though: https://github.com/CoderLine/mocha-vscode

VScode specific

Add the following to your settings.json file:

{
      "vitest.experimentalStaticAstCollect": true, // might be helpful
      "search.followSymlinks": false, // prevents rg hogging CPU
}

Let's Get Coding!

peerbit.org

Related Skills

View on GitHub
GitHub Stars257
CategoryData
Updated20h ago
Forks21

Languages

TypeScript

Security Score

100/100

Audited on Mar 30, 2026

No findings