finds.dev← search

// the find

jetify-com/typeid

★ 3,591 · Go · Apache-2.0 · updated Dec 2025

Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

TypeID is a UUIDv7 wrapper that prepends a type prefix (e.g. `user_`, `post_`) to every ID, making type confusion bugs impossible at the string level. It's aimed at any backend that currently uses bare UUIDs and wants the debuggability of Stripe-style prefixed IDs without giving up K-sortability or database index locality. The spec is stable at v0.3 and implementations exist across 20+ languages.

UUIDv7 underneath means you get monotonic ordering for free, which matters for B-tree indexes — inserting in time order avoids the page-split churn that UUIDv4 causes at scale. The prefix validation (lowercase snake_case, max 63 chars) is strict enough that `User_` or an empty prefix fails fast rather than silently producing garbage. The formal spec with a test corpus (valid.json / invalid.json) means cross-language implementations can actually be verified against each other, not just hoped to be compatible. CLI tool ships as a single binary, useful for quick debugging without pulling in a library.

This repo is just the spec and CLI — the actual Go library lives at a separate `typeid-go` repo, which is confusing for someone landing here expecting to `go get` something. The C# implementations are all community-maintained and the most recent (firenero/TypeId) targets v0.3 but isn't jetify-official, so .NET users are second-class. There's no guidance on migration: if you have 50M existing UUIDv4 rows in production, the README gives you nothing on how to backfill or run dual-format during a transition. The 63-character prefix limit is arbitrary and undocumented as to why — anyone building a multi-tenant system with long entity names will hit it and have no rationale to point to.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →