|
| 1 | +<p align="center"> |
| 2 | + <a href="https://libp2p.io"> |
| 3 | + <img width="250" src="https://github.com/libp2p/js-libp2p/blob/master/img/libp2p.png?raw=true" alt="libp2p hex logo" /> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<h3 align="center">A collection of js-libp2p examples</h3> |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | + <img src="https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png" width="200"> |
| 11 | + <br> |
| 12 | + <a href="https://github.com/libp2p/js-libp2p/tree/master/doc">Explore the docs</a> |
| 13 | + · |
| 14 | + <a href="https://github.com/libp2p/js-libp2p-examples/issues">Report Bug</a> |
| 15 | + · |
| 16 | + <a href="https://github.com/libp2p/js-libp2p-examples/issues">Request Feature/Example</a> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Table of Contents |
| 20 | + |
| 21 | +- [Table of Contents](#table-of-contents) |
| 22 | +- [About The Project](#about-the-project) |
| 23 | +- [Getting Started](#getting-started) |
| 24 | + - [Examples](#examples) |
| 25 | + - [Understanding how libp2p works](#understanding-how-libp2p-works) |
| 26 | + - [Other examples](#other-examples) |
| 27 | + - [libp2p in the Browser](#libp2p-in-the-browser) |
| 28 | + - [Prerequisites](#prerequisites) |
| 29 | +- [Documentation](#documentation) |
| 30 | +- [Want to hack on IPFS?](#want-to-hack-on-ipfs) |
| 31 | + |
| 32 | +## About The Project |
| 33 | + |
| 34 | +- Read the [docs](https://ipfs.github.io/helia/modules/helia.html) |
| 35 | +- Look into other [examples](https://github.com/libp2p/js-libp2p-examples) to learn how to spawn a Helia node in Node.js and in the Browser |
| 36 | +- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it |
| 37 | +- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs |
| 38 | +- Check out https://docs.ipfs.io for tips, how-tos and more |
| 39 | +- See https://blog.ipfs.io for news and more |
| 40 | +- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io |
| 41 | + |
| 42 | +## Getting Started |
| 43 | + |
| 44 | +### Examples |
| 45 | + |
| 46 | +Feel free to jump directly into the examples, however going through the following sections will help build context and background knowledge. |
| 47 | + |
| 48 | +#### Understanding how libp2p works |
| 49 | + |
| 50 | +- [Circuit Relay](./examples/js-libp2p-example-circuit-relay) |
| 51 | + |
| 52 | +#### Other examples |
| 53 | + |
| 54 | +- Running libp2p in the Electron (future) |
| 55 | +- [The standard echo net example with libp2p](./echo) |
| 56 | +- [A simple chat app with libp2p](./chat) |
| 57 | + |
| 58 | +#### libp2p in the Browser |
| 59 | +There are a number of ways libp2p can be used in the browser. Here are some examples: |
| 60 | + |
| 61 | +- [webRTC](./libp2p-in-the-browser/webrtc/README.md) |
| 62 | +- [websockets](./libp2p-in-the-browser/websockets/README.md) |
| 63 | +- [webtransport](./libp2p-in-the-browser/webtransport/README.md) |
| 64 | + |
| 65 | +There is also an tutorial of how all of these transports can be [universally connected](https://github.com/libp2p/universal-connectivity/tree/main) |
| 66 | + |
| 67 | +### Prerequisites |
| 68 | + |
| 69 | +Make sure you have installed all of the following prerequisites on your development machine: |
| 70 | + |
| 71 | +- Git - [Download & Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed. |
| 72 | +- Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager. |
| 73 | + |
| 74 | +## Documentation |
| 75 | + |
| 76 | +- [IPFS Primer](https://dweb-primer.ipfs.io/) |
| 77 | +- [IPFS Docs](https://docs.ipfs.io/) |
| 78 | +- [Tutorials](https://proto.school) |
| 79 | +- [More examples](https://github.com/libp2p/js-libp2p-examples) |
| 80 | +- [API - Helia](https://ipfs.github.io/helia/modules/helia.html) |
| 81 | +- [API - @helia/unixfs](https://ipfs.github.io/helia-unixfs/modules/helia.html) |
| 82 | + |
| 83 | +## Want to hack on IPFS? |
| 84 | + |
| 85 | +[](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) |
| 86 | + |
| 87 | +The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out: |
| 88 | + |
| 89 | +Read the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md). |
| 90 | + |
| 91 | +- **Check out existing issues** The [issue list](https://github.com/ipfs/helia/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge |
| 92 | +- **Look at the [Helia Roadmap](https://github.com/ipfs/helia/blob/main/ROADMAP.md)** This are the high priority items being worked on right now |
| 93 | +- **Perform code reviews** More eyes will help |
| 94 | + a. speed the project along |
| 95 | + b. ensure quality, and |
| 96 | + c. reduce possible future bugs |
| 97 | +- **Add tests**. There can never be enough tests |
0 commit comments