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

zdds

v3.2.1

Published

## Zac's Decentralised Data Store

Readme

ZDDS

Zac's Decentralised Data Store

Web interface

I've created an interface to use ZDDS, take a look here:

  • https://www.npmjs.com/package/zdds-interface
  • https://gitlab.com/imzacm/zddsInterface

What is ZDDS?

ZDDS is a data store that can be accessed over the internet. All data is synced to other nodes that the current node knows about.

What is a node?

A node is an instance of ZDDS.

Nodes can be run accross one computer, inside a local network, or over the internet.

There are currently two nodes on the internet:

  • https://radiant-ocean-90908.herokuapp.com:443
  • http://132.148.136.120:3985

Setup (inside a project)

ZDDS can be used as a standalone server, or within a project.

To use it inside a project, do the following:

yarn add zdds
const opts = {} // Add the options below as key/value pairs
const Node = require('zdds').Node
const node = new Node(opts)

Events

The Node class extends EventEmitter, it sends the follwoing events.

| Event | Args | When fired | |---------|--------------------------------------|-------------------------------| | created | Options passed into new Node() | On end of constructor() | | started | port | On end on start() | | stopped | port | One end of stop() | | synced | Types passed into sync() | On end of sync() | | pushed | {key, value} | On end of push() | | deleted | key | On end of delete() | | request | {path, method} | On request to server |

Setup (as a standalone server)

To deploy an instance, follow these steps:

This should run on windows as well, however I don't use windows so it might require different commands.

I recommend using yarn, however npm should work too.

If using npm, change yarn to npm in the below commands.

  • Install NodeJS and optionally Yarn
  • git clone https://gitlab.com/imzacm/Decentralise.git
  • cd Decentralise
  • yarn install
  • yarn start

To install it as a global node module instead, do the following:

yarn global add zdds
zdds

Update

To update ZDDS, there are two options:

If you installed it as a global node module, you can run yarn global upgrade zdds and then restart the server.

If you installed through git, you can run node update.js while the server is running and it will automatically restart.

Options

All options may be set as environment variables or passed in when running the program. For example:

export <var>=<value>
yarn start

Or

yarn start <var>=<value>

port

The default port is 3985 however this can be changed by setting the port option.

host

This is the hostname that the node can be accessed at.

Default

localhost

addInitalNodes

If this is set to a value other than 'true', then initial nodes will not be added before starting.

Default

true

updateTimeout

This is the number of milliseconds between syncing with the known nodes.

This will not stop other nodes from pushing the nodes and data they have to the instance if they know it exists.

Default

10000

startSecondNode

If this is set to true, a second node will be created and run as a publicly available node.

This will be entirely separate from the first node.

Default

true

webSocket

This is the port that a websocket will be opened on. The websocket will always send and receive an object with the following keys:

  • data: data object
  • nodes: nodes object

Default

3986

Available GET endpoints:

  • /info
  • /data
  • /nodes
  • / - loads this readme

Example of GET to /info

HEADERS:

Content-Type: 'application/json'

BODY:

{
  "id": A unique GUID generated the first time the server is started,
  "version": The version of ZDDS running the node,
  "appName": The name in package.json,
  "port": The port the server is running on,
  "protocol": The protocol the server is running on - http or https,
  "host": The ip/domain to access the server
}

Example of GET to /data

SEND HEADERS:

key: The key to retrieve from ZDDS, if undefined then all data will be returned

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

{
  "key": {
    "value": <actaul value>,
    "timestamp": 1517742716662
  }
}

Example of GET to /nodes

SEND HEADERS:

nodeId: The id of a node to retrieve, if undefined then all nodes will be returned

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

{
  "id": {
    "host": The ip/domain the host can be accessed on,
    "port": The port the server is running on,
    "protocol": The protocol the server is using - http or https
  }
}

Example of an error response:

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

{
  "error": "Some error message"
}

Available POST endpoints:

  • /data
  • /nodes
  • /delete

Example of POST to /nodes:

BODY:

{
  "id": {
    "host": The ip/domain the host can be accessed on,
    "port": The port the server is running on,
    "protocol": The protocol the server is using - http or https
  }
}

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

An object containing every node that this node knows about.

Example of POST to /data:

Reserved keys

The following keys are reserved:

  • postId
  • dataObj
  • timestamp

BODY:

{
  "aKey": "a value",
  "postId": The postId needed to overwrite an existing key
}

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

{
  "keyThatWasSent": value,
  "postId": The postId needed to overwrite the key
}

Example of POST to /delete:

BODY:

{
  "aKey": "a value",
  "postId": The postId needed to overwrite an existing key
}

HEADERS:

Content-Type: 'application/json'

timestamp: 1517742716662

BODY:

{}