ncantu 26a53327a4 Enhance: Complete dashboard documentation and new services integration
**Motivations:**
- Complete documentation for dashboard, domains, ports and environment configuration
- Add new services (ClamAV API, Watermark API) to the infrastructure
- Enhance dashboard with new pages and improved functionality
- Improve deployment scripts and service configurations

**Root causes:**
- Missing comprehensive documentation for infrastructure setup
- Need for antivirus scanning service integration
- Need for watermark service integration
- Dashboard required additional pages and features

**Correctifs:**
- Added comprehensive documentation in docs/ (DASHBOARD.md, DOMAINS_AND_PORTS.md, ENVIRONMENT.md)
- Updated systemd service files with proper environment variables
- Enhanced nginx proxy configuration script
- Updated maintenance documentation

**Evolutions:**
- Added new ClamAV API service (api-clamav) for file scanning
- Added new Watermark API service (api-filigrane) for document watermarking
- Enhanced signet-dashboard with new learn.html page
- Improved dashboard UI with better styles and navigation
- Enhanced app.js with new functionality and better error handling
- Updated API documentation page with complete endpoint descriptions
- Added deployment scripts for watermark and nginx configuration
- Updated hash and UTXO lists with latest data
- Enhanced server.js with new routes and improved Bitcoin RPC integration

**Pages affectées:**
- docs/DASHBOARD.md: New comprehensive dashboard documentation
- docs/DOMAINS_AND_PORTS.md: New infrastructure domains and ports documentation
- docs/ENVIRONMENT.md: New environment variables documentation
- docs/MAINTENANCE.md: Updated maintenance procedures
- docs/README.md: Updated main documentation
- signet-dashboard/public/app.js: Enhanced with new features
- signet-dashboard/public/styles.css: Improved styling
- signet-dashboard/public/index.html: Enhanced main page
- signet-dashboard/public/learn.html: New educational page
- signet-dashboard/public/api-docs.html: Enhanced API documentation
- signet-dashboard/public/hash-list.html: Updated hash list page
- signet-dashboard/public/utxo-list.html: Updated UTXO list page
- signet-dashboard/public/join-signet.html: Updated join signet page
- signet-dashboard/src/server.js: Enhanced server with new routes
- signet-dashboard/start.sh: Updated startup script
- signet-dashboard/signet-dashboard.service: Updated systemd service
- api-anchorage/anchorage-api.service: Updated systemd service
- api-faucet/faucet-api.service: Updated systemd service
- configure-nginx-proxy.sh: Enhanced nginx configuration script
- add-watermark-certificate.sh: New watermark certificate script
- deploy-watermark-nginx.sh: New deployment script
- api-clamav/: New ClamAV API service
- api-filigrane/: New Watermark API service
- hash_list.txt, utxo_list.txt: Updated with latest data
- anchor_count.txt: Updated anchor count
2026-01-25 17:43:05 +01:00

222 lines
12 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bitcoin Ancrage - Dashboard de Supervision</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header>
<h1>Bitcoin Ancrage - Dashboard de Supervision</h1>
<p class="subtitle">Surveillance de la blockchain et outils de test</p>
<p class="external-links">
<a href="https://mempool.4nkweb.com/fr/" target="_blank" rel="noopener noreferrer" class="external-link">
🔗 Explorer Mempool
</a>
<a href="/hash-list" class="external-link">
📋 Liste des Hash
</a>
<a href="/utxo-list" class="external-link">
✅ Liste des UTXO
</a>
<a href="/join-signet" class="external-link">
🔗 Rejoindre le Réseau
</a>
<a href="/api-docs" class="external-link">
📚 Documentation API
</a>
<a href="/learn" class="external-link">
📖 Apprendre Bitcoin
</a>
</p>
</header>
<main>
<!-- Section Supervision -->
<section class="supervision-section">
<h2>État de la Blockchain</h2>
<div class="grid">
<div class="card">
<h3>Hauteur de Bloc</h3>
<p class="value" id="block-height">-</p>
</div>
<div class="card">
<h3>Dernier Bloc Miné</h3>
<p class="value" id="last-block-time">-</p>
</div>
<div class="card">
<h3>Transactions dans le Dernier Bloc</h3>
<p class="value" id="last-block-tx-count">-</p>
</div>
<div class="card">
<h3>Balance Mature</h3>
<p class="value" id="balance-mature">-</p>
</div>
<div class="card">
<h3>Balance Immature</h3>
<p class="value" id="balance-immature">-</p>
</div>
<div class="card">
<h3>Nombre d'Ancrages</h3>
<p class="value" id="anchor-count">
<span id="anchor-count-value">-</span>
<span id="anchor-count-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Nombre de Pairs</h3>
<p class="value" id="peer-count">-</p>
</div>
<div class="card">
<h3>Difficulté de Minage</h3>
<p class="value" id="mining-difficulty">-</p>
</div>
<div class="card">
<h3>Temps Moyen entre Blocs</h3>
<p class="value" id="avg-block-time">
<span id="avg-block-time-value">-</span>
<span id="avg-block-time-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Frais Moyens</h3>
<p class="value" id="avg-fee">
<span id="avg-fee-value">-</span>
<span id="avg-fee-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Montant Moyen des Transactions</h3>
<p class="value" id="avg-tx-amount">
<span id="avg-tx-amount-value">-</span>
<span id="avg-tx-amount-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
</div>
</section>
<!-- Section Test d'Ancrage -->
<section class="anchor-section">
<h2>Test de l'API d'Ancrage</h2>
<div class="card">
<label for="anchor-api-key">Clé API :</label>
<input type="text" id="anchor-api-key" placeholder="Entrez votre clé API">
<div class="tabs">
<button class="tab-button active" onclick="switchTab('text', this)">Saisie de Texte</button>
<button class="tab-button" onclick="switchTab('file', this)">Sélection de Fichier</button>
</div>
<div id="text-tab" class="tab-content active">
<label for="anchor-text">Texte à ancrer :</label>
<textarea id="anchor-text" rows="5" placeholder="Entrez le texte à ancrer..."></textarea>
<button onclick="generateHashFromText()">Générer le Hash</button>
</div>
<div id="file-tab" class="tab-content">
<label for="anchor-file">Fichier à ancrer :</label>
<input type="file" id="anchor-file" onchange="handleFileSelect(event)">
<div id="file-info" class="file-info"></div>
<button onclick="generateHashFromFile()">Générer le Hash</button>
</div>
<div class="hash-section">
<label for="anchor-hash">Hash SHA256 :</label>
<input type="text" id="anchor-hash" placeholder="Le hash sera généré automatiquement...">
<div class="hash-buttons">
<button onclick="verifyHash()">Vérifier le Hash</button>
<button onclick="anchorDocument()">Ancrer le Document</button>
</div>
</div>
<div id="anchor-result" class="result"></div>
<div class="watermark-section" style="margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--border-color);">
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-enabled" onchange="toggleWatermarkOptions()">
<label for="watermark-enabled">Ajouter un filigrane au document</label>
</div>
<div id="watermark-options" style="display: none; margin-top: 15px;">
<div class="security-warning">
<strong>⚠️ Avertissement de sécurité</strong>
<p>
<strong>Le serveur ne stocke pas vos documents.</strong> Cependant, soyez vigilant :
HTTPS n'est pas une protection parfaite et les navigateurs sont très imparfaits.
Évitez d'envoyer des documents contenant des informations sensibles ou confidentielles.
</p>
</div>
<label for="watermark-text">Texte libre du filigrane (optionnel) :</label>
<input type="text" id="watermark-text" placeholder="Texte à afficher dans le filigrane">
<label for="watermark-signature">Signature cryptographique (optionnel) :</label>
<input type="text" id="watermark-signature" placeholder="Signature à afficher dans le filigrane">
<label for="watermark-depositor">Nom du dépositaire (optionnel) :</label>
<input type="text" id="watermark-depositor" placeholder="Nom du dépositaire">
<label for="watermarked-filename">Nom de fichier du PDF filigrané (optionnel) :</label>
<input type="text" id="watermarked-filename" placeholder="Si vide, utilise le nom d'origine avec extension .pdf">
<label for="original-filename">Nom de fichier du document d'origine (optionnel) :</label>
<input type="text" id="original-filename" placeholder="Si vide et texte saisi, utilise 'origin.md'">
<div class="watermark-checkboxes" style="margin-top: 15px;">
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-date-utc">
<label for="watermark-date-utc">Ajouter la date UTC</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-date-local">
<label for="watermark-date-local">Ajouter la date locale</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-block-number">
<label for="watermark-block-number">Ajouter le numéro de bloc</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-block-hash">
<label for="watermark-block-hash">Ajouter le hash du bloc</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="watermark-document-hash">
<label for="watermark-document-hash">Ajouter le hash du document d'origine</label>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Section Faucet -->
<section class="faucet-section">
<h2>Faucet Bitcoin Ancrage</h2>
<div class="card">
<p>Recevez 50 000 ✅ (0.0005 🛡) sur votre adresse Bitcoin Ancrage</p>
<label for="faucet-api-key">Clé API :</label>
<input type="text" id="faucet-api-key" placeholder="Entrez votre clé API">
<label for="faucet-address">Adresse Bitcoin :</label>
<input type="text" id="faucet-address" placeholder="tb1q..." pattern="^(tb1|bcrt1|2|3)[a-zA-HJ-NP-Z0-9]{25,62}$">
<button onclick="requestFaucet()">Demander des ✅</button>
<div id="faucet-result" class="result"></div>
</div>
</section>
</main>
<footer>
<p>Bitcoin Ancrage Dashboard - Équipe 4NK</p>
<p>Dernière mise à jour : <span id="last-update">-</span></p>
<a href="https://git.4nkweb.com/4nk/anchorage_layer_simple.git" target="_blank" rel="noopener noreferrer" class="git-link" title="Voir le code source sur Git">
<svg class="git-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
</a>
</footer>
</div>
<script src="app.js?v=20260124"></script>
</body>
</html>