Skip to content

UUID & Data Integrity

In Pyxis CMS, all primary keys in the database are based on the UUID v4 (Universally Unique Identifier) standard.

  1. API Security (ID Enumeration): Using UUIDs prevents users from “guessing” the URLs of other resources. In a system with integer IDs, changing /api/users/10 to /api/users/11 would allow for easy unauthorized access attempts (known as IDOR attacks).
  2. Monorepo Safety: The Next.js frontend operates on unique strings, which hides the internal database structure and prevents data leakage.
  3. Native PostgreSQL Support: We utilize the native uuid data type, which ensures optimal indexing performance while maintaining global uniqueness across different services.