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

linked-data-registry

v0.11.0

Published

A CouchDB powered registry for linked data

Readme

linked data registry

A CouchDB powered registry for linked data.

NPM

A client is available here.

Registry API

GET /

Return the JSON-LD context used by the registry.

GET /about

Return a JSON-LD document describing the registry and its potential actions using schema.org.

PUT /users/{username}

Register an user. A user has to be a Person.

request body:

{
  "@context": "https://dcat.io",
  "@id": "users/{username}"
  "@type": "Person",
  "password": "secret"
  "name": "John Markup",
  "email": "mailto:[email protected]",
  ...
}

response body:

{
  "@context": "https://dcat.io",
  "@type": "RegisterAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/{username}",
  "object": ""
}

Note: relative URLs are relative to a @base of https://dcat.io specified in the context.

DELETE /users/{username}

Unregister an user.

required header:

  • Authorization

response body:

{
  "@context": "https://dcat.io",
  "@type": "UnRegisterAction",
  "actionStatus": "CompletedActionStatus",
  "agent": {
    "@type": "Person",
    "email": "mailto:[email protected]
  },
  "object": ""
}

GET /users/{username}

Get a user public profile.

PUT /{namespace}

Create a new JSON-LD document of @id {namespace}.

If a version property is specified in the document, the document will be versionned that is each update will require a new version value to be published. When appropriate version number SHOULD follow semantic versionning.

If a version property is not specified, the new document will replace the previous version irreversibly.

required header:

  • Authorization

request body:

{
  "@context": "https://dcat.io",
  "@id": "{namespace}",
  ...
}

Note to be valid a document need at least:

  • a @context of value https://dcat.io
  • an @id

response body:

{
  "@context": "https://dcat.io",
  "@type": "CreateAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/{username}",
  "result": "namespace"
}

DELETE /{namespace}{?version}

Delete a document of @id {namespace} and version {version}. If version is omitted all the versions will be deleted.

required header:

  • Authorization

response body:

{
  "@context": "https://dcat.io",
  "@type": "DeleteAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/john",
  "object": "{namespace}{?version}"
}

GET /{namespace}/{+pathorurl}{?version}

Get a JSON-LD document of @id {namespace} or a node of this document of @id {namespace}/{pathorurl} or {pathorurl}. In the later case, {pathorurl} has to be an absolute URL encoded as an Uniform Resource Identifier (URI) component.

A specific version can be specified using a query string parameter version whose value is properly encoded as a Uniform Resource Identifier (URI) component. In case the document is versionned following Semantic Versioning, a range (e.g <0.0.1) can be specified as version.

If {?version} is omitted, the latest version of the document is returned.

Depending on the Accept header, documents retrieved from the registry can be served as JSON-LD (expanded, compacted or flattened) or, JSON interpreted as JSON-LD.

GET /maintainers/ls/{namespace}

List the maintainers of a JSON-LD document with @id {namespace}.

response body:

{
  "@context": "https://dcat.io",
  "@id": "{namespace}",
  "accountablePerson": [
    { "@id": "users/john", "@type": "Person", "name": "John Markup", "email": "mailto:[email protected]" },
    ...
  ]
}

POST /maintainers/add/{username}/{namespace}

Add a maintainer of @id users/{username} to the document of @id {namespace}.

required header:

  • Authorization

response body:

{
  "@context": "https://dcat.io",
  "@type": "GiveAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/{me}",
  "object": "{namespace}",
  "recipient": "users/{username}"
}

POST /maintainers/rm/{username}/{namespace}

Remove a maintainer of @id users/{username} to the document of @id {namespace}.

required header:

  • Authorization

response body:

{
  "@context": "https://dcat.io",
  "@type": "TakeAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/{me}",
  "object": "{namespace}",
  "recipient": "users/{username}"
}

Raw data storage API

PUT /r/{sha1}

Publish a resource whose SHA-1 message digest (encoded in hex) is {sha1}.

required headers:

  • Authorization
  • Content-MD5
  • Content-Type
  • Content-Length
  • Encoding (if any)

response body:

{
  "@context": "https://dcat.io",
  "@type": "CreateAction",
  "actionStatus": "CompletedActionStatus",
  "agent": "users/{username}",
  "result": "r/{sha1}"
}

GET /r/{sha1}

Download raw data.

Search API

GET /search/{?keywords}

Search JSON-LD documents by keywords.

Tests

You need couchdb running with an admin defined in env.sh (COUCH_ADMIN_USER and COUCH_ADMIN_PASS) (see env.sh)

couchdb
source env.sh
npm run init
npm run push
npm start
npm test

License

Apache 2.0.