How To
Goal-oriented recipes for getting things done with Pear. Each guide solves one specific problem from start to finish.
How-tos are goal-oriented recipes. Each one assumes you already know roughly what you're doing and just need the steps for a particular task—replicating a Hypercore, deploying an app, or troubleshooting common issues.
If you want to look up a CLI flag, an API, or a config field, that's Reference. For the conceptual "why," see About Pear.
Start here
Many recipes below build on one of two starting points. Chat-focused guides extend the pear-chat scaffold (Electron shell, Bare worker, Autobase-backed chat room) built step by step in the Getting Started path—see Reshape into a production app. Guides that don't need chat start from one of the boilerplates in Start from a template—desktop (hello-pear-electron) or terminal (hello-pear-bare). Each guide states its base up front. If you're new, work through Getting Started first so you understand each piece before adapting it.
In this section
- Manage installed applications—list installed Pear apps and reset their storage.
- Troubleshoot common issues—fixes for common Pear and Bare development issues.
Several guides below extend a base scaffold—either the pear-chat app from the Getting Started path or a boilerplate from Start from a template—with one capability at a time. They teach Pear-end logic—the code in the Bare worker, not the UI—so the same worker is portable across desktop, mobile, and terminal; only the UI half changes per platform (see Runtime and languages).
Connecting peers
- Connect two peers by key with HyperDHT
- Connect to many peers by topic with Hyperswarm
- Host multiple rooms in one chat app
Storage and replication
- Replicate and persist with Hypercore
- Work with many Hypercores using Corestore
- Share append-only databases with Hyperbee
- Create a full peer-to-peer filesystem with Hyperdrive
- Store and serve large media with Hyperblobs
- Keep data available with blind peering
- Add blind peering to a chat app
Managing identity
Stream and share media
- Share files in a peer-to-peer app
- Back up photos in a peer-to-peer app
- Stream stored video in a peer-to-peer app
- Stream a live camera in a peer-to-peer app
Releasing & distributing your app
CI / GitHub Actions
Build & package
Manual deployment
Multisig
Maintenance