Files
faunosteo/.claude/memory/decisions.md
T
ZenQuality a115e785a7 chore: initial scaffold
Generated by /init-project. React 19 + TS strict + Vite 6 + Tailwind 4 +
shadcn/ui + motion + pdf-lib + Zod + Zustand + react-router 7. Empty
skeleton, no business logic. Docker multi-stage + nginx + Traefik labels
commented. AGPL-3.0-or-later.
2026-05-17 06:43:11 +02:00

5.3 KiB

type, entry_prefix, schema, rules
type entry_prefix schema rules
decisions_registry BDR
id date title decision why alternatives status supersedes
BDR-XXX YYYY-MM-DD string (<= 80 chars) string (what was chosen) string (motivation, context) list of strings (what was rejected + why)
proposed | accepted | deprecated | superseded
BDR-XXX (optional)
Append-only. Never rewrite past entries - add a new one with status superseded if needed.
One entry per non-trivial choice. Trivial = reversible in under 10 min with no cross-file impact.
Capture why more carefully than what - the what rots, the why lasts.

Decisions registry (BDR)

Index

ID Date Title Status
BDR-001 2026-05-17 Stack frontend SPA React 19 + Vite 6 + TS strict accepted
BDR-002 2026-05-17 Client-only, no backend MVP accepted
BDR-003 2026-05-17 PDF = canonical persistence via embedded JSON accepted
BDR-004 2026-05-17 Tailwind 4 + shadcn canary accepted
BDR-005 2026-05-17 Zustand persist localStorage autosave accepted
BDR-006 2026-05-17 Zoom/pan only in modal overlay accepted
BDR-007 2026-05-17 Multi-species architecture from day 1, MVP equine accepted
BDR-008 2026-05-17 License AGPL-3.0-or-later accepted

BDR-001 — Stack frontend SPA React 19 + Vite 6 + TS strict

  • Date: 2026-05-17
  • Status: accepted
  • Decision: React 19 + TS 5.6 strict + Vite 6. Tailwind 4 + shadcn/ui. motion 12. pdf-lib. Zod. Zustand 5. react-hook-form. react-router 7.
  • Why: User specified React in brief; ecosystem maturity for shadcn/ui + motion. TS strict avoids whole class of state-restoration bugs from PDF re-import (Zod schemas drive types).
  • Alternatives:
    • Vue/Svelte — equally fine, but no specific user familiarity and shadcn-equivalent ecosystem less mature.
    • Astro — wrong tool for SPA editor with heavy interactivity and no public indexing need.
    • React 18 — EOL approaching; React 19 stable since end-2024.

BDR-002 — Client-only, no backend MVP

  • Date: 2026-05-17
  • Status: accepted
  • Decision: 100 % static SPA. All state in browser. PDF is the persistence medium.
  • Why: Brief mandates. GDPR trivial (no PII server-side), surface attack minimal, scalability free, deployment cheap (nginx static).
  • Alternatives: backend Phase 2 only.

BDR-003 — PDF = canonical persistence via embedded JSON attachment

  • Date: 2026-05-17
  • Status: accepted
  • Decision: Exported PDF embeds report.json via PDFDocument.attach() (pdf-lib). Re-import reads that attachment, validates with Zod, restores state.
  • Why: Round-trip without server. Brief requirement. Native PDF attachments survive viewer-to-viewer.
  • Alternatives:
    • JSON in PDF metadata (XMP) — size-limited, fragile across viewers.
    • QR code embedded — too small for full report, brittle.
    • Side-channel localStorage only — fails on machine change.
  • Caveat: Safari iOS handles PDF attachments poorly. Desktop-first per brief; warn iOS users.

BDR-004 — Tailwind 4 + shadcn/ui canary

  • Date: 2026-05-17
  • Status: accepted
  • Decision: Tailwind 4 via @tailwindcss/vite, CSS-based config (@theme in globals.css). shadcn/ui canary install.
  • Why: New projects in 2026 should start on v4 (smaller bundle, faster compile, CSS-native). Brief allows any modern stack.
  • Alternatives: Tailwind 3 — safer but legacy choice for greenfield.

BDR-005 — Zustand persist localStorage autosave

  • Date: 2026-05-17
  • Status: accepted
  • Decision: Single Zustand store with persist middleware. Key osteo-report-draft. Debounce 500 ms.
  • Why: User can crash browser mid-bilan and recover. PDF is the canonical save, localStorage is the safety net.
  • Alternatives:
    • Context + reducer — needs custom persistence layer.
    • Redux Toolkit — overkill for single-document state.

BDR-006 — Zoom/pan only in modal overlay

  • Date: 2026-05-17
  • Status: accepted
  • Decision: react-zoom-pan-pinch wraps the macro-zone slice inside a dialog (ZoomOverlay). The main SVG stays click-only.
  • Why: Avoids click vs pan/pinch event conflicts on the primary canvas. Tablet gestures stay predictable.
  • Alternatives:
    • Zoom inside the same SVG with state-driven mode — high risk of stuck zoom + event leakage.

BDR-007 — Multi-species architecture day 1, MVP equine

  • Date: 2026-05-17
  • Status: accepted
  • Decision: All 9 species (chien, chat, equine, lapin, bovin, chevre, ane, mouton, porc) selectable in form. Only equine has full anatomy + pathology data. Others = stub registered later.
  • Why: Brief says MVP equine; user follow-up says all 9 must appear in selector. Architecture stays additive — add a species = add src/species/<id>/{anatomy,pathologies} + register.
  • Alternatives: hide non-MVP species — rejected per user feedback.

BDR-008 — License AGPL-3.0-or-later

  • Date: 2026-05-17
  • Status: accepted
  • Decision: AGPL-3.0-or-later.
  • Why: User wants open-source. Copyleft prevents SaaS resale without sharing source. All deps GPL-compatible.
  • Alternatives:
    • MIT — too permissive for a client-funded tool.
    • GPL-3.0 — same minus network-service clause; AGPL closes that loophole.