digraph macro_dat { rankdir=TB; fontname="Arial"; node [fontname="Arial", fontsize=10, style=filled, shape=record]; edge [fontname="Arial", fontsize=9]; label="FabNum — Macro-DAT (Diagramme d'Activités Technique)\n\n"; labelloc=t; fontsize=16; compound=true; // ==================== COUCHE STOCKAGE ==================== subgraph cluster_stockage { label="COUCHE STOCKAGE"; style=filled; color="#E3F2FD"; fontsize=13; fontcolor="#1565C0"; base_graphe [label="Base graphe\n(Neo4j / PG+AGE / ArangoDB)|• Nœuds (tous niveaux)\n• Arêtes + attributs\n• Multi-graphes\n• Schéma évolutif\n• Open source", fillcolor="#BBDEFB"]; historisation [label="Historisation|• Snapshots horodatés\n• Versions données\n• Versions indices\n• Audit trail", fillcolor="#BBDEFB"]; sources_db [label="Référentiel sources|• Sources catégorisées\n• Tiers de confiance\n (par domaine)\n• Liens source↔donnée", fillcolor="#BBDEFB"]; } // ==================== COUCHE MOTEUR ==================== subgraph cluster_moteur { label="COUCHE MOTEUR (Python)"; style=filled; color="#E8F5E9"; fontsize=13; fontcolor="#2E7D32"; subgraph cluster_calcul { label="Calcul"; style=filled; color="#C8E6C9"; calcul_indices [label="Calcul indices|IHH, ICS, IVC, ISG\n+ futurs (eau, énergie)\nPré-calcul à chaque MAJ", fillcolor="#A5D6A7"]; meta_indices [label="Méta-indices|Calcul dynamique\nsur sous-graphe\nsélectionné", fillcolor="#A5D6A7"]; } subgraph cluster_qualite { label="Qualité données"; style=filled; color="#C8E6C9"; arbitrage [label="Arbitrage sources|Tier 1 par défaut\nConvergence → alerte\nSeuils variation", fillcolor="#A5D6A7"]; qualification [label="Qualification|Filtres qualité\nIndice fiabilité\nPérimètre mesuré", fillcolor="#A5D6A7"]; } subgraph cluster_requetage { label="Requêtage"; style=filled; color="#C8E6C9"; chemins [label="Traversée graphe|Chemins critiques\nFiltrage multi-critères\nSous-graphes", fillcolor="#A5D6A7"]; projection [label="Projection SI|Mapping SI client\nsur graphe FabNum\n(stateless)", fillcolor="#A5D6A7"]; } subgraph cluster_generation { label="Génération"; style=filled; color="#C8E6C9"; templates [label="Templates fiches|Niveau × usage\nExpertise / Synthèse\nAPI / JSON", fillcolor="#A5D6A7"]; import_export [label="Import / Export|DOT (legacy)\nJSON\nPDF\nBackup / Restore", fillcolor="#A5D6A7"]; } } // ==================== SERVICES INTERNES ==================== subgraph cluster_services_internes { label="SERVICES INTERNES (non exposés)"; style=filled; color="#FFF3E0"; fontsize=13; fontcolor="#E65100"; veille [label="Veille sources\n(huginn)|Détection MAJ\nNouvelles sources\nDisparitions", fillcolor="#FFE0B2"]; verif_citations [label="Vérification\ncitations|verify-citations\n(à faire évoluer)", fillcolor="#FFE0B2"]; recalcul [label="Recalcul\nindices|Déclenché par\nMAJ graphe\n(mensuel → trim.)", fillcolor="#FFE0B2"]; alertes [label="Alertes|Variations anormales\nConvergence sources\nÉvénements climat.", fillcolor="#FFE0B2"]; } // ==================== API REST ==================== subgraph cluster_api { label="API REST (point d'accès unique)"; style=filled; color="#F3E5F5"; fontsize=13; fontcolor="#6A1B9A"; subgraph cluster_securite { label="Sécurité"; style=filled; color="#E1BEE7"; auth [label="Authentification|User / API key\nRôles (admin/expert/service)", fillcolor="#CE93D8"]; profils [label="Profils visibilité|Chaîne principale / +connexes\nIndices complets / partiels\nPrédéfinis / sur mesure", fillcolor="#CE93D8"]; rate_limit [label="Rate limiting\n+ Monitoring|Logging structuré\nMétriques\nAlerting", fillcolor="#CE93D8"]; } subgraph cluster_endpoints { label="Endpoints"; style=filled; color="#E1BEE7"; ep_graphe [label="/graphe/*|Requêtage\n(expert / simplifié)", fillcolor="#CE93D8"]; ep_fiches [label="/fiches/*|Consultation\n(tous formats)", fillcolor="#CE93D8"]; ep_analyse [label="/analyse/*|Vulnérabilités\nScénarios", fillcolor="#CE93D8"]; ep_indices [label="/indices/*|Méta-indices\ndynamiques", fillcolor="#CE93D8"]; ep_export [label="/export/*|PDF, JSON, DOT", fillcolor="#CE93D8"]; ep_admin [label="/admin/*|CRUD graphe\nGestion sources\nTiers, arbitrage", fillcolor="#CE93D8"]; } } // ==================== CONSOMMATEURS ==================== subgraph cluster_consommateurs { label="CONSOMMATEURS"; style=filled; color="#ECEFF1"; fontsize=13; fontcolor="#37474F"; frontend [label="Frontend expert|COMEX : synthèses\nMétiers : analyse opérat.\nDSAI : dépendances SI", fillcolor="#CFD8DC", shape=house]; services_ext [label="Services externes|Génération IA rapports\nAgent local client\nExport manuel", fillcolor="#CFD8DC", shape=house]; ecosysteme [label="Écosystème 360°|Veille stratégique\nIRON\nAlertes croisées", fillcolor="#CFD8DC", shape=house]; } // Admin admin [label="Admin (scripts)|CRUD graphe\nGestion sources\nTiers, arbitrage\nBackup / restore", fillcolor="#FFCC80", shape=hexagon]; // ==================== LIENS ==================== // Stockage → Moteur base_graphe -> chemins [color="#1565C0"]; base_graphe -> calcul_indices [color="#1565C0"]; historisation -> meta_indices [style=dashed, color="#1565C0"]; sources_db -> arbitrage [color="#1565C0"]; sources_db -> qualification [color="#1565C0"]; // Moteur → Services internes calcul_indices -> recalcul [color="#E65100"]; arbitrage -> alertes [color="#E65100"]; qualification -> verif_citations [color="#E65100", style=dashed]; // Moteur → API chemins -> ep_graphe [color="#6A1B9A"]; meta_indices -> ep_indices [color="#6A1B9A"]; templates -> ep_fiches [color="#6A1B9A"]; import_export -> ep_export [color="#6A1B9A"]; projection -> ep_graphe [color="#6A1B9A", style=dashed]; calcul_indices -> ep_analyse [color="#6A1B9A"]; // Sécurité → Endpoints auth -> ep_graphe [style=dotted, color="#6A1B9A"]; profils -> ep_graphe [style=dotted, color="#6A1B9A"]; // API → Consommateurs ep_graphe -> frontend [color="#37474F", penwidth=1.5]; ep_fiches -> frontend [color="#37474F", penwidth=1.5]; ep_analyse -> frontend [color="#37474F", penwidth=1.5]; ep_export -> services_ext [color="#37474F", penwidth=1.5]; ep_graphe -> ecosysteme [color="#37474F", penwidth=1.5]; ep_indices -> ecosysteme [color="#37474F", penwidth=1.5]; ep_graphe -> services_ext [color="#37474F", penwidth=1.5]; // Admin admin -> ep_admin [color="#E65100", penwidth=2]; admin -> base_graphe [color="#E65100", penwidth=2, label="accès\ndirect"]; // Services internes → Stockage (boucle) veille -> sources_db [color="#E65100", style=dashed, label="MAJ\nsources"]; recalcul -> base_graphe [color="#E65100", style=dashed, label="MAJ\nindices"]; alertes -> admin [color="#E65100", style=dashed, label="notification"]; }