-
Notifications
You must be signed in to change notification settings - Fork 8
05 Domain Model
Vicky Patel edited this page Sep 14, 2026
·
1 revision
Structural overview of PACT OS core domain entities and relational mappings.
erDiagram
PROFILES ||--o{ GOALS : owns
PROFILES ||--o{ PROJECTS : owns
PROFILES ||--o{ TASKS : owns
PROFILES ||--o{ FINANCE_TRANSACTIONS : owns
PROFILES ||--o{ HABITS : owns
PROFILES ||--o{ FOCUS_SESSIONS : owns
GOALS ||--o{ PROJECTS : contains
PROJECTS ||--o{ TASKS : contains
TASKS ||--o| COMMITMENTS : binds
COMMITMENTS ||--o| CONSEQUENCES : seals
COMMITMENTS ||--o{ EXTERNAL_PROOF_SUBMISSIONS : verifies
HABITS ||--o{ HABIT_LOGS : records
-
Profile (
profiles): Represents a registered user. Holds timezone, focus areas, reflection schedule, and review day preferences. Tied 1:1 to Supabaseauth.users.
-
Goal (
goals): Strategic objective with progress percentage and target date. -
Project (
projects): Initiative grouping related tasks with a designated accent color (color_accent). -
Task (
tasks): Action item with priority (low,medium,high,urgent), status (pending,in_progress,completed,missed,archived), scheduled window, and deadline (deadline_at). -
Commitment (
commitments): Binding accountability wrapper for a task with a status (active,completed,breached,waived). -
Consequence (
consequences): Pre-configured penalty bound to a commitment. Stores encrypted payload and activation state (is_activated). -
External Proof Submission (
external_proof_submissions): Verifiable proof-of-work record submitted via GitHub, LeetCode, or Codeforces.
-
Finance Transaction (
finance_transactions): Individual cashflow entry. Stores integer cents (amount_cents), type (income,expense,transfer), date, and category. -
Finance Category (
finance_categories): Income or expense category with an HSL color tag. -
Finance Budget (
finance_budgets): Category envelope spending limit (limit_cents).
-
Habit (
habits): Recurring discipline target with target frequency and streak metrics. -
Habit Log (
habit_logs): Individual completion record for a habit on a specific date. -
Daily Routine (
daily_routines): Morning/evening routine container holdingroutine_items.
-
Focus Session (
focus_sessions): Deep work session log recording target vs. actual seconds, timer state, and linked task. -
Weekly Review (
weekly_reviews): Guided 5-step reflection log capturing carryover decisions, priority commitments, and weekly score summary.
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Beginner Issue Catalog | Design System | Open Issues |
| Production Deployment | API Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Governance |
- Codebase Tour
- Domain Model
- Database Architecture
- Security Model
- Financial System
- Consequence System
- External Integrations
- Discipline Intelligence
- Data Portability & Sync