Pear Docs

About Pear

Why Pear is shaped the way it is—peer-to-peer, append-only logs, the runtime split, and the trade-offs behind each choice.

Pear is a platform for building, distributing, and updating peer-to-peer applications. If that's all you know so far, start with What is Pear?.

The pages in this section are for understanding, not doing. They answer "why" rather than "how": why Pear treats an app as replicated data, where that data lives on disk, why peer-to-peer logic runs in a Bare worker rather than the UI process, and why a release goes through stage, provision, and multisig instead of a single deploy.

If you want to build something, head to Getting started or How To. If you need to look up a specific API, that's Reference.

Start here

New to Pear? Read these three, in order.

  1. What is Pear?—the platform in plain language: what's in the box, how an app reaches its users, and what Pear is not.
  2. How the stack fits together—the one diagram that places Pear, the P2P building blocks, and Bare.
  3. Pear desktop application architecture—what a real app's processes, workers, and updater look like.

Bare is the runtime underneath. A small, zero-core JavaScript runtime with its own docs: the module system, native addons, embedding in native and mobile apps, and compiling to a standalone binary all live on the Bare tab. How the stack fits together maps the layers.

P2P is the peer-to-peer building blocks. Hypercore, Hyperswarm, Autobase, Hyperbee, Hyperdrive, HyperDHT, and Corestore—independent JavaScript modules for storage, discovery, and replication, with their own docs on the P2P tab. How the stack fits together maps the layers.

In this section

Pages are grouped by topic and ordered roughly from foundational concepts to app-specific ones.

Platform foundations

  • What is Pear?—the platform in plain language: the CLI, the pear-runtime library, the pear-* modules, and what Pear deliberately is not.
  • How the stack fits together—how Pear and Bare layer together, from the native C foundations up to the apps you run.
  • Runtime and languages—JavaScript on Bare, native addons for other languages, and the Pear-end pattern for cross-platform apps.
  • Using Bare on its own—the entry point for adopting Bare as a standalone runtime, without Pear's peer-to-peer platform.
  • Inside Bare—what the Bare runtime adds, its lifecycle, and why its standard library is opt-in.
  • Migrating from Node.js—what changes in your code and mental model when porting an app to Bare.
  • Peer-to-peer, demystified—hole punching, public-key identity, and the roles of HyperDHT and Hyperswarm.
  • One core, many platforms—running the peer-to-peer core in a Bare worklet behind a typed RPC seam.
  • Dependencies—why Pear apps use npm for dependencies even though they run on Bare, and how those dependencies reach users.

Storing & replicating data

Building & shipping apps

  • Pear desktop application architecture—how a typical Pear Electron app splits updates, storage, and Bare workers (with a link to a full sample repo).
  • Pear mobile application architecture—how a typical Pear + React Native app splits the view runtime from a Bare worklet backend.
  • Workers—why peer-to-peer logic lives in a Bare worker behind one IPC stream, and where the host/worker boundary should sit.
  • Release pipeline—stage, provision, multisig, release lines, and deployment-directory diagrams (agnostic; sample implementation on GitHub).

Coming from the old FAQ?

The single FAQ page was retired. Each question now lives in the section it actually belongs to:

Old FAQ questionNew home
How do I get a list of installed applications?Manage installed applications
How do I uninstall a Pear application?Manage installed applications
Where is the Pear application stored?Storage and distribution
Can Pear be used with X language?Runtime and languages
How do I write an application once that runs on desktop, mobile, etc.?Runtime and languages · One core, many platforms
Is Bare a fork of Node? Can I use npm modules?Inside Bare
Can Bare run on iOS or Android?One core, many platforms
How is my application distributed? Do I have to keep pear seed running?Storage and distribution
Why is NPM used for dependencies?Dependencies
How do I distribute a binary version of my application?Distribute as a binary
Can peers know my IP address when using hyperswarm?Peer-to-peer, demystified

Last updated on

Was this helpful?

On this page