Files
famapp/docs/tasks/12-notes-module.md
ginnoir 09d6adbf18 Calendars as entities, uniform widget contract, multi-dashboard tasks
Architecture refinements before module work begins:

- Calendars become first-class entities (mirror of lists). Each
  calendar has its own visibility (private | household) and is
  independently shareable. Updated CLAUDE.md data model and task 10.

- Drop the singleton/parameterized split for dashboard widgets. Every
  widget declares a configSchema + defaultConfig + resolveConfigOptions
  and every placement is an independent instance — same widgetId can
  appear multiple times on one dashboard pointed at different things.
  Updated task 04 contract; tasks 11/12 widget sections aligned.

- Add tasks 25 (multiple dashboards per user) and 26 (customizable
  layout + widget configuration). Replaces the previously-considered
  three-task plan with a cleaner two-task split that the uniform
  contract enables. Phase 3 index updated; STATUS records the rationale.

- Task 20 reframed as a single-dashboard MVP that exercises the new
  contract end-to-end before the customization layer lands.
2026-05-06 01:14:49 -05:00

32 lines
1.2 KiB
Markdown

# 12 — Notes module
## Goal
Lightweight shared notes with optional reminders.
## Depends on
- 04, 07
## Scope
- Schema: `notes` (`id`, `household_id`, `author_id`, `title`, `body` markdown, `pinned` bool, `remind_at` timestamptz nullable, `created_at`, `updated_at`).
- `/notes` index: pinned first, then by updated_at desc.
- `/notes/[id]` editor — minimal markdown (use `@uiw/react-md-editor` or similar; live preview optional).
- `remind_at` writes a row to `reminders` (table comes from `_core`; reminder firing comes from task 41).
- Manifest:
- Entity `notes.note` — shareable, remindable, searchable (title + body).
- Widget (uniform contract per task 04): **`notes.filtered`** — `config: { filter: "pinned" | "all"; limit?: number }`. Default `{ filter: "pinned", limit: 10 }`. `resolveConfigOptions` returns nothing yet (placeholder for future tag filtering).
## Out of scope
- Rich text / WYSIWYG.
- Attachments (separate later module).
- Collaborative editing.
## Acceptance criteria
- [ ] Create / edit / pin / delete works.
- [ ] Setting `remind_at` creates a `reminders` row scoped to entity `notes.note`.
- [ ] Markdown renders safely (no raw HTML injection).