Database Overview
HackPortal uses MongoDB with Mongoose as the ODM.
- Development — MongoDB runs in a Docker container; connection string in
config/.env.dev(e.g.MONGODB_URI_LOCAL). - Production — MongoDB Atlas or self-hosted; connection in
config/.env.prod(MONGODB_URI_PRODorMONGODB_URI_LOCALfor containerized prod).
Models cover users, applications, roles, permissions, sessions, and feature flags. Optional fields use defaults so schema evolution is backward-compatible.
Related: Models and schema, Backups and restore