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 🙏

© 2024 – Pkg Stats / Ryan Hefner

braid-server

v0.4.16

Published

A federated server for interconnecting collaboration apps

Downloads

51

Readme

Braid Server

Braid is a cross-platform solution for collaboration in a new way -- based on three principles:

  • You should be in control of your information rather than having to trust any one cloud provider.
  • We favor simplicity over deep feature integration. People won't use features they don't understand anyway.
  • You should have a lot of choice over the sharing components -- even inventing your own.

This project is an open-source implementation of a server that implements the Braid protocol. This implementation is built on node.js and its only mandatory external dependency is MongoDB.

If you want to learn a lot more about Braid, visit our wiki

Installation

To run a braid server, you will need the following prerequisites:

  • MongoDB: You need to be run an instance of MongoDB
  • node.js: Braid is written entirely in javascript and run using node.js. You need to have node installed.
  • npm: Braid depends on various node.js libraries that are not included in this repository. npm is installed as part of node.js.

Once you have the prerequisites in place, follow these steps:

  • Make sure you have an instance of MongoDb running. It can be on the same server or elsewhere.

  • Install braid-server:

$ npm install braid-server -g

(Note: you may need to use sudo on Mac systems.)

  • Run braid-server:
$ braid-server -d <domain>

Alternatively, if you want more control over the configuration, you can copy config.json from the braid-server installation, make changes, and then start braid-server using:

$ braid-server -c <path-to-config-file>

Getting Started

To get started, try out your braid server using the simple built-in test client. Assuming you used the default port assignments, you can now point a web browser to http://localhost:25555. This should open up the server's website. On that page, you'll see a link to a test client. Click on it.

This test client lets you connect to the server as a braid client running inside your browser. It does very little, but allows you to see the basic interactions between a client and server.

  1. Open the browser's inspector and choose the Console tab so you can see what is happening between client and server.
  2. Click on 'hello' to connect to the server and issue a 'hello' request.
  3. Enter credentials (e.g., 'joe', 'password'), check the 'register' box, and click 'connect'.
  4. Once connected, additional panels will be displayed showing more things you can now do.
  5. Open a second browser with a different browser identity (incognito if you prefer) -- so that browser cookies are distinct.
  6. In the second browser, point to the same address and navigate to the test client.
  7. Enter a second set of credentials (.e.g, 'bob', 'password'), check the register box, and click 'connect'.
  8. Now you have two active clients against the same server.
  9. In the first browser, under Instant Messages, enter 'bob' in the 'recipient' field and enter a message then click 'send'.
  10. In the second browser, you should see the message from joe appear.
  11. To see subscriptions in action, try entering a userId in the subscribe area and click 'subscribe'. Then refresh your browser and see how the other user receives notifications (in the inspector window).

Note that you can't federate your braid server until you can update DNS entries so that the server is associated with the braid service.

Learn more on our wiki

Status

The server is still under development. At this point, the server supports:

  • Accounts: registration and authentication of accounts within a domain
  • Subscriptions: a user can subscribe someone else to their presence
  • Presence: subscribers are notified when sessions start and end for one of the people they are subscribed to
  • Message delivery: clients can send braid-compatible messages to each other, using unicast or multicast
  • Federation: braid servers for different domains can talk to each other and exchange messages between their clients
  • File services: clients can upload and download files using HTTPS, optionally performing encryption in either case
  • Tiles: tiles are a way for distributed collaboration apps to maintain synchronized shared state information