Hacker GitHub

← All repos

jetify-com/typeid

View on GitHub ↗ ★ 3,658 Go

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

21 mentions on Hacker News by 20 people: 5 stories, 16 comments · first 2023-06-28 · latest 2026-03-05

Mentions per year 21 mentions · busiest year 2024 (12)
20082026
  1. TypeID is similar, though it uses the UUIDv7 directly: https://github.com/jetify-com/typeid Maybe the formalization would be interesting to you. It doesn't have a checksum, though, that seems like an improvement that's worth a few bytes.
  2. I prefer TypeID: https://github.com/jetify-com/typeid
  3. I used https://github.com/jetify-com/typeid for generating api keys for a project. They are nice because you can use prefixes for different type of keys and know immediately what they represent. No dashes also makes them easier to copy…
    comment by realaleris149 · 2025-01-10 · in Making Beautiful API Keys
  4. There's a similar proposal called TypeID: https://github.com/jetify-com/typeid E.g.: user_2x4y6z8a0b1c2d3e4f5g6h7j8k
    comment by xdennis · 2025-01-10 · in Making Beautiful API Keys
  5. I went to add your UUID variant to my notes and found https://github.com/jetify-com/typeid The main differences: - typeid allows up to a 63 byte prefix - typeid follows it with a full 128-bit UUID I prefer your implementation generally I…
    comment by llimllib · 2024-07-14 · in ULID: Like UUID but Sortable (2019)
  6. …your database much happier than using long string PK's. 0: https://www.crockford.com/base32.html 1: https://github.com/jetify-com/typeid
    comment by Merad · 2024-06-06 · in You'll regret using natural keys
  7. I feel like https://github.com/jetify-com/typeid is the solution to this
    comment by theophaniel · 2024-06-05 · in You'll regret using natural keys
  8. There’s a project called typeid which implements an ID scheme similar to Stripe. https://github.com/jetify-com/typeid
  9. I’ve seen this sort of design referred to as “typed IDs”: https://github.com/jetify-com/typeid Doesn’t use the crockford encoding, but does is another one that minimises confusables. Definitely looks pretty solid, so keen to give them a…
    comment by FridgeSeal · 2024-04-12 · in ULIDs and Primary Keys (2022)
  10. …But there is always TypeID in the meantime which uses UUIDv7 under the hood: https://github.com/jetify-com/typeid Either way, I am in favor of prefixing and using alternative encodings, but it will need some time to figure out the best
    comment by Daegalus · 2024-04-11 · in The UX of UUIDs
  11. …you could incorporate: - K-sortable: ensures good locality when used as an id in a database (e.x. https://github.com/jetify-com/typeid https://github.com/segmentio/ksuid ) - checksum: primarily useful when an id might be conveyed verbally…
    comment by tlrobinson · 2024-04-11 · in The UX of UUIDs
  12. The author seems to be unaware of TypeID. You can use TypeID and ignore this article. https://github.com/jetify-com/typeid
    comment by shinzui · 2024-04-11 · in The UX of UUIDs
  13. If you want a type-prefixed UUIDv7 type, I can wholeheartedly recommend TypeID-JS: https://github.com/jetpack-io/typeid-js Also available for a whole bunch of other languages: https://github.com/jetpack-io/typeid UUIDv7 is…
  14. …and readable (base32) representation and provides better database locality (K-sortable). [0] https://github.com/jetpack-io/typeid [1] https://github.com/ulid/spec [2] https://github.com/segmentio/ksuid
    comment by ekojs · 2023-09-11 · in You Don't Need UUID
  15. They use a type safe extension of UUIDv7 Here is a go implementation and explanation: https://github.com/jetpack-io/typeid
    comment by techn00 · 2023-09-11 · in You Don't Need UUID
  16. …and retain locality, by using UUIDv7. At jetpack.io we've been doing exactly that via TypeIDs: https://github.com/jetpack-io/typeid and there's a PostgresSQL implementation available. TypeIDs are UUIDv7 with additional type information, so…