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

cryptpad-server

v0.0.1

Published

CryptPad Server

Readme

Prototype: Scalable Server for CryptPad

This repository contains a distributed server prototype for CryptPad. This is still in progress exploratory work.

Architecture

Taxonomy

The new server architecture is composed of three types of nodes:

  • Core: these nodes take care of most of the computations and internal communication handling. They are connected to the other type of servers.
  • Front: these nodes catch the different queries from the outside and forward them to the core nodes for processing.
  • Storage: these nodes are responsible for accessing and serving a fraction of the (encrypted) data for CryptPad. They are also doing light computation if they can be done in place without too much pressure on them.

Topology

The core nodes are connected to both ws and storage nodes, but the latter two cannot communicate directly.

Configuration

The configuration can be done using the Config argument, which will store the graph topology of the nodes.

Using websockets for communication, this variable looks like this:

let Config = {
    infra: {
        ws: [{
            host: 'localhost',
            port: 3010
        }],
        core: [{
            host: 'localhost',
            port: 3011
        }, {
                host: 'localhost',
                port: 3012
            }],
        storage: [{
            host: 'localhost',
            port: 3014
        }]
    }
};

The above configuration describes a network comprised of 4 nodes, having one front node on port 3010, 2 core servers on port 3011 and 3012 and a storage node accessible via port 3014.

In addition, launching a server requires setting the field myId with your identifier, which will be of the form type:id. For instance, in the first core node (the node listening on port 3011), it would be Config.myId = 'core:0'.

Usage

Before first use, you may want to install the dependencies with:

npm install

To spawn the server topology described in ws-config.js, run the start script:

npm run start

Alternatively, you can the new servers manually. You first need to start the core nodes with the following command.

node core/index.js

Then you can start a ws and storage nodes in any order:

node storage/index.js
node front/index.js

Tests

The directory tests contains some unit and integration tests scripts and files.

  • interface.test.js: test the communication interface by implementing a simple ping-pong protocol that computes the time it takes to go back and forth in the network.

The aforementioned tests can be run with the following command (make sure to have installed the dependencies with npm install beforehand):

npm run tests