fix(adr-023/024/025): restaurer diagrammes Mermaid

Les diagrammes Mermaid sont utiles pour visualiser l'architecture
et ne posent pas de problème de doublon code/doc.

Restauration des 3 diagrammes :
- ADR-023 : Flux modération (Client → API → Worker → IA → Dashboard)
- ADR-024 : Stack monitoring (Services → Prometheus/Grafana → Alerting)
- ADR-025 : Architecture secrets (Dev/Prod → Vault → Encryption)

Code textuel (SQL, bash, Go, YAML) reste retiré comme demandé.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
jpgiannetti
2026-02-01 17:55:58 +01:00
parent 81ccbf79e6
commit 78b723baa3
3 changed files with 151 additions and 35 deletions

View File

@@ -28,15 +28,54 @@ Architecture hybride **humain + IA** avec file d'attente intelligente.
### Architecture
**Flux de traitement** :
1. **Client** (App Mobile/Web) → Signalement utilisateur
2. **API Backend** (Fiber) → Endpoint `/moderation/report`
3. **Queue PostgreSQL** → LISTEN/NOTIFY pour dispatch asynchrone
4. **Worker Go** → Goroutine de traitement (transcription + analyse)
5. **IA Self-hosted** → Whisper large-v3 (transcription) + distilbert/roberta (NLP)
6. **Cache Redis** → Sorted Sets pour priorisation temps réel
7. **Dashboard React** → Interface modérateurs avec Wavesurfer.js (player audio)
8. **Stockage** → PostgreSQL (signalements + logs audit) + Redis (cache priorisation)
```mermaid
graph TB
subgraph Client["App Mobile/Web"]
Report["Signalement utilisateur"]
end
subgraph Backend["Backend Go"]
API["API Fiber<br/>/moderation/report"]
Queue["PostgreSQL Queue<br/>LISTEN/NOTIFY"]
Worker["Worker Go<br/>(transcription + NLP)"]
end
subgraph AI["IA Self-hosted"]
Whisper["Whisper large-v3<br/>(transcription)"]
NLP["distilbert<br/>(sentiment + haine)"]
end
subgraph Moderation["Modération Dashboard"]
Dashboard["React Dashboard"]
Player["Wavesurfer.js<br/>(lecture audio)"]
end
subgraph Storage["Stockage"]
DB["PostgreSQL<br/>(signalements + logs)"]
Redis["Redis<br/>(priorisation + cache)"]
end
Report --> API
API --> Queue
Queue --> Worker
Worker --> Whisper
Whisper --> NLP
NLP --> Redis
Worker --> DB
Dashboard --> Player
Dashboard --> Redis
Dashboard --> DB
classDef clientStyle fill:#e3f2fd,stroke:#1565c0
classDef backendStyle fill:#fff3e0,stroke:#e65100
classDef aiStyle fill:#f3e5f5,stroke:#6a1b9a
classDef storageStyle fill:#e8f5e9,stroke:#2e7d32
class Client,Report clientStyle
class Backend,API,Queue,Worker backendStyle
class AI,Whisper,NLP aiStyle
class Storage,DB,Redis storageStyle
```
### Workflow de Traitement