GithubHelp home page GithubHelp logo

zesty-io / zuid-specification Goto Github PK

View Code? Open in Web Editor NEW
0.0 9.0 0.0 28 KB

Zesty.io Unique Identifier Specification

Home Page: https://zesty-io.github.io/zuid-specification/

zuid zesty-io headless-cms

zuid-specification's Introduction

ZUID Specification

Zesty Unique Identifiers (ZUID) '/zoo ids/' are used to label each Zesty.io created resource from content to users to media to content fields etc. everything has a ZUID. ZUID are used for data referencing in the user interfaces and rest APIs. ZUIDs are also bound to Audit Trail Logs in the system.

  • A ZUID is a string
  • A ZUID is typically 15-20 characters in length, but may be up to 50 characters
  • A ZUID contains 3 components, separated by hyphens/dashes
  • A ZUID should contain all lowercase alpha characters

Example ZUID:

structure: component1-component2-component3
lengths: maxlen5-maxlen10-maxlen35

e.g. 1-1b123a2f0-qw2n4

Component 1: Entity Prefix

  • Is an integer (ultimately stored as part of a string)
  • Limited to 5 characters.

These string integers are static representations of specific entity types and are provided in each library as some form of constant.

Component 2: Time Encoded as a String

  • Can NOT be seconds based measurement. This is not precise enough for unique hashes.
  • Must be 10 characters
  • Encoded as hexidecimal string like d0f1b38ad3

Example:

Date (and time):
2018-03-23 14:36:18.643025 -0700 PDT m=+0.000811554

In nano seconds:
1521840978643025000

As hex:
"d0f1b38ad3"

Component 3: A Random Alphanumeric String

  • This is a random alphanumeric string.
  • Minimum of 6 character length.
  • Maximum of 35 characters length.
  • It randomly selects from the character set bcdfghjklmnpqrstvwxz0123456789
  • It does not use vowels to avoid forming words in IDs

Libraries

ZUID Entity Prefixes

See prefixes.json for ZUID Entity Prefixes encoded as JSON. This file is the definitive source for prefixes. All other libraries should conform to it.

zuid-specification's People

Contributors

andyfleming avatar ardeay avatar shrunyan avatar simonprickett avatar weienwong avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.