Hey everyone!
I’m Lara, a Belgian web developer, and this is the very first repo I’ve kicked off entirely on my own. I wanted a compact, drop-in unique ID you can stash in any database and have sort itself—no extra tricks needed. UUIDs felt bulky, ULIDs a bit low on randomness, so I thought: why not stick to 26 chars, switch to Base36, and pack in 96 bits of cryptographic entropy? That’s Pikaid in a nutshell.
🎯 The Problem
- UUIDs are 36 characters with dashes, and you need extra logic to sort them.
- ULIDs nail the 26-char size and sorting, but cap out at 80 bits of randomness.
- We’re often forced to pick between length, sortability, or entropy.
Putting those elements together in the mixer, I created a single ID that’s:
- 26 chars long
- Sortable by creation time out of the box
- Packed with 96 bits of randomness
- Simple: just 0–9a–z, no extra symbols
🔧 Meet Pikaid
- Length: 26 chars
- Alphabet: lowercase Base36 (0–9, a–z)
- Structure: 7 chars timestamp (seconds since epoch, Base36, zero-padded), 19 chars randomness (96 bits, Base36, zero-padded)
- Sortable: lex order = creation time
- Secure: ~7.9×10²⁸ combos → collisions are practically impossible
⚡ Quickstart (PHP)
<?php
use Pikaid\Pikaid;
require 'vendor/autoload.php';
$id = Pikaid::generate();
echo $id; // e.g. 'kfz1w5x0ab9c23d4e5f6g7h8ij'
JavaScript version coming soon—stay tuned!
🚀 Roadmap & Contributions
I’m working on:
- Full JS implementation
- ???
This is my first public repo, so I probably messed up a few things. Please:
- Flag any unclear spots in the spec
- Suggest extra use cases or edge cases
- Open issues & PRs with ideas
- Guide me on open-source best practices
Your feedback will help me level up and make Pikaid rock-solid.
🔗 Get Involved
👉 Specifications Repo: GitHub →
👉 PHP Repo: GitHub →
👉 License: MIT
Big thanks for giving Pikaid a spin! I hope you find it useful—drop your thoughts, point out any mistakes, and let’s build something awesome together.
Top comments (0)