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.
5.3 KiB
5.3 KiB
type, entry_prefix, schema, rules
| type | entry_prefix | schema | rules | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| decisions_registry | BDR |
|
|
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.jsonviaPDFDocument.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 (@themein 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
persistmiddleware. Keyosteo-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-pinchwraps 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.