Database & Schema
Nest uses PostgreSQL with Drizzle ORM for its persistence layer. The schema is designed to balance relational data requirements with zero-knowledge privacy.
TTable Definitions
usersIdentity & BillingStores email and bcrypt-hashed AuthHash.
user_cryptoZK CoreStores salt, wrapped master key, and encrypted metadata blob.
filesCloud PointersStores Jackal Merkle hashes and encrypted file keys.
foldersStructureStores relational hierarchy and encrypted folder keys.
The Graveyard
To support secure deletion and system audits, Nest uses a separate "Graveyard" schema. Metadata for deleted files is moved here to preserve history without cluttering the active filesystem handles. Even in the graveyard, all metadata remains fully encrypted.