seo-generator-server/TODOLIST.md
StillHammer 4f60de68d6 Fix BatchProcessor initialization and add comprehensive test suite
- Fix BatchProcessor constructor to avoid server blocking during startup
- Add comprehensive integration tests for all modular combinations
- Enhance CLAUDE.md documentation with new test commands
- Update SelectiveLayers configuration for better LLM allocation
- Add AutoReporter system for test automation
- Include production workflow validation tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:17:49 +08:00

135 lines
4.3 KiB
Markdown

# 🎯 TODOLIST - INTERFACE DE TRAITEMENT BATCH
**Objectif**: Créer une interface web complète pour traiter les lignes Google Sheets une par une avec configuration pipeline modulaire et monitoring temps réel.
## 📊 **STATUT GLOBAL**
- **Tâches totales**: 16 (avec tests intégrés)
- **Terminées**: 0
- **En cours**: 0
- **Restantes**: 16
- **Phase actuelle**: 🔧 Phase 1 - API Endpoints Backend
---
## 📋 **TÂCHES DÉTAILLÉES**
### 🔧 **1. API Endpoints Backend**
- [ ] **Créer endpoints configuration pipeline**
- POST `/api/batch/config` - Sauvegarder configuration
- GET `/api/batch/config` - Récupérer configuration actuelle
- [ ] **Créer endpoints contrôle traitement**
- POST `/api/batch/start` - Démarrer traitement
- POST `/api/batch/stop` - Arrêter traitement
- POST `/api/batch/pause` - Mettre en pause
- POST `/api/batch/resume` - Reprendre
- [ ] **Créer endpoints monitoring**
- GET `/api/batch/status` - État actuel
- GET `/api/batch/progress` - Progression détaillée
- WebSocket `/ws/batch` - Updates temps réel
- [ ] 🧪 **TEST PHASE 1**: Validation tous endpoints avec curl/Postman
### ⚙️ **2. Système Queue & Processing**
- [ ] **Créer BatchProcessor class**
- Gestion queue lignes Google Sheets
- États: idle/running/paused/error
- Retry logic pour erreurs
- [ ] **Intégrer Digital Ocean**
- Récupération XML templates depuis DO Spaces
- Cache local des templates
- Fallback templates par défaut
- [ ] **Gestion configuration pipeline**
- Support tous les stacks modulaires
- Sauvegarde/restauration état
- [ ] 🧪 **TEST PHASE 2**: Test queue + DO templates + pipeline config
### 🖥️ **3. Interface Web Frontend**
- [ ] **Page configuration pipeline**
- Sélecteurs selective/adversarial/human/pattern
- Sliders intensité (0.5-1.5)
- Choix plage lignes (début-fin)
- [ ] **Dashboard monitoring**
- Progression en temps réel
- État ligne actuelle
- Métriques (temps, coûts, erreurs)
- [ ] **Contrôles traitement**
- Boutons Start/Stop/Pause/Reset
- Logs en direct avec filtres
- [ ] 🧪 **TEST PHASE 3**: Test interface complète + UX + WebSocket
### 🧪 **4. Tests & Validation Finale**
- [ ] **Tests intégration complète**
- API + Queue + Interface ensemble
- [ ] **Tests end-to-end production**
- Vraies données Google Sheets
- Digital Ocean réel
- Pipeline complet
- [ ] **Tests performance & charge**
- Multiple lignes simultanées
- Gestion mémoire/CPU
- [ ] 🧪 **TEST PHASE 4**: Validation production complète
---
## 🎯 **ORDRE D'IMPLÉMENTATION PRÉVU**
1.**Phase 1**: API Endpoints Backend
- 🧪 **Tests Phase 1**: Validation endpoints avec curl/Postman
2.**Phase 2**: BatchProcessor + Digital Ocean
- 🧪 **Tests Phase 2**: Test queue + récupération DO templates
3.**Phase 3**: Interface Web
- 🧪 **Tests Phase 3**: Test interface complète en local
4.**Phase 4**: Tests & Finalisation
- 🧪 **Tests Phase 4**: Tests end-to-end production
---
## 📝 **NOTES TECHNIQUES**
### **Configuration Pipeline Structure**
```json
{
"selective": "lightEnhancement|standardEnhancement|fullEnhancement|personalityFocus|fluidityFocus",
"adversarial": "none|light|standard|heavy|adaptive",
"humanSimulation": "none|lightSimulation|personalityFocus|adaptive",
"patternBreaking": "none|syntaxFocus|connectorsFocus|adaptive",
"intensity": 0.5-1.5,
"rowRange": { "start": 2, "end": 10 },
"saveIntermediateSteps": true/false
}
```
### **État Processing**
```json
{
"status": "idle|running|paused|error|completed",
"currentRow": 3,
"totalRows": 8,
"progress": 37.5,
"startTime": "2025-09-18T06:00:00Z",
"estimatedEnd": "2025-09-18T06:45:00Z",
"errors": [],
"lastResult": { "rowNumber": 2, "articleId": 79, "wordCount": 229 }
}
```
### **Digital Ocean Integration**
- Bucket: `autocollant`
- Path pattern: `/templates/{filename}`
- Cache dans `./cache/templates/`
- Timeout: 10s
---
## 🚨 **POINTS D'ATTENTION**
- [ ] **Gestion erreurs réseau** (Google Sheets + Digital Ocean)
- [ ] **Persistance état** pour reprendre après crash
- [ ] **Limitations rate LLM** à surveiller
- [ ] **WebSocket disconnections** à gérer
- [ ] **Concurrent access** si plusieurs utilisateurs
---
**🕐 Dernière mise à jour**: 2025-09-18 06:50:00
**👤 Assigné à**: Claude Code
**🎯 Deadline**: À définir avec utilisateur