# PeerJS

Simple peer-to-peer with WebRTC.

Repository: https://github.com/peers/peerjs
Canonical: https://ross.abutalabs.com/products/peerjs
Homepage: https://peerjs.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: webrtc, dataconnection, p2p, typescript, parcel, browser, javascript
Last push: 2026-02-27T00:49:47+00:00
Link (homepage): https://peerjs.com
Link (site_page): https://peerjs.com/server/getting-started
Link (site_page): https://peerjs.com/client/getting-started

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 69, release rhythm 8, longevity 100
- inputs: {"age_days": 5001, "days_push": 188, "days_rel": 452, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13431, forks 1462 (observed 2026-08-28T04:11:03.308804+00:00)

## What it is
PeerJS is a JavaScript/TypeScript library that wraps WebRTC into a simple, event-driven peer-to-peer API for data channels and audio/video streams. It pairs with PeerServer, a Node.js signaling server that brokers connections between peers.

## Use cases
- build a browser-based video chat with webrtc
- send files directly between two browsers p2p
- create a peer-to-peer multiplayer game state sync
- screen sharing between peers in the browser
- self-host a webrtc signaling server for peer connections

## When to choose
- you want WebRTC peer connections without writing low-level WebRTC boilerplate
- you need both data channels and media streams in one API
- you want a self-hostable signaling server with Docker/Express support

## When to avoid
- you need SFU-based multi-party conferencing at scale rather than direct peer connections
- your app is server-centric and a plain WebSocket backend suffices
- you need non-JavaScript environments; the client targets browsers and JS runtimes

## Facets
- artifact type: library
- maturity: active
- function: p2p, websocket, rpc
- domain: web-development, networking
- platform: browser, bun
- tags: webrtc, signaling-server, peerjs-server, video-calls, data-channels, nodejs, deno, typescript

## Member repositories
- peers/peerjs (main) score 54
- peers/peerjs-server (backend) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:03.308804+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:18.483701+00:00, confidence not recorded.
  - readme: https://github.com/peers/peerjs (fetched 2026-08-28T04:11:03.308804+00:00, sha 92cb9c81a83d)
  - homepage: https://peerjs.com (fetched 2026-08-29T08:08:52.379327+00:00, sha 090f8c4399de)
  - site_page: https://peerjs.com/server/getting-started (fetched 2026-08-29T08:08:52.390945+00:00, sha 46f10f0126a3)
  - site_page: https://peerjs.com/client/getting-started (fetched 2026-08-29T08:08:52.388953+00:00, sha 207b3b69298b)
  - registry_npm: https://registry.npmjs.org/peerjs (fetched 2026-08-29T08:08:52.392643+00:00, sha 1a3427b93618)
- Data as of 2026-08-30T08:39:29.467469+00:00.
