# 86 — Journal module ## Goal Ship a per-user journal module with entries, mood tracking, insights, and journal API endpoints on the existing API foundation. ## Why P1 personal journaling with mood/stress/pills tracking and stats, without blocking on P2 work. ## Depends on - 85 (shared rich-text editor) - 87 (API surface for existing modules — journal adds endpoints the same way) - ADR `0005-journal-research.md` (Gitea #20) ## Scope - Research ADR 0005 (mood/journal libs; build-vs-adopt). - Schema + CRUD (per-user entries). - Index: last 5–10 entries compact, browse all, small calendar of days with entries. - Entry detail and create: **date (default today) and time (default now) required**; everything else optional. - Fields: rich note text (shared editor); numerical stress; mood with color/emoji options and **multi-select**; took-my-pills-today boolean. - Module-level mood-tracker view over time. - Per-user insights/stats (trends, streaks, correlations — propose specifics in ADR/implementation). - Journal API endpoints (additive on 87). - Playwright: new `tests/e2e/journal.spec.ts` — minimal entry → recent list → detail → mood tracker loads. ## Out of scope - Household-shared journals (per-user only). - LLM agent tools for journal (88 can add later). ## Acceptance criteria - [x] ADR 0005 accepted. - [x] Create entry with only date/time. - [x] Index, detail, mood tracker, and insights views work. - [x] Journal API endpoints documented and callable with token auth. - [x] E2E happy path green (`tests/e2e/journal.spec.ts` — run locally with dev DB). ## Notes - Gitea epic: [#19](https://gitea.ginnoir.com/ginnoir/famapp/issues/19); children #20–#27 - Depends on #7 (rich-text) and #15 (API surface)