Skip to main content

Models and Schema

Core entities include User (profile, email, password hash, roles), Application (hacker application data), Role, Permission, Session, and FeatureFlag. Mongoose schemas define validation and indexes.

Schema changes are additive where possible (optional fields with defaults). For breaking changes (e.g. passwordpasswordHash), a migration script runs after restore (see Migrations).

Full model details live in the hacker-portal repo: docs/architecture/data-models.md.


Related: Database overview, Migrations