From e562288f82aaf124590b27920569ac7afe0f1009 Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Tue, 4 Apr 2023 17:39:38 +0200 Subject: [PATCH] update readme --- README.md | 59 ++++++++++++++++++-- libp2p-hero.svg | 139 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 4 deletions(-) create mode 100644 libp2p-hero.svg diff --git a/README.md b/README.md index 23a3f81..78ec358 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,58 @@ # Universal Connectivity -This is a chat app demontrating libp2p's super powers in establishing connectivity between multiple runtimes and languages. +Realtime highly decentralised chat app. -- Uses the [**GossipSub**](https://docs.libp2p.io/concepts/pubsub/overview/) PubSub protocol for decentralized messaging -- The [chat frontend](./packages/frontend) is a Next.js app that uses [**js-libp2p**](https://github.com/libp2p/js-libp2p) -- The [go chat daemon](./go-peer) uses go-libp2p +![libp2p topology](libp2p-hero.svg) + +Showcasing [libp2p](https://libp2p.io/)'s superpowers in establishing ubiquitous peer-to-peer connectivity in modern programming languages (Go, Rust, TypeScript) and runtimes (Web, native binary). + +On top of this strong foundation, it layers a GossipSub: A Secure PubSub Protocol for Unstructured Decentralised P2P Overlays. By analogy, an event broker with distributed brokering, or a distributed PubSub protocol. + +This is the gossip event protocol that powers Filecoin and Post-Merge Ethereum. + +Some of the cool and cutting-edge [transport protocols](https://connectivity.libp2p.io/) used by this app are: + +- WebTransport +- WebRTC +- QUIC +- TCP + +## Packages + +| Packge | Description | WebTransport | WebRTC | QUIC | TCP | +| :--------------------------------- | :----------------------------------------------- | ------------ | ------ | ---- | --- | +| [`frontend`](./packages/frontend/) | Next.js based browser UI of the chat app | ✅ | ✅ | ❌ | ❌ | +| [`go-peer`](./go-peer/) | Chat peer implemented in Go | ✅ | ❌ | ✅ | ✅ | +| [`rust-peer`](./rust-peer/) | Chat peer implemented in Rust | ❌ | ✅ | ✅ | ❌ | +| [`node`](./packages/node/) | Chat peer implemented with TypeScript in node.js | ❌ | ❌ | ❌ | ✅ | + +✅ - Protocol supported +❌ - Protocol not supported + +- Uses the [**GossipSub**](https://docs.libp2p.io/concepts/pubsub/overview/) PubSub protocol for decentralised messaging + +## Connecting to a peer + + + +## Getting started – frontend and node + +The project uses [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces). + + +### 1. Install dependencies + +Run npm install from the root of the repo: + +``` +npm i +``` + +### 2. Start dev server + +Enter the frontend folder, start the dev server + +``` +cd packages/frontend +npm run dev +``` diff --git a/libp2p-hero.svg b/libp2p-hero.svg new file mode 100644 index 0000000..b9ab373 --- /dev/null +++ b/libp2p-hero.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +