From 48b848a1232c830ea79add368cfe24ceb132cc6f Mon Sep 17 00:00:00 2001 From: dmc Date: Fri, 8 Mar 2024 15:42:45 +0100 Subject: [PATCH] readme, contributing, license, notice, repo info --- CONTRIBUTING.md | 30 +++++++ LICENSE | 202 ++++++++++++++++++++++++++++++++++++++++++++++++ NOTICE | 13 ++++ README.md | 116 ++++----------------------- package.json | 19 ++++- 5 files changed, 278 insertions(+), 102 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 NOTICE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6037b8d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing to Pear Runtime + +Pear is an Open Source Project, authored & maintained by Holepunch. + +The source is open to use as per the [LICENSE](./LICENSE). + +Be aware that **any pull-request or issue may be closed without explanation**. + +## Issues + +- Feature requests are welcome. +- For bug reports, please provide a failing test case or steps to reproduce. + +## Pull Request + +Newer contributors are encouraged to start small and simple. Tests - both failing and passing - are very helpful. + +- Keep pull requests focused on a single feature or bug fix +- Provide a clear description of changes +- Ensure code passes linting: `npm run lint` +- Ensure tests are passing: `npm test` + - except, of course, any added failing tests + +## Code Style + +Please follow the [StandardJS](https://standardjs.com/) code style. + +## License + +By contributing, you agree that your contributions will be licensed under the project [LICENSE](./LICENSE). \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e72929e --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + \ No newline at end of file diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..7698d2f --- /dev/null +++ b/NOTICE @@ -0,0 +1,13 @@ +Copyright 2024 Holepunch Inc + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md index 5b88663..5513ff3 100644 --- a/README.md +++ b/README.md @@ -1,109 +1,23 @@ -# Pear by Holepunch +# Pear Desktop -> Pear loads applications remotely from peers and allows anyone to create and share applications with peers. +> The Pear Runtime Pear Desktop Application -Pear by Holepunch is a combined Peer-to-Peer (P2P) Runtime, Development & Deployment tool. +Pear Desktop is the [pear://runtime](pear://runtime) Application. -Build, share & extend unstoppable, zero-infrastructure P2P applications for Desktop, Terminal & Mobile. +## Usage -Welcome to the Internet of Peers +``` +pear run pear://runtime +``` -  _– Holepunch, the P2P Company_ +## Development -## Table of Contents +``` +git clone https://github.com/holepunchto/pear-desktop +cd pear-desktop +pear run --dev . +``` -### Pear runtime +## License -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. | **stable** | -| [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.| **stable** | -| [Autobase](./building-blocks/autobase.md) | A "virtual Hypercore" layer over many Hypercores owned by many different peers. | **experimental** | -| [Hyperdht](./building-blocks/hyperdht.md) | The Distributed Hash Table (DHT) powering Hyperswarm. | **stable** | -| [Hyperswarm](./building-blocks/hyperswarm.md)| A high-level API for finding and connecting to peers who are interested in a "topic". | **stable** | - -### 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. | **stable** | -| [Localdrive](./helpers/localdrive.md) | A file system interoperable with Hyperdrive. | **stable** | -| [Mirrordrive](./helpers/mirrordrive.md) | Mirror a [Hyperdrive](./building-blocks/hyperdrive.md) or a [Localdrive](./helpers/localdrive.md) into another one. | **stable** | -| [Secretstream](./helpers/secretstream.md) | SecretStream is used to securely create connections between two peers in Hyperswarm. | **stable** | -| [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.| **stable** | -| [Protomux](./helpers/protomux.md) | Multiplex multiple message oriented protocols over a stream. | **stable** | - -### 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. | **stable** | -| [Hypertele](./tools/hypertele.md) | A swiss-knife proxy powered by [HyperDHT](./building-blocks/hyperdht.md). | **stable** | -| [Hyperbeam](./tools/hyperbeam.md) | A one-to-one and end-to-end encrypted internet pipe. | **stable** | -| [Hyperssh](./tools/hyperssh.md) | A CLI to run SSH over the [HyperDHT](./building-blocks/hyperdht.md). | **stable** | -| [Drives](./tools/drives.md) | CLI to download, seed, and mirror a [Hyperdrive](./building-blocks/hyperdrive.md) or a [Localdrive](./helpers/localdrive.md). | **stable** | - -### 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 | -| :----------------------------------------------------------: | :---------------------------------------------------------: | -| **stable** | Unlikely to change or be removed in the foreseeable future. | -| **experimental** | New, untested, or have known issues. | -| **deprecated** | Being removed or replaced in the future. | -| **unstable** | May change or be removed without warning. | +Apache-2.0 diff --git a/package.json b/package.json index e48c2ed..ce2c1a4 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,22 @@ "devDependencies": { "brittle": "^3.4.0", "standard": "^17.1.0" - } + }, + "license": "Apache-2.0", + "description": "> The Pear Runtime Pear Desktop Application", + "directories": { + "example": "examples", + "lib": "lib", + "test": "tests" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/holepunchto/pear-desktop.git" + }, + "keywords": [], + "author": "", + "bugs": { + "url": "https://github.com/holepunchto/pear-desktop/issues" + }, + "homepage": "https://github.com/holepunchto/pear-desktop#readme" }