PRD-003: Personal Journaling
| Field | Value |
| ID | PRD-003 |
| Title | Personal Journaling |
| Status | Draft |
| Owner | Loryth Team |
| Created | 2026-02-18 |
1. Problem Statement
Most journaling apps treat entries as unstructured text, making it impossible to track patterns in mood, habits, or well-being over time. Apps that do support structured data (mood ratings, habit checkboxes) are typically cloud-only, subscription-based, and offer limited customization. Users who journal for mental health or self-improvement want structured capture with personal insights — without giving a third party access to their most private thoughts.
Loryth's journal service combines free-form entries with structured data capture (metrics, guided flows, multiple item types), offline-first sync, and privacy controls — all self-hosted.
2. Target Personas
| Persona | Priority | Relevance |
| Mindful Planner | Primary | Daily journaling with mood tracking and guided flows |
3. User Stories
4. Functional Requirements
| ID | Requirement | Priority |
| FR-1 | Create entries with multiple item types: note, measurement, rating, enum, multi_choice, ranked_choice, attachment_ref, activity_ref | Must |
| FR-2 | EntryItem envelope with item_type, schema_version, and JSONB payload for extensibility | Must |
| FR-3 | Guided flows with ordered prompts that produce structured entry items | Must |
| FR-4 | Custom metric definitions per journal with type (numeric, rating, enum) and scale | Must |
| FR-5 | Journal-level privacy: private_to_user or space_visible | Must |
| FR-6 | Insight projections: metric_point, set_point, ranked_point, daily_rollup | Should |
| FR-7 | Multiple journals per space with independent metric definitions | Should |
| FR-8 | Offline sync via idempotent UUID-based upserts and optimistic concurrency (revision) | Should |
| FR-9 | Time-range entry support via occurred_at and optional occurred_until | Must |
5. Non-Functional Requirements
- Entry creation must work offline on mobile with eventual consistency
- Sync conflicts must resolve without data loss (last-write-wins with revision checking)
- Insight projections must recompute incrementally, not from scratch
6. Acceptance Criteria
7. Out of Scope
- AI-generated journal prompts or automatic mood detection
- Social sharing or public journal features
- Rich text editing (entries use plain text and structured items, not WYSIWYG)
- Data export to third-party journaling formats
8. Traceability
9. Open Questions
- Should flows support conditional prompts (skip a prompt based on a previous answer)?
- How should metric definitions handle retroactive changes (e.g., changing a scale from 1-5 to 1-10)?
- Should journal export be a first-class feature or a plugin concern?
10. Changelog
| Date | Change |
| 2026-02-18 | Initial version |