Files
famapp/docs/tasks/86-journal-module.md
ginnoir 04ae809e07 feat(journal): add per-user mood journal module (task 86)
Ship journal entries with mood tracking, insights, and Recharts charts.

Adds v1 API endpoints per ADR 0005 and migration 0020_journal_entries.
2026-07-04 19:41:15 -05:00

46 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 510 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)