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

@vaimee/zion

v1.0.0

Published

<picture> <source media="(prefers-color-scheme: dark)" srcset="./doc/logo-dark.png"> <source media="(prefers-color-scheme: light)" srcset="./doc/logo.png"> <img width="50%" alt="Shows a abstract star with on the right Zion name" src="./doc/logo.png"

Downloads

3

Readme

Zion - A scalable Thing Description Directory

Overview

In the context of the W3C Web of Things, Thing Description Directories (TDDs) are services that store a set of Thing Descriptions. A TDD offers a set of APIs with CRUD operations on the collection of TDs that it stores. Zion implements the standard TDD APIs with a set of extensions to cover the use cases of VAIMEE.

Features

Zion employs the best open-source technologies to provide a scalable TDD service. Zion wants to be fast, ease to use and flexible. Currently, Zion supports the following features:

  • Introduction methods :
    • DNS-SD
    • Well-known URL
    • CoRE Link Format and /.well-known/core
  • Standard API:
    • CRUD operations on the collection of TDs
    • JSONPath queries compliant with IETF JSONPath standard draft 5
    • Pagination support
  • Basic support for authentication and authorization

Getting started

Thank you for considering using Zion in your Web of Things project! 🥳. Zion is still in its early stages and it is still in the process of being tested and developed. However, if you already want to deploy on your own you have three options:

Clone and docker compose

You can clone the repository and start Zion using the following command:

docker compose up

If you want to manually set up your database, you can edit the example .env file:

ZION_NODE_ENV=development
# ZION_SERVER_PORT specifies the port number on which the Zion server will listen for incoming requests.
ZION_SERVER_PORT=3000
# ZION_DB_HOST specifies the host address where the Zion target database is located.
ZION_DB_HOST=localhost
# ZION_DB_PORT specifies the port number on which the Zion target database server is listening.
ZION_DB_PORT=5432
# ZION_DB_USER specifies the username to connect to the Zion target database.
ZION_DB_USER=zion
# ZION_DB_PASSWORD specifies the password for the Zion target database user.
ZION_DB_PASSWORD=zion
# ZION_DB_DATABASE specifies the name of the Zion target database.
ZION_DB_DATABASE=zion
# ZION_JWT_SECRET specifies the secret key used for JSON Web Token (JWT) encryption and decryption.
ZION_JWT_SECRET=abc123
# ZION_JWT_EXPIRES_IN specifies the duration for which a JWT token remains valid.
# Examples: "15m" (15 minutes), "1h" (1 hour), "7d" (7 days), etc.
ZION_JWT_EXPIRES_IN=15m

Clone and npm

Requirements Node.js v16+

If you want to start Zion in development mode, you can clone the repository and run the following command:

npm ci
npm start

Note: you have to manually set up your database and configure Zion using the .env file.

Docker compose

You can start Zion right away using this simple docker compose file together with your local .env file :

version: '3.6'
services:
  database:
    image: postgres:14.3-alpine
    environment:
      - POSTGRES_USER=zion
      - POSTGRES_PASSWORD=zion
      - POSTGRES_DB=zion
    container_name: 'zion-postgres'
  zion:
    image: vaimee/zion:latest
    depends_on:
      - database
    entrypoint: ['sh', '-c','npm run db:migrate:latest && npm run start:prod']
    ports: 
      - 3000:3000
    environment:
      - ZION_NODE_ENV=production
      - ZION_SERVER_PORT=3000
      # Using task name as explained in https://github.com/vaimee/zion/issues/11#issuecomment-1434457337
      - ZION_DB_HOST=tasks.database
      - ZION_DB_PORT=5432
      - ZION_DB_USER=zion
      - ZION_DB_PASSWORD=zion
      - ZION_DB_DATABASE=zion
      - ZION_JWT_SECRET=change-me
      - ZION_JWT_EXPIRES_IN=7d
    container_name: zion

Roadmap

  • [ ] Standard API
    • [ ] XPath queries
    • [ ] SPARQL queries supported with an external SPARQL endpoint
    • [x] CoRE introduction method
  • [ ] Experimental API
    • [ ] GEO spatial queries
    • [ ] User private TD collection CRUD
  • [ ] Caching layer
  • [ ] Cluster mode support
  • [ ] Advance authentication
    • [ ] OpenID Connect
    • [ ] OAuth2 Bearer Token

Other minor features are listed in the Issue tracker with the label feature.

Contributing

Thank you for considering contributing to Zion. Please follow the guidelines in the CONTRIBUTING.md file.

Contact

Lorenzo Gigli - @hyperloris - [email protected]

Cristiano Aguzzi - @relucri - [email protected]

VAIMEE - @MaVaimee - [email protected]

Acknowledgments

DESMO-LD

Zion is founded by the DESMO-LD project inside the ONTOCHAIN European organization part of the Next Generation Internet fund.