Skip to content

Epic: Photo annotation editor (Shottr-style) #1472

@steilerDev

Description

@steilerDev

Epic: Photo Annotation Editor (Shottr-style)

Priority: Should Have
Type: Mini-epic (5 stories, no separate architect/PO planning phase — the plan IS the design doc)

Overview

Add a Shottr-like in-app photo annotation editor accessible from the photo viewer. The editor offers a full toolkit (arrow, rectangle, ellipse, line, text, callout, measurement, freehand, highlight) over the photo, optimized for touch and Apple Pencil. Annotations are non-destructive (original file preserved) but once saved are baked into a PNG; the editable JSON is discarded.

Design decisions (confirmed by user, do not re-litigate)

  1. Re-edit policy: Once baked, truly final. Save bakes a PNG and discards JSON. Re-opening the annotator starts over whatever is currently displayed. "Clear all annotations" reverts to the original via DELETE endpoint.
  2. Display: Annotated version shown everywhere (grids, viewer). View Original toggle in the viewer.
  3. Tool scope (v1): Full Shottr-style toolkit — arrow, rectangle, ellipse, line, text, callout, measurement (user-entered label), freehand, highlight.
  4. Authorization: Any authenticated user can annotate (same rule as captions).
  5. Measurement: User enters free-form text at line midpoint (e.g., "2.5 m"). No automatic distance computation. Double-click via Select tool re-opens the input.
  6. Storage: single `annotated_at TEXT` column on `photos` + `annotated.png` on disk + regenerated `thumbnail.webp`.
  7. No PDF integration in this epic (no PDF feature exists in the codebase yet).

Plan reference

Full architectural plan, file paths, tool specs, and edge cases live in the plan file shared at planning time. This epic was approved without separate `/epic-start` planning — the plan is the design doc.

Out of scope (deferred to phase 2)

  • Apple-Pencil pressure-sensitive stroke width, palm rejection
  • Two-finger pinch zoom in editor
  • Blur/pixelate tool, crop tool, numbered counter tool
  • Auto-derived measurement (calibration from a reference distance)
  • PDF export integration

Sub-stories

  • Story 1 — Annotator foundation + Select/Rectangle/Highlight + lifecycle (Annotate / View Original / Clear)
  • Story 2 — Geometric tools (Arrow, Line, Ellipse)
  • Story 3 — Text-based tools (Text, Callout)
  • Story 4 — Measurement (user-entered label) and freehand tools
  • Story 5 — Polish (multi-viewport E2E, a11y, perf, security, German translations)

Story dependencies

  • Stories 2, 3, 4 are blocked by Story 1 (need annotator shell + bake pipeline + Select tool)
  • Story 5 is blocked by 1, 2, 3, 4 (polish/E2E/translations across the full toolkit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicEpic - large feature area

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions