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

v1.0.1

Published

CryptPad Server

Readme

This repository contains the code for CryptPad server.

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 front and storage nodes, but the latter two cannot communicate directly (only on the same layer).

Configuration

The configuration can be done in config/infra.js, which will store the graph topology of the nodes and how to connect to them.

Using websockets for communication, please look at config/infra.example.js for explanations.

Usage

To be used in CryptPad, this repository releases are available on npm: https://www.npmjs.com/package/cryptpad-server

You can also use it in standalone mode for development purpose. The client code should be present in ../cryptpad/ or in a clientRoot property as a string in config/config.js. Before first use, you may want to install the dependencies and build the code with:

npm install
npm run build

To spawn the server topology described in infra/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.

For that to work, you need to have a shared key between the different nodes to authenticate them, which can be generated with:

openssl rand -base64 32

Then add the resulting random bytes in private.nodes_key property in your config/config.js.

node index.js --type core --index 0

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

node index.js --type front --index 0
node index.js --type storage --index 0
node index.js --type front --index 1
node index.js --type storage --index 2
node index.js --type storage --index 1

Alternatively, you can identify different sets of nodes with the serverId property of their corresponding nodes in config/infra.js, and start a subset of them sharing the same serverId with:

node index.js --server [serverId value]

Tests

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

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

npm run test