{"id":14956176,"url":"https://github.com/nuzulul/webpeerjs","last_synced_at":"2025-10-01T17:30:51.935Z","repository":{"id":241114427,"uuid":"803242286","full_name":"nuzulul/webpeerjs","owner":"nuzulul","description":"WebPEER is a novel decentralized P2P network overlay in browser-side with a chance of working. 🔥","archived":false,"fork":false,"pushed_at":"2024-10-16T13:06:18.000Z","size":1054,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T14:18:58.641Z","etag":null,"topics":["browser-to-browser","decentralized","distributed","ipfs","libp2p","p2p","p2p-network","peer-to-peer","webpeer","webrtc"],"latest_commit_sha":null,"homepage":"https://webpeer.js.org/demo/chat.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuzulul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-20T10:55:30.000Z","updated_at":"2024-10-20T06:33:50.000Z","dependencies_parsed_at":"2024-05-22T14:02:08.294Z","dependency_job_id":"32b2cee1-c6c2-4e44-99a9-b8b1f47a7f03","html_url":"https://github.com/nuzulul/webpeerjs","commit_stats":{"total_commits":135,"total_committers":2,"mean_commits":67.5,"dds":0.007407407407407418,"last_synced_commit":"52d998005a83459c4ffafad3ccdee0d10c75ae43"},"previous_names":["nuzulul/webpeerjs"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuzulul%2Fwebpeerjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuzulul%2Fwebpeerjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuzulul%2Fwebpeerjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuzulul%2Fwebpeerjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuzulul","download_url":"https://codeload.github.com/nuzulul/webpeerjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234719382,"owners_count":18876523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-to-browser","decentralized","distributed","ipfs","libp2p","p2p","p2p-network","peer-to-peer","webpeer","webrtc"],"created_at":"2024-09-24T13:12:26.341Z","updated_at":"2025-10-01T17:30:51.927Z","avatar_url":"https://github.com/nuzulul.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":["JavaScript"],"readme":"# WebPEER\n\u003e WebPEER is a P2P Network that Runs in a Browser\n\nThis [webpeerjs](https://github.com/nuzulul/webpeerjs) library implements libp2p to create decentralized peer-to-peer network that runs in a browser without a central server.\n\nBasic Chat App Demo available at : [https://nuzulul.github.io/webpeerjs/demo/chat.html](https://nuzulul.github.io/webpeerjs/demo/chat.html)\n\n![WebPEER](webpeer.png)\n\n## Security\n\nWebPEER Network run over [`libp2p gossipsub`](https://docs.libp2p.io/concepts/security/security-considerations/#publish--subscribe) protocol to enables communication between peers. \n\u003e By default, the gossipsub implementation will sign all messages with the author’s private key, and require a valid signature before accepting or propagating a message further. This prevents messages from being altered in flight, and allows recipients to authenticate the sender.\n\n\u003e However, as a cooperative protocol, it may be possible for peers to interfere with the message routing algorithm in a way that disrupts the flow of messages through the network.\n\n## Features\n\n* ✅ Decentralized P2P\n* ✅ Scalable Peers\n* ✅ Works in Browsers\n* ✅ Broadcast Messages\n* ✅ Censorship Resistant\n\n## Ideas\n\n* Blockchain\n* Voting / Polling\n* Collaborative activity\n* IoT\n* Censorship resistent social media\n* Remote control\n* Multiplayer games\n* Decentralized/distributed web\n* Signalling protocol\n* Location tracker\n* User activity tracker.\n\n## Try it out!\n\n* Go to a deployed chat demo at : [https://nuzulul.github.io/webpeerjs/demo/chat.html](https://nuzulul.github.io/webpeerjs/demo/chat.html) .\n* Open the app on another device.\n* Both your devices should connected.\n* Now start sending message.\n\n## Browser Support\n![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Brave](https://raw.github.com/alrra/browser-logos/master/src/brave/brave_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) |\n--- | --- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ❓ |\n\n## Quickstart\n\nTry now in [Playground](https://jsbin.com/suwesaliro/1/edit?html,output) :\n```\nhttps://jsbin.com/suwesaliro/1/edit?html,output\n```\n\nNPM install:\n\n```\nnpm i webpeerjs\n```\n\nBrowser `\u003cscript\u003e` tag :\n\nUses built-in JS files from [latest release](https://github.com/nuzulul/webpeerjs/releases/latest) or [CDN](https://www.jsdelivr.com/package/npm/webpeerjs) will make it's exports available as `webpeerjs` in the global namespace.\n\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/webpeerjs@0.1/dist/umd/webpeerjs.min.js\"\u003e\u003c/script\u003e\n```\n\n## Example\n\n```\nimport { webpeerjs } from 'webpeerjs'\n\nvoid async function main() {\n\n\tconst node = await webpeerjs.createWebpeer()\n\t\n\tconsole.log(`My node id : ${node.id}`)\n\t\n\tconst [broadcast,listen,onmembersupdate] = node.joinRoom('globalroom')\n\t\n\tlisten((message,id) =\u003e {\n\t\tconsole.log(`Message from ${id} : ${message}`)\n\t})\n\t\n\tonmembersupdate((data) =\u003e {\n\t\tconsole.log(`Members : ${data}`)\n\t\tbroadcast('hello')\n\t})\n\t\n}()\n```\n\n## API\n\n- `createWebpeer(config)` - Create a new node.\n\t- `config` - Configuration object contain:\n\t\t- `rtcConfiguration` - **(optional)** Custom [rtcConfiguration](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection) for WebRTC transport, currently the only transport available for direct peer-to-peer connectivity between browser.\n- `id` - Get the unique ID of the node as an identity in the global network.\n- `status` - Get the node status, returns `connected` or `unconnected`.\n- `peers` - Get all connected peers.\n- `joinRoom(namespace)` - Join to the room, returns an array of three functions, example : [Broadcaster, onListenBroadcast, onMembersUpdate].\n\t- `Broadcaster` - Function to broadcast message to room members.\n\t\t- Limited to 1 message/second.\n\t- `onListenBroadcast` - Callback function that listen on incoming broadcast message.\n\t- `onMembersUpdate` - Callback function that listen on room members update.\n\n## API Docs\n\n[https://nuzulul.github.io/webpeerjs](https://nuzulul.github.io/webpeerjs)\n\n## Related\n\n- [webConnect.js](https://github.com/nuzulul/webConnect.js) - Auto WebRTC Mesh P2P network without any hassle.\n- [RingsNetwork](https://github.com/RingsNetwork/rings) - Rings is a structured peer-to-peer network implementation using WebRTC, Chord DHT, and full WebAssembly (WASM) support.\n\n## License\n\nMIT\n\n## Maintainers\n\n[Nuzulul Zulkarnain](https://github.com/nuzulul)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuzulul%2Fwebpeerjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuzulul%2Fwebpeerjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuzulul%2Fwebpeerjs/lists"}