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.
This commit is contained in:
ZenQuality committed 2026-05-17 06:43:11 +02:00
commit a115e785a7
88 files changed
+12149

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { EditorRoute } from './routes/EditorRoute';
import { HomeRoute } from './routes/HomeRoute';
import { NewReportRoute } from './routes/NewReportRoute';
import { NotFoundRoute } from './routes/NotFoundRoute';
export function App(): JSX.Element {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<HomeRoute />} />
<Route path="/new" element={<NewReportRoute />} />
<Route path="/editor" element={<EditorRoute />} />
<Route path="*" element={<NotFoundRoute />} />
</Routes>
</BrowserRouter>
);
}
+3
View File
@@ -0,0 +1,3 @@
export function Brand(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function Footer(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function Header(): JSX.Element | null {
return null;
}
View File
Whitespace-only changes.
+3
View File
@@ -0,0 +1,3 @@
export function AnatomyCanvas(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function AnatomyView(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function ConclusionPanel(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function ExportButton(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function FindingEditor(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function FindingPanel(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function ZoneSelection(): JSX.Element | null {
return null;
}
+3
View File
@@ -0,0 +1,3 @@
export function ZoomOverlay(): JSX.Element | null {
return null;
}
View File
Whitespace-only changes.
+32
View File
@@ -0,0 +1,32 @@
export const FR = {
app: {
name: 'Osteo Report',
tagline: 'Bilans ostéopathiques vétérinaires',
},
home: {
new: 'Nouveau bilan',
import: 'Importer un PDF existant',
importHint: 'Glissez un PDF généré par cette application',
},
species: {
chien: 'Chien',
chat: 'Chat',
equine: 'Cheval',
lapin: 'Lapin',
bovin: 'Bovin',
chevre: 'Chèvre',
ane: 'Âne',
mouton: 'Mouton',
porc: 'Porc',
} as Record<string, string>,
severity: {
mild: 'Légère',
moderate: 'Modérée',
severe: 'Sévère',
} as Record<string, string>,
errors: {
importNotFromApp:
"Ce PDF n'a pas été généré par cette application. L'import est impossible.",
importInvalid: "Le contenu du PDF n'a pas pu être lu.",
},
} as const;
+6
View File
@@ -0,0 +1,6 @@
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]): string {
return twMerge(clsx(inputs));
}
+10
View File
@@ -0,0 +1,10 @@
import { format, parseISO } from 'date-fns';
import { fr } from 'date-fns/locale';
export function formatDateFr(iso: string): string {
return format(parseISO(iso), 'd MMMM yyyy', { locale: fr });
}
export function todayIso(): string {
return new Date().toISOString().slice(0, 10);
}
+5
View File
@@ -0,0 +1,5 @@
import { nanoid } from 'nanoid';
export function newId(prefix?: string): string {
return prefix ? `${prefix}_${nanoid(10)}` : nanoid(12);
}
+12
View File
@@ -0,0 +1,12 @@
import type { Transition } from 'motion/react';
export const SPRING: Transition = {
type: 'spring',
stiffness: 260,
damping: 22,
};
export const FADE_IN_UP: Transition = {
duration: 0.2,
ease: [0.22, 1, 0.36, 1],
};
+14
View File
@@ -0,0 +1,14 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { App } from './App';
import './styles/globals.css';
const container = document.getElementById('root');
if (!container) throw new Error('Root container #root not found');
createRoot(container).render(
<StrictMode>
<App />
</StrictMode>,
);
+9
View File
@@ -0,0 +1,9 @@
import type { Report } from '../schema/report';
export interface AnatomyAssets {
svg: Record<string, string>;
}
export async function exportReport(_report: Report, _assets: AnatomyAssets): Promise<Blob> {
throw new Error('exportReport not implemented');
}
+13
View File
@@ -0,0 +1,13 @@
import type { Report } from '../schema/report';
export type ImportFailure =
| { ok: false; reason: 'NO_ATTACHMENT' }
| { ok: false; reason: 'INVALID_JSON'; details?: string }
| { ok: false; reason: 'SCHEMA_MISMATCH'; details?: string }
| { ok: false; reason: 'UNREADABLE_PDF'; details?: string };
export type ImportResult = { ok: true; report: Report } | ImportFailure;
export async function importReport(_file: File): Promise<ImportResult> {
throw new Error('importReport not implemented');
}
+1
View File
@@ -0,0 +1 @@
export {};
+1
View File
@@ -0,0 +1 @@
export {};
+1
View File
@@ -0,0 +1 @@
export {};
+1
View File
@@ -0,0 +1 @@
export {};
+2
View File
@@ -0,0 +1,2 @@
export const PDF_SCHEMA_VERSION = 1 as const;
export const PDF_ATTACHMENT_NAME = 'report.json' as const;
+3
View File
@@ -0,0 +1,3 @@
export function EditorRoute(): JSX.Element {
return <div data-route="editor" />;
}
+3
View File
@@ -0,0 +1,3 @@
export function HomeRoute(): JSX.Element {
return <div data-route="home" />;
}
+3
View File
@@ -0,0 +1,3 @@
export function NewReportRoute(): JSX.Element {
return <div data-route="new" />;
}
+3
View File
@@ -0,0 +1,3 @@
export function NotFoundRoute(): JSX.Element {
return <div data-route="not-found" />;
}
+21
View File
@@ -0,0 +1,21 @@
import { z } from 'zod';
export const SeveritySchema = z.enum(['mild', 'moderate', 'severe']);
export type Severity = z.infer<typeof SeveritySchema>;
export const PathologyRefSchema = z.object({
id: z.string().min(1),
label: z.string().min(1),
free: z.boolean().default(false),
});
export type PathologyRef = z.infer<typeof PathologyRefSchema>;
export const FindingSchema = z.object({
id: z.string().min(1),
zones: z.array(z.string()).min(1),
linkedZones: z.array(z.string()).default([]),
pathologies: z.array(PathologyRefSchema).default([]),
severity: SeveritySchema,
comment: z.string().default(''),
});
export type Finding = z.infer<typeof FindingSchema>;
+12
View File
@@ -0,0 +1,12 @@
import { z } from 'zod';
export const PractitionerSchema = z.object({
fullName: z.string().min(1),
title: z.string().optional(),
phone: z.string().optional(),
email: z.string().email().optional(),
address: z.string().optional(),
siret: z.string().optional(),
});
export type Practitioner = z.infer<typeof PractitionerSchema>;
+37
View File
@@ -0,0 +1,37 @@
import { z } from 'zod';
import { FindingSchema } from './finding';
import { PractitionerSchema } from './practitioner';
export const SCHEMA_VERSION = 1 as const;
export const SpeciesIdSchema = z.enum([
'chien',
'chat',
'equine',
'lapin',
'bovin',
'chevre',
'ane',
'mouton',
'porc',
]);
export const ReportSchema = z.object({
version: z.literal(SCHEMA_VERSION),
id: z.string().min(1),
createdAt: z.string().datetime(),
species: SpeciesIdSchema,
practitioner: PractitionerSchema,
animal: z.object({
name: z.string().min(1),
owner: z.string().min(1),
}),
sessionDate: z.string(),
findings: z.array(FindingSchema).default([]),
conclusion: z.string().default(''),
recommendations: z.string().default(''),
nextAppointment: z.string().optional(),
});
export type Report = z.infer<typeof ReportSchema>;
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+17
View File
@@ -0,0 +1,17 @@
# Cheval — anatomie et pathologies
Sources clinique-vétérinaires devant figurer en référence pour chaque entrée de
`pathologies.ts` :
- Merck Veterinary Manual — https://www.merckvetmanual.com
- IMAIOS vet-Anatomy — https://www.imaios.com/en/vet-anatomy
- PubMed Central — https://www.ncbi.nlm.nih.gov/pmc/
- Veterinary Clinics of North America: Equine Practice (Elsevier)
- Equine Veterinary Journal (Wiley/BEVA)
- London College of Animal Osteopathy — https://lcao.com
- WikiVet — https://en.wikivet.net
Formule vertébrale du cheval : C7 / T18 / L6 / S5.
Toute pathologie ajoutée doit citer au moins une source. Pas d'entrée
inventée — la base est ensuite relue et validée par le praticien client.
+13
View File
@@ -0,0 +1,13 @@
import type { SpeciesAnatomy } from '../types';
export const EQUINE_ANATOMY: SpeciesAnatomy = {
id: 'equine',
label: 'Cheval',
vertebralFormula: { cervical: 7, thoracic: 18, lumbar: 6, sacral: 5 },
zones: [],
svg: {
lateral_left: '',
lateral_right: '',
dorsal: '',
},
};
+3
View File
@@ -0,0 +1,3 @@
import type { PathologyEntry } from '../types';
export const EQUINE_PATHOLOGIES: PathologyEntry[] = [];
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+20
View File
@@ -0,0 +1,20 @@
import type { PathologyEntry, SpeciesAnatomy, SpeciesId } from './types';
export interface SpeciesPack {
anatomy: SpeciesAnatomy;
pathologies: PathologyEntry[];
}
export const SPECIES: Partial<Record<SpeciesId, SpeciesPack>> = {};
export function registerSpecies(id: SpeciesId, pack: SpeciesPack): void {
SPECIES[id] = pack;
}
export function getSpecies(id: SpeciesId): SpeciesPack | undefined {
return SPECIES[id];
}
export function isSpeciesAvailable(id: SpeciesId): boolean {
return SPECIES[id] !== undefined;
}
+61
View File
@@ -0,0 +1,61 @@
export type SpeciesId =
| 'chien'
| 'chat'
| 'equine'
| 'lapin'
| 'bovin'
| 'chevre'
| 'ane'
| 'mouton'
| 'porc';
export type View = 'lateral_left' | 'lateral_right' | 'dorsal';
export type ZoneCategory = 'axial' | 'limb' | 'head' | 'tail' | 'other';
export interface Subzone {
id: string;
label: string;
}
export interface Zone {
id: string;
label: string;
category: ZoneCategory;
views: View[];
subzones?: Subzone[];
}
export interface VertebralFormula {
cervical: number;
thoracic: number;
lumbar: number;
sacral: number;
}
export interface SpeciesAnatomy {
id: SpeciesId;
label: string;
vertebralFormula: VertebralFormula;
zones: Zone[];
svg: Record<View, string>;
}
export interface PathologyEntry {
id: string;
label: string;
description: string;
category:
| 'osseux'
| 'articulaire'
| 'musculaire'
| 'tendino-ligamentaire'
| 'fascial'
| 'visceral'
| 'cranio-sacre'
| 'nerveux'
| 'autre';
applicableSpecies: SpeciesId[];
applicableZones: string[];
sources: string[];
}
+56
View File
@@ -0,0 +1,56 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { Finding } from '../schema/finding';
import type { Report } from '../schema/report';
interface ReportState {
report: Report | null;
selection: string[];
hydrate: (r: Report) => void;
reset: () => void;
toggleZone: (zoneId: string) => void;
clearSelection: () => void;
addFinding: (f: Finding) => void;
updateFinding: (id: string, patch: Partial<Finding>) => void;
removeFinding: (id: string) => void;
setConclusion: (text: string) => void;
setRecommendations: (text: string) => void;
setNextAppointment: (date: string | undefined) => void;
}
export const useReportStore = create<ReportState>()(
persist(
(set) => ({
report: null,
selection: [],
hydrate: () => {
// implemented in feature task
},
reset: () => set({ report: null, selection: [] }),
toggleZone: () => {
// implemented in feature task
},
clearSelection: () => set({ selection: [] }),
addFinding: () => {
// implemented in feature task
},
updateFinding: () => {
// implemented in feature task
},
removeFinding: () => {
// implemented in feature task
},
setConclusion: () => {
// implemented in feature task
},
setRecommendations: () => {
// implemented in feature task
},
setNextAppointment: () => {
// implemented in feature task
},
}),
{ name: 'osteo-report-draft' },
),
);
+19
View File
@@ -0,0 +1,19 @@
import type { Finding } from '../schema/finding';
import type { Report } from '../schema/report';
export function findingsByZone(report: Report | null, zoneId: string): Finding[] {
if (!report) return [];
return report.findings.filter(
(f) => f.zones.includes(zoneId) || f.linkedZones.includes(zoneId),
);
}
export function zonesInUse(report: Report | null): string[] {
if (!report) return [];
const ids = new Set<string>();
for (const f of report.findings) {
for (const z of f.zones) ids.add(z);
for (const z of f.linkedZones) ids.add(z);
}
return Array.from(ids);
}
+36
View File
@@ -0,0 +1,36 @@
@import 'tailwindcss';
@import './tokens.css';
@theme {
--color-clinic-50: var(--clinic-50);
--color-clinic-100: var(--clinic-100);
--color-clinic-200: var(--clinic-200);
--color-clinic-300: var(--clinic-300);
--color-clinic-400: var(--clinic-400);
--color-clinic-500: var(--clinic-500);
--color-clinic-600: var(--clinic-600);
--color-clinic-700: var(--clinic-700);
--color-clinic-800: var(--clinic-800);
--color-clinic-900: var(--clinic-900);
--color-warm-300: var(--warm-300);
--color-warm-400: var(--warm-400);
--color-warm-500: var(--warm-500);
--color-surface: var(--surface);
--color-ink: var(--ink);
--font-sans: 'Inter', system-ui, sans-serif;
--font-display: 'Fraunces', Georgia, serif;
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
html,
body,
#root {
height: 100%;
}
body {
background-color: var(--surface);
color: var(--ink);
font-family: var(--font-sans);
-webkit-font-smoothing: antialiased;
}
+33
View File
@@ -0,0 +1,33 @@
:root {
/* Clinical green — primary identity */
--clinic-50: #f4f7f2;
--clinic-100: #e6ede0;
--clinic-200: #cbdac1;
--clinic-300: #a6c099;
--clinic-400: #7ba370;
--clinic-500: #4a7c59;
--clinic-600: #3c6849;
--clinic-700: #2d4a35;
--clinic-800: #1f3527;
--clinic-900: #14241b;
/* Warm accent — severity / warnings */
--warm-300: #d4a574;
--warm-400: #b9854a;
--warm-500: #a8612d;
/* Neutrals */
--surface: #fffdf8;
--ink: #1a2b1f;
/* Severity scale tokens */
--severity-mild: var(--clinic-400);
--severity-moderate: var(--warm-300);
--severity-severe: var(--warm-500);
/* Zone state tokens */
--zone-default: transparent;
--zone-hover: color-mix(in oklab, var(--clinic-300) 30%, transparent);
--zone-selected: color-mix(in oklab, var(--clinic-500) 45%, transparent);
--zone-linked: color-mix(in oklab, var(--warm-400) 45%, transparent);
}
+2
View File
@@ -0,0 +1,2 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />