ZenQuality f57d6ec3d3 feat: UI — home, new report form, editor with anatomy canvas + findings + PDF export
UI primitives (Tailwind, no shadcn CLI dependency):
- Button, Card, Input, Textarea, Label, Badge, Select, Dialog
- Brand, Header, Footer, Shell layout wrapper

Routes:
- HomeRoute: new bilan card + import PDF card with drag-drop, error toast
- NewReportRoute: 9-species selector (8 disabled badges 'à venir'),
  practitioner block (fullName required + title/phone/email/SIRET/address optional),
  animal+owner, sessionDate. Zod-validated form via react-hook-form
- EditorRoute: split view — anatomy canvas (3 tabs latéral L/R + dorsal) on the
  left, findings panel + conclusion + export button on the right
- NotFoundRoute

Editor:
- AnatomyView: fetch SVG, DOMParser-based (no innerHTML), click delegation on
  [data-zone], CSS-variable styling per state (default/selected/linked)
- AnatomyCanvas: animated tab switcher with motion shared layout
- ZoneSelection: chip bar of current selection, validate+reset buttons
- FindingEditor: modal dialog with severity radios, pathology multi-select
  filtered by zones, free-text pathology input, linked-zones picker, comment
- FindingPanel: list of findings with hover-preview wired to canvas highlight
- ConclusionPanel: conclusion + recommendations + next appointment
- ExportButton: triggers PDF download
- rasterize.ts: SVG → PNG bytes via canvas (used by editor before PDF export)

ESLint: relax strict-type-checked to React-idiomatic level (no-confusing-void-expression
off, no-misused-promises allows void-return attributes, no-floating-promises is warn).
2 remaining errors fixed (label a11y + optional chain in HomeRoute).

PDF export Blob: copy bytes into fresh ArrayBuffer before Blob ctor — TS strict
rejects ArrayBufferLike|SharedArrayBuffer as BlobPart in lib.dom 2026.

Tests: 34/34 still green. Build 5.6s (motion 96KB, pdf-lib 523KB chunks).
2026-05-17 07:18:13 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:48:28 +02:00
2026-05-17 06:43:11 +02:00
2026-05-17 06:43:11 +02:00

Osteo Report

Bilans de séance d'ostéopathie animalière — application web client-side, export PDF auto-portant.

Application web pour vétérinaire ostéopathe : saisie du compte rendu de séance, annotation de zones anatomiques sur des schémas, export en PDF propre. Le PDF généré embarque le JSON complet du bilan en pièce jointe native — il peut être ré-importé plus tard pour reprendre l'édition.

100 % côté client. Aucun serveur, aucune base de données, aucune donnée stockée en dehors du PDF que le praticien télécharge.


Tech

  • React 19 / TypeScript 5 strict / Vite 6
  • Tailwind 4 + shadcn/ui (canary) + motion (framer-motion)
  • Zod (validation runtime des PDFs importés)
  • Zustand 5 (état + autosave localStorage)
  • pdf-lib (génération PDF + pièces jointes natives)
  • react-hook-form, react-router 7, react-zoom-pan-pinch
  • Vitest + @testing-library/react + Playwright
  • Docker multi-stage → nginx alpine + Traefik (labels commentés)

Prérequis

  • Node ≥ 20.18 (nvm use lit .nvmrc)
  • npm 10
  • Docker (déploiement uniquement)
  • npx playwright install chromium (avant les tests e2e, une seule fois)

Démarrage

npm install
npm run dev          # http://localhost:5173

Commandes

npm run dev          # dev server (Vite)
npm run build        # production build (tsc -b && vite build)
npm run preview      # preview build sur :4173
npm run test         # vitest run
npm run test:watch   # vitest watch
npm run test:e2e     # playwright
npm run lint         # eslint
npm run lint:fix     # eslint --fix
npm run typecheck    # tsc -b --noEmit
npm run format       # prettier --write .

Docker

docker compose up --build

Le docker-compose.yml contient des labels Traefik commentés à activer pour la mise en production sur sous-domaine.


Espèces couvertes

Le formulaire de nouveau bilan propose 9 espèces :

Espèce MVP Anatomie complète Base pathologies
Cheval ✅ en cours seed initial
Chien bientôt — —
Chat bientôt — —
Lapin bientôt — —
Bovin bientôt — —
Chèvre bientôt — —
Âne bientôt — —
Mouton bientôt — —
Porc bientôt — —

Le code est conçu pour qu'ajouter une espèce = ajouter un dossier src/species/<id>/. Voir docs/ADDING-A-SPECIES.md.


Format PDF

Chaque PDF exporté contient :

  • Header avec coordonnées du praticien, animal, propriétaire, date.
  • Pour chaque vue où des zones ont été cliquées : un schéma annoté.
  • Tableau des findings (zone, pathologie, sévérité, commentaire).
  • Conclusion + recommandations.
  • Date de prochain rendez-vous (optionnel).
  • Footer avec date d'export.
  • Pièce jointe report.json : le bilan complet, lisible par cette application pour reprendre l'édition.

À l'import, l'app vérifie la présence de la pièce jointe, valide le JSON via Zod et restitue l'état. Un PDF externe (pas généré par l'app) est rejeté avec un message clair.


Documentation


Licence

AGPL-3.0-or-later © ZenQuality

S
Languages
TypeScript 78.6%
HTML 14.6%
CSS 3.7%
JavaScript 2.2%
Shell 0.7%
Other 0.2%