Porte les 4 utilitaires de traitement d'images en TypeScript pour utilisation côté client :
- heicConverter.ts : convertit HEIC/HEIF en JPEG via heic2any
- bgRemover.ts : supprime les fonds d'images avec @imgly/background-removal + composite sur blanc
- imageRotator.ts : pivote les images JPEG via Canvas
- zipImporter.ts : extrait les images d'un fichier ZIP avec structure dossier-ref/image.ext
Tous les modules utilisent des APIs du navigateur et doivent être importés dynamiquement depuis du code 'use client'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implémentation test-driven du endpoint de recherche de produits par référence.
- Tests unitaires complets validant les cas nominaux et d'erreur
- Validation du paramètre ref avec gestion des chaînes vides
- Intégration avec searchProductByRef de lib/shopify
- Gestion appropriée des erreurs HTTP (400, 500)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Install heic2any and jszip dependencies
- Create src/types/images.ts with ImageItem, ImageStatus, ImageProgress, and ZipEntry types
- heic2any includes bundled TypeScript types (no declaration file needed)
- ImageItem is the central data model for the image processing module with support for:
- HEIC to JPEG conversion
- AI-powered background removal
- Shopify product lookup and upload
- Progress tracking and error handling
- Rotation and feather adjustments (cached PNG blob for fast re-processing)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets up Prisma 7 with SQLite (better-sqlite3 adapter), User and SyncRun models, migration, and admin seed account for mathieu.fort@gmail.com.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>