Knowledge Base
For Developers
Data Model Principles
Core data domains and design rules that govern the JJI data model.
Core domains
- Users & Auth: User accounts, authentication providers, sessions
- Accounts: Live accounts, master accounts (prop-firm), phase accounts
- Trades: Trade records with P&L, instruments, timestamps, tags
- Journal: Daily notes, trade notes, screenshots, emotions
- Prop Firm: Challenge phases, objectives, payouts, breach records
- Dashboard: Widget configurations, templates, filter states
- Goals: Goal definitions and progress tracking
- Notifications: Notification records and delivery state
Key design rules
- All data is user-scoped - every table includes a user_id foreign key
- Soft deletes where possible for audit trail
- Aggregation happens server-side, not in the client
- Timestamps are stored in UTC, converted to user timezone at render
- Database migrations are managed through Prisma