====================================================================
FICHIER : SEEDBOX_MANAGER_STRUCTURE_SYNTHESIS.txt
PROJET : Seedbox Manager
PHASE : COMPARAISON ARCHIVES + MÉMOIRE
OBJET : Cartographie logique et documentaire complète
VERSION : Pré-synthèse – [date de génération]
====================================================================

1. PRESENTATION GENERALE DU PROJET
----------------------------------
1.1 Objectif principal
(à compléter à partir de README.md et project_resume.md)
Décrire la finalité du projet Seedbox Manager : automatisation, supervision, orchestration multi-services, intégration Docker, etc.

1.2 Contexte d’exécution
- Environnement : OpenMediaVault (OMV)
- Système de stockage : NVMe (Hot) ↔ Synology NAS (Warm)
- Gestion des conteneurs : Docker Compose via OMV-Extras
- Objectif de gouvernance : intégration future dans la structure ChatGPT-Gouvernance-Projets.

--------------------------------------------------------------------
2. STRUCTURE LOGIQUE DU PROJET
--------------------------------------------------------------------

Niveau | Domaine | Description | Statut
---------------------------------------------------------------
1 | Autobrr ↔ Sonarr/Radarr ↔ qBittorrent | Chaîne de traitement principale : parsing torrent, push vers ARR, API qBittorrent | Stabilisation en cours
2 | Monitoring & Notifications | Notifiarr, logs, rapport journalier, alertes | Planifié
3 | Rotation Hot → Warm (NVMe → Synology) | Hardlink sync, DEX-LAR, index, gestion d’état | En diagnostic
4 | Seedbox Manager Orchestrator | Interface de pilotage centralisée façon Proxmox | Phase MVP
5 | Sécurité et maintenance | Reverse proxy, snapshots, sauvegardes, authentification | À venir

--------------------------------------------------------------------
3. SOUS-PROJETS ET MODULES IDENTIFIES
--------------------------------------------------------------------

Chaque sous-projet sera documenté avec :
- Objectif spécifique
- Scripts associés
- Flux de données
- Interconnexions
- État d’avancement

3.1 Autobrr
- Fichiers : autobrr_push_sonarr.sh, autobrr_push_radarr.sh
- Objectif : Transmission sélective de torrents aux modules ARR
- Points clefs : configuration des filtres, logs, priorités
- Étape actuelle : v5.0 hybrid sh + Python (stabilisation)

3.2 Sonarr / Radarr
- Intégration via API (GET /api/v3/indexer/{id} + PUT)
- Gestion de l’état des indexeurs et des triggers
- Suivi des scripts de toggle recherche (Windows & Linux)

3.3 qBittorrent
- Gestion de l’état des torrents, API setLocation, recheck, rename
- Synchronisation NVMe ↔ NAS
- Vérification des fichiers .torrent et index DEX-LAR

3.4 Notifiarr & Reporting
- Rapport journalier, rotation des logs, système de notification
- Préparation de l’intégration Notifiarr dans le flux stable (autobrr_arr_stable_v1.0)

3.5 Orchestrateur Seedbox Manager
- Objectif : interface de supervision unique
- État : planifié dans Phase 3 – Développement
- Technologies : Python + API ARR + qBittorrent + NFS tools

--------------------------------------------------------------------
4. ARBORESCENCE DOCUMENTAIRE DE REFERENCE
--------------------------------------------------------------------

Dossier | Contenu principal
---------------------------------------------------------------
/scripts | Scripts shell et Python pour flux ARR, DEX-LAR, rotation
/config | Fichiers de configuration des conteneurs et scripts .env
/compose | Docker Compose par service (Autobrr, Sonarr, Radarr, qBittorrent)
/logs | Journaux d’exécution, rotation, état des flux
/docs | Documentation technique et fonctionnelle
/archive | Sauvegardes automatiques des scripts et logs

--------------------------------------------------------------------
5. CHRONOLOGIE DU PROJET (EXTRAIT CHANGE_LOG)
--------------------------------------------------------------------

Version | Date | Description | Statut
---------------------------------------------------------------
v1.0 | – | Premiers scripts ARR + Autobrr | Stable
v2.0 | – | Intégration qBittorrent | Stable
v3.0 | – | Refonte avec scripts /bin/sh universels | Validé
v4.0 | – | Migration vers flux hybride sh + Python | En cours
v5.0 | – | Préparation monitoring + notifications | Planifié

--------------------------------------------------------------------
6. GOUVERNANCE DOCUMENTAIRE ET SYNCHRONISATION
--------------------------------------------------------------------

6.1 Emplacement OneDrive de référence
C:\Users\mouss\OneDrive\SeedboxManager

6.2 Synchronisation Git/OneDrive
- Git local pour historique de versions
- OneDrive pour archivage et déploiement stable
- Scripts : maintenance_auto.ps1, update_todo.ps1, rotation_logs.ps1

6.3 Points de contrôle
- Mises à jour automatiques des fichiers .md après chaque modification
- Génération automatique du document de configuration global (CONFIG_GLOBAL.md)

--------------------------------------------------------------------
7. CHECKLISTS ET DIAGNOSTICS INTEGRES
--------------------------------------------------------------------

7.1 Diagnostic DEX-LAR / Hardlink Sync
Bloc de commandes NAS :
echo "=== [1/4] LISTE DES SCRIPTS ==="
ls -R /srv/dev-disk-by-uuid-*/data/scripts 2>/dev/null | grep -E "\.sh|\.py|dex|mirror|rotate|lar" || echo "Aucun script détecté"
...

7.2 Vérification des logs et mappings
- Analyse des fichiers .state, .map, .index
- Corrélation NVMe ↔ Synology
- Vérification des hardlinks et montages NFS/SMB

--------------------------------------------------------------------
8. LIENS INTER-PROJETS ET DEPENDANCES
--------------------------------------------------------------------

Projet lié | Nature du lien | Description
---------------------------------------------------------------
Hub Lyon Lumière – Analyse Production | méthodologique | Standardisation documentaire (structure, pipeline, archivage)
Formation Python | technique | Modules Python intégrables au flux ARR et monitoring
ChatGPT-Gouvernance-Projets | gouvernance | Centralisation et automatisation de la documentation et des archives

--------------------------------------------------------------------
9. PROCHAINES ETAPES
--------------------------------------------------------------------

Étape | Description | Responsable | Statut
---------------------------------------------------------------
1 | Analyse des fichiers d’archives Seedbox Manager | ChatGPT | En attente des fichiers
2 | Croisement des données (archives ↔ mémoire) | ChatGPT | À lancer
3 | Rédaction de la synthèse finale | ChatGPT | Planifié
4 | Intégration dans ChatGPT-Gouvernance-Projets | Mouss + ChatGPT | À venir

====================================================================
FIN DU DOCUMENT - PRE-SYNTHESE
====================================================================
