npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-braehleros

v1.0.1

Published

BrählerOS conference system client — speaker list, request queue, and live events

Readme

node-braehleros

Node.js client for the BrählerOS conference management system. Connects to the system's TCP port, receives the full conference state on startup, then streams live events as delegates request to speak, are granted the floor, or are removed.

Zero dependencies. Pure Node.js built-ins only (net, events, crypto).

Install

npm install node-braehleros

Quick start

const { BraehlerClient } = require('node-braehleros');

const ac = new AbortController();
const client = new BraehlerClient({ host: '192.168.1.100' });

client.on('ready', (state) => {
  console.log('Requests:', state.requests);
  console.log('Delegates:', state.delegates);
});

client.on('speaker:added',   (e) => console.log('Now speaking:', e.delegate?.first, e.delegate?.last));
client.on('speaker:removed', (e) => console.log('Done speaking:', e.seat));
client.on('request:added',   (e) => console.log('Request #' + (e.position + 1), e.delegate?.last));
client.on('request:removed', (e) => console.log('Request withdrawn:', e.seat));

client.connect(ac.signal);

// Disconnect cleanly
// ac.abort();

API

new BraehlerClient(options)

| Option | Type | Default | Description | |---|---|---|---| | host | string | required | IP address or hostname of the BrählerOS server | | port | number | 400 | TCP port (ConfClientServicePort) | | connectTimeout | number | 10000 | ms before TCP connection attempt is abandoned | | handshakeTimeout | number | 30000 | ms from connect to receiving full initial state | | reconnect | boolean | true | Automatically reconnect on disconnect | | reconnectBaseDelay | number | 1000 | Initial reconnect delay in ms | | reconnectMaxDelay | number | 30000 | Maximum reconnect delay in ms | | reconnectBackoff | number | 1.5 | Exponential backoff multiplier |

client.connect([signal])this

Opens the connection. Pass an AbortSignal to control the lifetime of the client — aborting permanently disconnects and stops all reconnect attempts.

const ac = new AbortController();
client.connect(ac.signal);

// later:
ac.abort(); // clean disconnect, no more reconnects

client.disconnect()

Equivalent to aborting the signal passed to connect().

client.getState()object

Returns a full JSON-serialisable snapshot of the current state.

{
  conference:    { id: 16, state: 4 } | null,
  speakers:      [ /* Entry[] */ ],
  requests:      [ /* Entry[], ordered by queue position */ ],
  interventions: [ /* Entry[] */ ],
  delegates:     { [seat]: Delegate },  // all known seat→delegate mappings
  ready:         true
}

client.getSpeakers()Entry[]

client.getRequests()Entry[]

client.getInterventions()Entry[]

Return copies of the respective live lists.

client.getDelegates(){ [seat]: Delegate }

All seat→delegate mappings loaded from the server. Keys are seat numbers (integers as strings when JSON-serialised).

client.getDelegate(seatNum)Delegate | null

Look up the delegate assigned to a specific seat number.

client.isReady()boolean

true once the initial state has been fully received.


Events

Lifecycle

| Event | Payload | Description | |---|---|---| | connected | — | TCP connection established | | licensed | { version } | Server accepted the connection; version is the server version string | | disconnected | — | Socket closed | | reconnecting | { attempt, delay } | About to reconnect; delay is the wait in ms | | error | Error | Socket or protocol error | | parse-error | { cmd, len, err } | A packet could not be parsed (connection stays open) |

State

| Event | Payload | Description | |---|---|---| | ready | state (full snapshot) | Initial state fully loaded; same object as getState() | | conference:state | { id, state } | Conference state update from the server |

Speaker list

| Event | Payload | |---|---| | speaker:added | Entry | | speaker:removed | Entry |

Request queue

| Event | Payload | |---|---| | request:added | Entry | | request:removed | Entry |

Intervention list

| Event | Payload | |---|---| | intervention:added | Entry | | intervention:removed | Entry |


Data shapes

Entry

{
  seat:     97,          // conference seat number
  position: 0,           // 0-based position in the list
  delegate: Delegate | null
}

Delegate

{
  id:    101839,
  first: 'Jane',
  last:  'Doe',
  org:   'Example Org'
}

Reconnect behaviour

The client uses exponential backoff between reconnect attempts:

attempt 1 →  1.0s
attempt 2 →  1.5s
attempt 3 →  2.25s
...
attempt N →  min(baseDelay × backoff^N, maxDelay)

A successful connection resets the attempt counter. If the server explicitly denies the license, reconnect is disabled automatically.


Requirements

  • Node.js ≥ 14
  • Network access to the BrählerOS server on port 400