Files
faunosteo/README.md
T
Bastien ChanotandClaude Opus 4.7 8ca36b5ccd chore: initial scaffold + design spec + implementation plan
Skeleton for Osteo Report MVP. Build passes, 7 smoke tests green, real
Horse.svg + Horse_head.svg in public/species/equine/. Zod schemas are
the contract; store/anatomy/pdf modules are typed stubs throwing
"not implemented" awaiting implementation.

Spec: docs/superpowers/specs/2026-05-18-osteo-report-mvp-design.md
Plan: docs/superpowers/plans/2026-05-18-osteo-report-mvp.md (23 phases, ~70 TDD tasks)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 20:55:10 +02:00

117 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Osteo Report
Single-praticien web app for veterinary osteopathy bilans on animal anatomy SVGs — click zones, build observations, export a self-contained PDF with embedded JSON for re-import.
---
## Features
- **Anatomy canvas** — inline SVG with clickable zones; hitbox+visible twin pattern; delegated click listener
- **Observation builder** — group zones into clinical observations with pathology selection, severity, and free-text notes
- **Vertebra picker** — region tabs (C/T/L/S/Cd) with multi-select chip grid for precise vertebral notation
- **Detail popups** — click a zone (e.g. head) to open a secondary SVG with finer-grained zones
- **PDF export** — A4 portrait with rasterized anatomy SVGs (canvg @ 2×), structured observations, and the full report JSON as a native PDF attachment
- **PDF re-import** — open a previously exported PDF to restore the session for a follow-up
- **Configurable identity** — site name, brand, footer, tagline all come from env vars; nothing hardcoded
- **Practitioner cache** — last-used practitioner block prefilled via localStorage
---
## Stack
- Node.js 20
- React 19 + TypeScript 5 (strict)
- Vite 7 + @vitejs/plugin-react-swc
- Tailwind CSS v4 (CSS-first, no postcss config)
- Zustand 5 (state)
- Zod 3 (schema + runtime validation)
- pdf-lib 1.17 (PDF generation + native attachments)
- canvg 4 (SVG → canvas rasterization)
- motion 11 (animations)
- vitest 3 + happy-dom + @testing-library/react
---
## Quick start (dev)
Single process, no Docker:
```bash
# Requires pnpm — install if needed:
curl -fsSL https://get.pnpm.io/install.sh | sh
source ~/.bashrc # or restart your shell
pnpm install
cp .env.example .env # edit APP_* vars if desired
pnpm dev # http://localhost:5173
```
Docker Compose (matches production topology):
```bash
cp .env.example .env # set APP_* identity vars
docker compose up --build
# app at http://localhost:8080
```
---
## Verifying a change
```bash
pnpm typecheck # TypeScript strict, no emit
pnpm lint # ESLint 9 flat config, 0 warnings
pnpm test:run # vitest run (7 tests pass on skeleton)
pnpm build # tsc + vite build → dist/
```
---
## Build & deploy
```bash
pnpm build # production build → dist/
docker build -t osteo-report . # multi-stage Docker image
docker compose up --build # run with env_file: .env
```
For production deployment (VPS provisioning, firewall, TLS, nginx reverse proxy, backups) — see [DEPLOY.md](DEPLOY.md) (to be written post-scaffold).
---
## Documentation
- [CLAUDE.md](CLAUDE.md) — project conventions, stack reference, architecture overview
- [docs/ANATOMY-SVG-CONVENTION.md](docs/ANATOMY-SVG-CONVENTION.md) — SVG data-* contract (source of truth)
- [docs/ADDING-A-SPECIES.md](docs/ADDING-A-SPECIES.md) — guide for adding a second species post-MVP
- [docs/PDF-FORMAT.md](docs/PDF-FORMAT.md) — PDF page layout and attachment contract
- [.claude/tasks/TODO.md](.claude/tasks/TODO.md) — implementation roadmap
---
## Project layout
```
osteo/
├─ public/species/equine/ anatomy SVGs (Horse.svg, Horse_head.svg)
├─ src/app/ routes + ConfigProvider
├─ src/config/ runtime env config resolution
├─ src/domain/ Zod schemas + species registry + equine data
├─ src/state/ Zustand store + localStorage cache
├─ src/anatomy/ SVG parser + loader
├─ src/components/ UI primitives, canvas, observation, report
├─ src/pdf/ export/import/attachment/fonts + renderers
├─ src/lib/ id, dates, assert utilities
├─ src/styles/ Tailwind v4 CSS + design tokens
├─ tests/unit/ vitest tests
├─ docker/ entrypoint.sh + nginx.conf
└─ docs/ conventions + species guide + PDF spec
```
---
## Status
Pre-1.0 — skeleton complete. MVP feature implementation in progress (see `.claude/tasks/TODO.md`).
License: [MIT](LICENSE).