Overview
The DeltaHacks Portal uses Prisma as the ORM with CockroachDB as the database. The schema is defined inprisma/schema.prisma and includes models for authentication, applications, reviews, judging, events, and equipment tracking.
Database Provider
- PostgreSQL compatibility
- Horizontal scalability
- Built-in replication
- Serverless deployment options
Core Authentication Models
These models are required by NextAuth.js for session management.User
The central user model that links to all other user-related data.id- CUID (Collision-resistant Unique Identifier)role- Array of roles for RBAC (defaults to[HACKER])qrcode- Unique integer for QR code generationtypeform_response_id- Legacy field for Typeform integration
Account
Stores OAuth provider account information.- Discord
- GitHub
- Azure AD
Session
Manages user sessions.VerificationToken
For email verification (NextAuth).Application Models
The portal maintains separate application models for each year of DeltaHacks.DH10Application (2022)
DH10Application (2022)
DH11Application (2024)
DH11Application (2024)
DH12Application (2025)
DH12Application (2025)
Review Models
Review (Legacy)
Review (Legacy)
DH11Review
DH11Review
DH12Review
DH12Review
Judging System Models
Project
Project
Track
Track
ProjectTrack (Join Table)
ProjectTrack (Join Table)
Table
Table
TimeSlot
TimeSlot
JudgingResult
JudgingResult
RubricQuestion
RubricQuestion
RubricResponse
RubricResponse
Event Management Models
EventLog
EventLog
Station
Station
EquipmentLog
EquipmentLog
Configuration
Enums
Role
Status
IN_REVIEW- Default stateREJECTED/WAITLISTED/ACCEPTED- Review decisionRSVP- Accepted and confirmed attendanceCHECKED_IN- Arrived at event
YesNoUnsure
EquipmentType
EquipmentAction
Entity Relationship Overview
Database Operations
Generate Prisma Client
Push Schema to Database
Create Migration
Deploy Migrations
Open Prisma Studio
See Also
- Architecture Overview - System architecture
- tRPC API - API layer using Prisma
- Contributing - Database change guidelines