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

@solar-republic/kelvin

v0.1.0

Published

Encrypted NoSQL DBMS backed by JSON key-value store written in TypeScript for the Web

Downloads

3

Readme

Kelvin

An encrypted, shardable NoSQL database management system (affectionally referred to as a "Vault") backed by primitive key-value storage, with padded entries and obfuscated storage access.

Background

Designed to meet a very sepcific set of requirements:

  • All contents must be encrypted
  • Backing storage layer is a primitive key-value store, where the values can only be strings/bytes/JSON, e.g., localStorage, chrome.storage.local., and so on
  • Database is self-describing and migrateable, i.e., no client-side dependencies, no hard-coded schemas
  • Allows for arbitrary "intra-and-inter-table" indexes
  • Must treat relations as first-class citizens
  • Must be transactional, idemptotent, and capable of rollback or recovery on failure (e.g., as a result of an interuptted transaction)
  • Must be resistant to storage access pattern analysis

Additional objectives:

  • Minimize storage footprint on disk
  • Simple and developer-friendly API
  • Performant reads

Details:

  • Data is sharded across key-value entries using padded & encrypted "buckets" (all buckets have a constant size on disk, making them indistinguishable from one another)
  • All key-value entries are routinely re-encrypted using nonces, including after each batch of write operations. This helps protect against storage access pattern analysis for writes, however currently no consideration is made for reads
  • The plaintext form of all data and metadata are serialized as JSON (as opposed to a more space-efficient format such as CBOR) in order to take advantage of the inherently more performant JSON ser/de methods. Consequently, tuples (e.g., [a, b]) are often used to store the bulk of data
  • The schema of an object is stored in the metadata of its containing Bucket. This provides the means for applications to be able to read from older versions. Applications can migrate data to new schemas, such as deleting properties, adding new properties, changing property names or types, etc. However, this process is left up to the developer and must be excercised with caution

Terminology relevant to API consumers:

  • Item - roughly equivalent to a Row in RDBMS, or an Object in Document-oriented DBMS. Capable of storing anything that can be serialized to a JSON object
  • Domain - roughly equivalent to a Table in RDBMS. Describes a collection of Items that share the same shape of their top-level object properties (i.e., the shapes of nested objects may differ)

Terminology relevant to contributors:

  • Bucket - logically organizes the storage of Items such that any Domain can be sharded across entries in the backing key-value store
  • Sequence - an immutable, sparse, distinct array of strings where each position corresponds to a value's key, e.g., ["~RESERVED~", "alice", "bob"] represents {1: "alice", 2: "bob"} and its inverse: {"alice": 1, "bob": 2}