Skip to content
Welcome to Peerix

Welcome to Peerix

May 6, 2026·Anton
Anton

My name is Anton and I’m a software engineer with over twenty years of experience with software development. Today, I’m excited to announce the first release of Peerix, a JavaScript/TypeScript open-source library designed to simplify building WebRTC peer-to-peer applications. After months of development and testing, Peerix is now available for developers to use and contribute to.

Background

Over ten years ago, I started building peer-to-peer web applications using WebRTC. It was an exciting but often frustrating journey, as I had to repeatedly solve the same problems around signaling, connection management, and media/data exchange across browsers and devices. However, from time to time, something went wrong. I wanted a simpler way to build these apps without reinventing the wheel every time, but existing libraries didn’t quite fit the bill.

That’s exactly why we created Peerix, which brings all of this expertise together. It abstracts away the complexities of WebRTC and provides a clean, minimal API for building peer-to-peer apps quickly and reliably. Whether you’re building a simple chat app, a video conferencing service, a collaborative tool, or a more sophisticated multi-stream, multi-channel experience, Peerix aims to make it easier to get up and running without getting bogged down in the details of signaling and connection management. I’m excited to share it with the community and see what you build with it!

Currently, Peerix implements a core functionality around WebRTC and peer-to-peer connections. But even now, it supports a wide range of use cases, from simple data sharing to multi-stream media applications. The core API is designed to be minimal and intuitive, with sensible defaults for signaling and connection management. Just few lines of code are needed to get started. In the future, we plan to add more features and add-ons, such as recording, storage, and state synchronization, as well as additional signaling drivers to further enhance the capabilities of Peerix.

Why Peerix

WebRTC is powerful but complex. Most apps re-implement the same boilerplate: signaling channels, ICE configuration, connection lifecycle, and multi-track negotiation. That complexity slows prototyping, increases bugs, and raises the barrier for developers who just want to share media or data peer-to-peer.

Interestingly, there are not so many libraries that can suggest you a clean, well-documented abstraction over WebRTC including all modern concepts like multi-track, data channels, and pluggable signaling. Many libraries focus on specific use cases (e.g., video calls) or require server-side components (e.g., SFUs). Peerix fills the gap for a flexible, transport-agnostic client-side library that abstracts away the common complexities of WebRTC while still allowing you to build a wide range of peer-to-peer applications.

The problem it solves

Typical WebRTC apps face several challenges:

  • Repetitive signaling code and fragile connection logic.
  • Hard-to-manage negotiations of multiple media streams and data channels across multiple peers.
  • STUN/TURN and reconnection complexities that leak into app code.
  • Extra boilerplate for additional functionality like recording, storage, state synchronization, etc.

Peerix centralizes these concerns in a single Peer class and a pluggable driver model for signaling, so the same API works locally (MemoryDriver), between tabs (BroadcastChannelDriver), or across the internet (NATS driver or custom drivers). It can be extended with add-ons without modifying your core app logic.

Core idea

Peerix provides a simple yet powerful abstraction of WebRTC and extends its capabilities with add-ons, all while keeping the API minimal and transport-agnostic.

At the heart of Peerix is a simple principle: one-to-many peer connections involve a single connection per peer and multiplex media tracks and data channels over that connection. This reduces signaling chatter and avoids creating multiple redundant peer connections for each stream or channel. The pluggable driver model abstracts away the signaling transport, allowing you to choose or implement the one that best fits your use case without changing your app code. The library exposes clear lifecycle events so that apps can react declaratively.

Advantages

Let’s summarize the key advantages of Peerix:

  • Minimal API surface: quick to learn and integrate.
  • Pluggable signaling drivers: swap BroadcastChannel, NATS, or your own driver over WebSockets.
  • Single-connection multiplexing: efficient resource use and simpler negotiation.
  • Flexible: share multiple streams, open multiple data channels, and attach add-ons to extend functionality.
  • Reasonable defaults: sensible ICE setup with easy overrides for STUN/TURN and advanced configs.

Who is it for

Peerix is for developers building real-time apps such as chat, conferencing, file sharing and collaborative tools, as well as gaming apps, who want to avoid reimplementing signalling and connection plumbing, and who need a flexible, extensible foundation for peer-to-peer communication in the browser. If you want to build peer-to-peer web apps without reinventing the wheel, Peerix is for you.

When not to use it

If you need server-side media processing or routing. Peerix is not an SFU (Selective Forwarding Unit) or MCU (Multipoint Control Unit).

License

Peerix is dual-licensed under an open source license and a commercial license. This means that you can choose to use Peerix under the terms of the GPLv3, which allows you to use, modify, and distribute the software freely as long as you comply with the GPLv3 requirements.

Alternatively, if you need to use Peerix in a proprietary application or want to avoid the obligations of the GPLv3, you can purchase a commercial license from us.

Why dual licensing? It allows us to support the open source community while also providing a sustainable business model to fund ongoing development and support for Peerix. We believe in the power of open source and want to make Peerix accessible to as many developers as possible, while also ensuring that we can continue to invest in its growth and improvement.

Why GPLv3? The GPLv3 is a widely used copyleft license that ensures that any modifications or improvements to Peerix will also be shared with the community. This fosters collaboration and innovation, as developers can build upon each other’s work and contribute back to the project. By using the GPLv3, we can ensure that Peerix remains free and open for everyone to use and contribute to.

Future plans

In the future, we plan to expand Peerix with additional features and signaling drivers. Some of the upcoming features include:

  • Additional signaling drivers: customizable WebSockets driver, Socket.IO driver, Supabase driver, and more.
  • Recording add-on: easily record media streams or data channels.
  • State synchronization add-on: keep application state in sync across peers.
  • Video/audio mixing add-on: mix multiple media streams together for composite outputs.

Get started

A code snippet to illustrate how simple it is to get started with Peerix:

import { Peer, BroadcastChannelDriver } from 'peerix';

// create a signaling driver
const driver = new BroadcastChannelDriver();

// create a Peer instance
const peer = new Peer({ driver });

// listen for events
peer.on('channel:open', ({ channel }) => channel.send('hello'));
peer.on('channel:message', ({ data }) => console.log('msg', data));

// open a data channel
peer.open({ label: 'chat' });

// join a room
peer.join({ room: 'room-id' });

See the Getting Started guide to install Peerix and try it in your browser. Contributions, issues, and driver add-ons are welcome — Peerix aims to be a practical, community-driven toolkit for peer-to-peer web apps.

Welcome aboard — now let’s make peer-to-peer apps easier.

Conclusion

Eventually, we hope Peerix will become a go-to library for developers building peer-to-peer web applications, providing a solid foundation that abstracts away the complexities of WebRTC while still allowing for flexibility and extensibility. We look forward to seeing what the community builds with Peerix and welcome contributions to help make it even better.