Skip to content
/ zion Public
forked from vaimee/zion

A scalable Thing Description Directory

License

Notifications You must be signed in to change notification settings

JKRhb/zion

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shows a abstract star with on the right Zion name

CI status Issues License Discord chat LinkedIn eslint support prettier

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.

Table of Contents
  1. Features
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Contact
  7. Acknowledgments

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
    • 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.

About

A scalable Thing Description Directory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.4%
  • CSS 13.1%
  • HTML 2.6%
  • Other 0.9%