feat: architecture DDD hexagonale + tooling Vite/TypeScript

Migration complète du monolithe vers une architecture en couches :
- Domain : entités, value objects, services purs, ports
- Application : CQRS avec CommandBus/QueryBus, 15+ commandes, 9 requêtes
- Tooling : Vite + TypeScript strict + Vitest + path aliases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 05:42:53 +02:00
parent 0afc53fc1a
commit c640fbd416
57 changed files with 4419 additions and 3155 deletions

View File

@@ -0,0 +1,20 @@
import type { AppState } from '@domain/ports/StateRepository';
export interface GetWorkflowsQuery { type: 'get-workflows'; }
export interface WorkflowItem {
id: number;
name: string;
target: string;
qty: number;
createdAt: number;
materials: Array<{ name: string; needed: number; done: number }>;
steps: Array<{
gen: number;
crossings: Array<{ race: string; needed: number; parentA: string; parentB: string; couples: number; repro: number; done: number }>;
}>;
}
export function createGetWorkflowsHandler(state: AppState) {
return (_query: GetWorkflowsQuery): WorkflowItem[] => state.workflows as WorkflowItem[];
}