Skip to content

Commit

Permalink
πŸπŸƒβ³
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarkclements committed Mar 8, 2024
0 parents commit 8e59393
Show file tree
Hide file tree
Showing 67 changed files with 417,252 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build Status
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
node-version: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
126 changes: 126 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
package-lock.json
todo.*
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "vendor"]
path = vendor
url = https://github.com/holepunchto/pear-docs
[submodule "vendor/pear-docs"]
path = vendor/pear-docs
url = https://github.com/holepunchto/pear-docs
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Pear Desktop Changelog

## v1.0.0

First public release 🍐
109 changes: 109 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Pear by Holepunch

> Pear loads applications remotely from peers and allows anyone to create and share applications with peers.
Pear by Holepunch is a combined Peer-to-Peer (P2P) Runtime, Development & Deployment tool.

Build, share & extend unstoppable, zero-infrastructure P2P applications for Desktop, Terminal & Mobile.

Welcome to the Internet of Peers

  _– Holepunch, the P2P Company_

## Table of Contents

### Pear runtime

References for utilizing the Pear runtime.

* [Command-Line-Interface (CLI)](./reference/cli.md)
* [Application-Programming-Interface (API)](./reference/api.md)
* [Application Configuration](./reference/configuration.md)

> The Pear runtime uses [Bare](https://github.com/holepunchto/bare) JavaScript runtime, which is a small and modular JavaScript runtime for desktop and mobile.
### Guides

Guides on using the pear runtime to build and share P2P applications.

* [Getting Started](./guide/getting-started.md)
* [Starting a Pear Desktop Project](./guide/starting-a-pear-desktop-project.md)
* [Making a Pear Desktop Application](./guide/making-a-pear-desktop-app.md)
* [Starting a Pear Terminal Project](./guide/starting-a-pear-terminal-project.md)
* [Making a Pear Terminal Application](./guide/making-a-pear-terminal-app.md)
* [Sharing a Pear Application](./guide/sharing-a-pear-app.md)
* [Releasing a Pear Application](./guide/releasing-a-pear-app.md)

### How-tos

Simple How-tos on using the essential builing blocks in Pear applications.

* [How to connect two peers by key with HyperDHT](./howto/connect-two-peers-by-key-with-hyperdht.md)
* [How to connect to many peers by topic with Hyperswarm](./howto/connect-to-many-peers-by-topic-with-hyperswarm.md)
* [How to replicate and persist with Hypercore](./howto/replicate-and-persist-with-hypercore.md)
* [How to work with many Hypercores using Corestore](./howto/work-with-many-hypercores-using-corestore.md)
* [How to share append-only databases with Hyperbee](./howto/share-append-only-databases-with-hyperbee.md)
* [How to create a full peer-to-peer filesystem with Hyperdrive](./howto/create-a-full-peer-to-peer-filesystem-with-hyperdrive.md)

### Building blocks

The essential building blocks for building powerful P2P applications using Pear.

| Name | Description | Stability |
|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| [Hypercore](./building-blocks/hypercore.md) | A distributed, secure append-only log for creating fast and scalable applications without a backend, as it is entirely P2P. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Hyperdrive](./building-blocks/hyperdrive.md)| A secure, real-time distributed file system that simplifies P2P file sharing and provides an efficient way to store and access data.| <mark style="background-color:#80ff80;">**stable**</mark> |
| [Autobase](./building-blocks/autobase.md) | A "virtual Hypercore" layer over many Hypercores owned by many different peers. | <mark style="background-color: #8484ff;">**experimental**</mark> |
| [Hyperdht](./building-blocks/hyperdht.md) | The Distributed Hash Table (DHT) powering Hyperswarm. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Hyperswarm](./building-blocks/hyperswarm.md)| A high-level API for finding and connecting to peers who are interested in a "topic". | <mark style="background-color:#80ff80;">**stable**</mark> |

### Helpers

Helper modules can be used together with the building blocks to create cutting-edge P2P tools and applications.

| Name | Description | Stability |
|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| [Corestore](./helpers/corestore.md) | A Hypercore factory designed to facilitate the management of sizable named Hypercore collections. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Localdrive](./helpers/localdrive.md) | A file system interoperable with Hyperdrive. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Mirrordrive](./helpers/mirrordrive.md) | Mirror a [Hyperdrive](./building-blocks/hyperdrive.md) or a [Localdrive](./helpers/localdrive.md) into another one. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Secretstream](./helpers/secretstream.md) | SecretStream is used to securely create connections between two peers in Hyperswarm. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Compact-encoding](./helpers/compact-encoding.md)| A series of binary encoding schemes for building fast and small parsers and serializers. We use this in Keet to store chat messages and in Hypercore's replication protocol.| <mark style="background-color:#80ff80;">**stable**</mark> |
| [Protomux](./helpers/protomux.md) | Multiplex multiple message oriented protocols over a stream. | <mark style="background-color:#80ff80;">**stable**</mark> |

### Tools

The following tools are used extensively employed in the day-to-day development and operation of applications built on Pear.

| Name | Description | Stability |
|------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| [Hypershell](./tools/hypershell.md)| A CLI to create and connect to P2P E2E encrypted shells. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Hypertele](./tools/hypertele.md) | A swiss-knife proxy powered by [HyperDHT](./building-blocks/hyperdht.md). | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Hyperbeam](./tools/hyperbeam.md) | A one-to-one and end-to-end encrypted internet pipe. | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Hyperssh](./tools/hyperssh.md) | A CLI to run SSH over the [HyperDHT](./building-blocks/hyperdht.md). | <mark style="background-color:#80ff80;">**stable**</mark> |
| [Drives](./tools/drives.md) | CLI to download, seed, and mirror a [Hyperdrive](./building-blocks/hyperdrive.md) or a [Localdrive](./helpers/localdrive.md). | <mark style="background-color:#80ff80;">**stable**</mark> |

### Apps

Applications built using Pear.

- [Keet](./apps/keet.md): A peer-to-peer chat and video-conferencing application with end-to-end encryption.

### Examples

Collection of example applications that can be used as reference during development.
- [Cross-platform Pear App](./examples/cross-platform-pear-app.md): Cross-platform "Hello World" Pear application for Android and iOS.
- [Bare on Mobile](./examples/bare-on-mobile.md): Reference applications for using Bare runtime on Android and iOS.
- [React App using Pear](./examples/react-app-using-pear.md): Example application for building Pear applications using React framework.

## Stability indexing

Throughout the documentation, indications of stability are provided. Some modules are well-established and used widely, making them highly unlikely to ever change. Other modules may be new, experimental, or known to have risks associated with their use.

The following stability indices have been used:

| Stability | Description |
| :----------------------------------------------------------: | :---------------------------------------------------------: |
| <mark style="background-color: #80ff80;">**stable**</mark> | Unlikely to change or be removed in the foreseeable future. |
| <mark style="background-color: #8484ff;">**experimental**</mark> | New, untested, or have known issues. |
| <mark style="background-color: #ffffa2;">**deprecated**</mark> | Being removed or replaced in the future. |
| <mark style="background-color: #ff4242;">**unstable**</mark> | May change or be removed without warning. |
65 changes: 65 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Table of contents

* [Pear by Holepunch](./README.md)

### Pear runtime

* [Command-Line-Interface (CLI)](./reference/cli.md)
* [Application-Programming-Interface (API)](./reference/api.md)
* [Application Configuration](./reference/configuration.md)

### Guides

* [Getting Started](./guide/getting-started.md)
* [Starting a Pear Desktop Project](./guide/starting-a-pear-desktop-project.md)
* [Making a Pear Desktop Application](./guide/making-a-pear-desktop-app.md)
* [Starting a Pear Terminal Project](./guide/starting-a-pear-terminal-project.md)
* [Making a Pear Terminal Application](./guide/making-a-pear-terminal-app.md)
* [Sharing a Pear Application](./guide/sharing-a-pear-app.md)
* [Marking a Release](./guide/releasing-a-pear-app.md)
* [Debugging a Pear Terminal Application](./guide/debugging-a-pear-terminal-app.md)

### Building blocks

* [Hypercore](./building-blocks/hypercore.md)
* [Hyperbee](./building-blocks/hyperbee.md)
* [Hyperdrive](./building-blocks/hyperdrive.md)
* [Autobase](./building-blocks/autobase.md)
* [HyperDHT](./building-blocks/hyperdht.md)
* [Hyperswarm](./building-blocks/hyperswarm.md)

### How-tos

* [Connect two peers](./howto/connect-two-peers-by-key-with-hyperdht.md)
* [Connect many peers](./howto/connect-to-many-peers-by-topic-with-hyperswarm.md)
* [Replicate & persist](./howto/replicate-and-persist-with-hypercore.md)
* [Manage multiple Hypercores](./howto/work-with-many-hypercores-using-corestore.md)
* [Share append-only databases](./howto/share-append-only-databases-with-hyperbee.md)
* [Create a p2p filesystem](./howto/create-a-full-peer-to-peer-filesystem-with-hyperdrive.md)

### Helpers

* [Corestore](./helpers/corestore.md)
* [Localdrive](./helpers/localdrive.md)
* [Mirrordrive](./helpers/mirrordrive.md)
* [Secretstream](./helpers/secretstream.md)
* [Compact encoding](./helpers/compact-encoding.md)
* [Protomux](./helpers/protomux.md)

### Tools

* [Hypershell](tools/hypershell.md)
* [Hypertele](tools/hypertele.md)
* [Hyperbeam](tools/hyperbeam.md)
* [Hyperssh](tools/hyperssh.md)
* [Drives](tools/drives.md)

### Apps

* [Keet](apps/keet.md)

### Examples

* [Cross-platform Pear App](examples/cross-platform-pear-app.md)
* [Bare on Mobile](examples/bare-on-mobile.md)
* [React App using Pear](examples/react-app-using-pear.md)
36 changes: 36 additions & 0 deletions apps/keet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Keet.io

[Keet](https://keet.io) is a fully P2P communications tool that's built entirely on Holepunch. Give it a try!

### Features

|![Video Quality](../assets/keet/quality.png)| ![Secure](../assets/keet/secure.png)| ![File Handling](../assets/keet/filehandling.png)|
| --- | --- | --- |
|**Video quality that impresses! πŸŽ₯**|**Private and encrypted πŸ”’** | **Handle any file size πŸ“‚βœ…** |
|Keet video calls operate over direct connections between you and your friends, without using servers that can throttle your performance. You'll notice the difference.| Keet only shares end-to-end encrypted data between participants in your calls. Without middlemen, third-parties, or servers, there’s nobody left who can snoop or leak data. | When you share a file in Keet, you don’t have to wait for it to upload. Other peers can immediately download it straight from the source. Megabytes, gigabytes, or terabytes. No limits.|


> Built-in Bitcoin Lightning and USDt micro-payments make it easy to incorporate powerful paid features into apps. Peers control their data, including buying/selling, eliminating tokens, ads, incentives, and data harvesting. Future updates will introduce P2P payments to send tips, pay for services, bandwidth, storage, etc.
### How it works

What makes Keet so powerful? How does it allow users to securely exchange data over a distributed peer-to-peer network?

Here is the step-by-step process of how it works:

1. First, users generate and announce a cryptographic public key to a swarm of distributed computers, known as a Distributed Hash Table (DHT). No sign-ups are required when using Keet.
2. Using this public key, other Keet users can locate and, when authorized, connect to your computer. This process is called distributed hole punching, which makes it possible for computers on home networks to connect to each other without involving centralized servers.
3. During hole punching, Keet uses partial information from multiple peers in the network to ensure privacy.
4. Once connected, peers can safely and privately exchange chunks of data directly with each other without having to send the data to servers.
5. When you write a message in Keet, you don't have to directly send it to everyone. Any peer who receives it can relay it to others, and everyone can easily verify that the message came from you.
6. If you go offline, anyone can continue to serve your messages on your behalf. In fact, everything in Keet, including the app itself, is distributed this way, fully encrypted, private, and only shared with the people you want.

### Join the Internet of Peers

#### Desktop

Keet is available for download on Windows, macOS, and Linux desktops. [Download](https://keet.io/) now and discover the power of communication without compromises!

#### Mobile

Experience P2P communications on your mobile devices. Download Keet Mobile on your [Android](https://play.google.com/store/apps/details?id=io.keet.app) and [iOS](https://apps.apple.com/us/app/keet-by-holepunch/id6443880549) mobile devices today!
1 change: 1 addition & 0 deletions assets/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-4a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-4b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-5a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-app-5b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8e59393

Please sign in to comment.