What is chronoid?
chronoid is a distributed unique ID generator inspired by Twitter's Snowflake ID scheme. It produces 64-bit, time-sortable, unique IDs suitable for distributed systems — with one key difference in how time is encoded.
Instead of storing a raw millisecond offset from a fixed epoch, chronoid decomposes the timestamp into human-readable calendar components — year, day-of-year, minute-of-day, and millisecond-of-minute — packed efficiently into 44 bits.
The result is an ID that is:
- Time-sortable — lexicographic order reflects chronological order
- Human-inspectable — timestamp components are directly readable from the ID without full decoding
- Distributed-safe — node and worker fields ensure uniqueness across a cluster
- Long-lived — 256-year range anchored at a configurable base year
Getting Started
Installation
Usage
use ;
async
License
MIT