The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 9 uuidv7 Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
typeid-js
TypeScript implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
-
typeid-go
Go implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
-
typeid-sql
SQL implementation TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
go-uuid
A simple, stdlib only, go module for generating UUIDs (Universally Unique IDentifiers). (by cmackenzie1)
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.
Unfortunately, as of PostgreSQL 16, UUIDv7 are not yet supported out of the box. For the time being, use an extension such as pg_uuidv7 or pg_idkit to generate UUIDv7 e.g. as default primary key when you CREATE new records.
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 UUIDv4-compatible (i.e. you can put a v7 UUID anywhere a v4 UUID would go, like in Postgres's UUID datatype) and is time-series sortable, so you don't lose that nice lil' benefit of auto-incrementing IDs.
And if you use something like TypeORM to define your entities, you can use a Transformer to save as plain UUIDv7 in the DB (so you can use UUID datatypes, not strings), but deal with them as type-prefixed strings everywhere else:
```
Project mention: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs | news.ycombinator.com | 2023-06-28We've now implemented pretty thorough testing: https://github.com/jetpack-io/typeid-go/blob/main/typeid_tes...
Thanks for the feedback!
Project mention: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs | news.ycombinator.com | 2023-06-28The authors have created a specialisation for Postgres that leverages a custom type which is a tuple of type and uuidv7: https://github.com/jetpack-io/typeid-sql/blob/main/sql/typei...
This is more optimal for Postgres while making it slightly more difficult to interop between the db and the language (db driver needs to handle custom types, and you need to inject a custom type converter).
And while there are hacks you can do to make storing uuid-alikes as strings less terrible for db engines, if you want the best performance and smallest space consumption (compressed or not) make sure to use native ID types or convert to BINARY/numeric types.
Project mention: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs | news.ycombinator.com | 2023-06-28
uuidv7 related posts
- ULIDs and Primary Keys
- Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
- Shrink UUIDs with PostgreSQL or Ruby
- Are there trusted non-cryptographic hashing extensions for Postgresql?
- typeid: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
- typeid: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
- Why do so many EF tutorials use GUIDs as primary key?
-
A note from our sponsor - WorkOS
workos.com | 28 Apr 2024
Index
What are some of the best open-source uuidv7 projects? This list will help you:
Project | Stars | |
---|---|---|
1 | typeid | 2,744 |
2 | pg_uuidv7 | 232 |
3 | typeid-js | 207 |
4 | typeid-go | 101 |
5 | uuid6-python | 92 |
6 | uuid-utils | 77 |
7 | typeid-sql | 67 |
8 | typeid-ts | 34 |
9 | go-uuid | 13 |
Sponsored