Introduction
Quid is an unique identifier inspired by ULID and cuid2
info
Quid is designed for human-friendly, versioned, and k-sortable unique IDs, ideal for modern distributed systems.
🚀 Features​
- Version-detectable: The uid can represent the version of item/entity data schema
- K-Sortable: The uid can be K-sortable as it is time-based
- Random-Customizable: The random specification can be customized, by providing a config
- Human-Friendly: Human-friendly writing and reading, as it is represented as base64url
🧬 Quid's Data Structure​
Quid IDs are always 26 fixed characters long, encoded in base64url, and contain version, timestamp, and uniqueness information.
Structure: vvvttttttttUUUUUUUUUUUUUUU
(26 fixed characters, 156 bits)
flowchart LR
A["vvv<br/>Version<br/>3 chars<br/>18 bits"] --> B["tttttttt<br/>Timestamp<br/>8 chars<br/>48 bits"] --> C["UUUUUUUUUUUUUUU<br/>Uniqueness<br/>15 chars<br/>90 bits"]
Section | Characters | Bits | Description |
---|---|---|---|
vvv | 3 | 18 | Version (up to 262,143 versions) |
tttttttt | 8 | 48 | Timestamp (up to ~8,919 years) |
UUUUUUUUUUUUUUU | 15 | 90 | Uniqueness (up to 1.2e27 unique values) |