docs: ajout de la documentation complète de l'intégration ihm_client - Architecture détaillée des services - Configuration et variables d'environnement - Scripts de démarrage et commandes utiles - URLs d'accès et fonctionnalités - Guide de troubleshooting et maintenance
Some checks are pending
CI - 4NK Node / Code Quality (push) Waiting to run
CI - 4NK Node / Unit Tests (push) Waiting to run
CI - 4NK Node / Integration Tests (push) Waiting to run
CI - 4NK Node / Security Tests (push) Waiting to run
CI - 4NK Node / Performance Tests (push) Waiting to run
CI - 4NK Node / Notify (push) Blocked by required conditions
CI - 4NK Node / Docker Build & Test (push) Waiting to run
CI - 4NK Node / Documentation Tests (push) Waiting to run
Some checks are pending
CI - 4NK Node / Code Quality (push) Waiting to run
CI - 4NK Node / Unit Tests (push) Waiting to run
CI - 4NK Node / Integration Tests (push) Waiting to run
CI - 4NK Node / Security Tests (push) Waiting to run
CI - 4NK Node / Performance Tests (push) Waiting to run
CI - 4NK Node / Notify (push) Blocked by required conditions
CI - 4NK Node / Docker Build & Test (push) Waiting to run
CI - 4NK Node / Documentation Tests (push) Waiting to run
This commit is contained in:
parent
7610ebcb69
commit
e4cc35a07d
295
docs/INTEGRATION_IHM_CLIENT.md
Normal file
295
docs/INTEGRATION_IHM_CLIENT.md
Normal file
@ -0,0 +1,295 @@
|
||||
# Intégration de ihm_client dans 4NK_node
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
L'interface utilisateur `ihm_client` a été intégrée avec succès dans l'infrastructure `4NK_node`, permettant une expérience utilisateur complète pour interagir avec les Silent Payments.
|
||||
|
||||
## Architecture
|
||||
|
||||
### Services intégrés
|
||||
|
||||
1. **ihm_client** - Interface utilisateur web
|
||||
- Port: 8080
|
||||
- URL: http://localhost:8080
|
||||
- Technologie: TypeScript + Vite + Vue.js
|
||||
|
||||
2. **sdk_relay_1, sdk_relay_2, sdk_relay_3** - Relais Silent Payments
|
||||
- Ports: 8090-8095
|
||||
- Technologie: Rust
|
||||
|
||||
3. **bitcoin** - Nœud Bitcoin Signet
|
||||
- Port: 18443 (RPC)
|
||||
- Technologie: Bitcoin Core
|
||||
|
||||
4. **blindbit** - Oracle Blindbit
|
||||
- Port: 8000
|
||||
- Technologie: Rust
|
||||
|
||||
### Communication entre services
|
||||
|
||||
```
|
||||
ihm_client (8080)
|
||||
↓ HTTP/WebSocket
|
||||
sdk_relay_1 (8090/8091)
|
||||
↓ P2P
|
||||
sdk_relay_2 (8092/8093)
|
||||
↓ P2P
|
||||
sdk_relay_3 (8094/8095)
|
||||
↓ RPC
|
||||
bitcoin (18443)
|
||||
↓ API
|
||||
blindbit (8000)
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Variables d'environnement
|
||||
|
||||
Le service `ihm_client` est configuré avec les variables d'environnement suivantes :
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- SDK_RELAY_WS_URL=ws://sdk_relay_1:8090
|
||||
- SDK_RELAY_HTTP_URL=http://sdk_relay_1:8091
|
||||
- BITCOIN_RPC_URL=http://bitcoin:18443
|
||||
- BLINDBIT_URL=http://blindbit:8000
|
||||
```
|
||||
|
||||
### Dépendances
|
||||
|
||||
- `ihm_client` dépend de `sdk_relay_1`, `sdk_relay_2`, `sdk_relay_3`
|
||||
- Les SDK relays dépendent de `bitcoin` et `blindbit`
|
||||
- `blindbit` dépend de `bitcoin`
|
||||
|
||||
## Démarrage
|
||||
|
||||
### Script de démarrage complet
|
||||
|
||||
```bash
|
||||
./start-4nk-node-with-ui.sh
|
||||
```
|
||||
|
||||
Ce script :
|
||||
1. Arrête et nettoie les conteneurs existants
|
||||
2. Démarre tous les services
|
||||
3. Vérifie la santé de chaque service
|
||||
4. Affiche les URLs d'accès
|
||||
|
||||
### Script de démarrage UI uniquement
|
||||
|
||||
```bash
|
||||
./start-ihm-client.sh
|
||||
```
|
||||
|
||||
Ce script démarre uniquement l'interface utilisateur.
|
||||
|
||||
### Démarrage manuel
|
||||
|
||||
```bash
|
||||
# Démarrer tous les services
|
||||
docker-compose up -d
|
||||
|
||||
# Démarrer uniquement l'interface utilisateur
|
||||
docker-compose up -d ihm_client
|
||||
```
|
||||
|
||||
## URLs d'accès
|
||||
|
||||
| Service | URL | Description |
|
||||
|---------|-----|-------------|
|
||||
| Interface utilisateur | http://localhost:8080 | Interface web principale |
|
||||
| Bitcoin RPC | http://localhost:18443 | API Bitcoin |
|
||||
| Blindbit | http://localhost:8000 | Oracle Blindbit |
|
||||
| SDK Relay 1 | http://localhost:8091 | Relais 1 HTTP |
|
||||
| SDK Relay 2 | http://localhost:8093 | Relais 2 HTTP |
|
||||
| SDK Relay 3 | http://localhost:8095 | Relais 3 HTTP |
|
||||
|
||||
## Commandes utiles
|
||||
|
||||
### Vérification du statut
|
||||
|
||||
```bash
|
||||
# Statut de tous les services
|
||||
docker-compose ps
|
||||
|
||||
# Logs d'un service spécifique
|
||||
docker-compose logs ihm_client
|
||||
docker-compose logs sdk_relay_1
|
||||
docker-compose logs bitcoin
|
||||
```
|
||||
|
||||
### Gestion des services
|
||||
|
||||
```bash
|
||||
# Redémarrer un service
|
||||
docker-compose restart ihm_client
|
||||
|
||||
# Arrêter tous les services
|
||||
docker-compose down
|
||||
|
||||
# Reconstruire un service
|
||||
docker-compose build ihm_client
|
||||
```
|
||||
|
||||
### Debugging
|
||||
|
||||
```bash
|
||||
# Accéder au conteneur ihm_client
|
||||
docker exec -it 4nk-ihm-client bash
|
||||
|
||||
# Vérifier les logs en temps réel
|
||||
docker-compose logs -f ihm_client
|
||||
```
|
||||
|
||||
## Fonctionnalités de l'interface utilisateur
|
||||
|
||||
### Pages principales
|
||||
|
||||
1. **Accueil** - Vue d'ensemble et navigation
|
||||
2. **Compte** - Gestion du profil utilisateur
|
||||
3. **Processus** - Création et gestion des processus
|
||||
4. **Signature** - Signatures de documents
|
||||
5. **Chat** - Communication entre membres
|
||||
|
||||
### Fonctionnalités clés
|
||||
|
||||
- **Pairing** - Connexion avec d'autres utilisateurs
|
||||
- **Wallet** - Gestion des Silent Payments
|
||||
- **Documents** - Validation et signature de documents
|
||||
- **Notifications** - Système de notifications en temps réel
|
||||
- **QR Code** - Scanner et génération de QR codes
|
||||
|
||||
## Développement
|
||||
|
||||
### Structure des fichiers
|
||||
|
||||
```
|
||||
4NK_node/
|
||||
├── ihm_client/ # Interface utilisateur
|
||||
│ ├── src/ # Code source TypeScript
|
||||
│ ├── public/ # Assets statiques
|
||||
│ ├── Dockerfile # Configuration Docker
|
||||
│ ├── nginx.conf # Configuration Nginx
|
||||
│ └── start.sh # Script de démarrage
|
||||
├── docker-compose.yml # Orchestration des services
|
||||
└── start-*.sh # Scripts de démarrage
|
||||
```
|
||||
|
||||
### Compilation
|
||||
|
||||
L'interface utilisateur est compilée automatiquement lors du build Docker :
|
||||
|
||||
```bash
|
||||
# Build manuel
|
||||
docker-compose build ihm_client
|
||||
|
||||
# Build avec cache
|
||||
docker-compose build --no-cache ihm_client
|
||||
```
|
||||
|
||||
### Développement local
|
||||
|
||||
Pour développer l'interface utilisateur localement :
|
||||
|
||||
```bash
|
||||
cd ihm_client
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Monitoring et logs
|
||||
|
||||
### Health checks
|
||||
|
||||
Chaque service dispose d'un health check configuré :
|
||||
|
||||
- **ihm_client** : Vérification HTTP sur localhost
|
||||
- **sdk_relay** : Script de vérification personnalisé
|
||||
- **bitcoin** : Commande `getblockchaininfo`
|
||||
|
||||
### Logs
|
||||
|
||||
Les logs sont configurés avec rotation :
|
||||
|
||||
```yaml
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
```
|
||||
|
||||
## Sécurité
|
||||
|
||||
### Variables d'environnement
|
||||
|
||||
Les variables sensibles sont configurées via les variables d'environnement Docker.
|
||||
|
||||
### Réseau
|
||||
|
||||
Tous les services communiquent via le réseau Docker `btcnet` isolé.
|
||||
|
||||
### Volumes
|
||||
|
||||
Les données persistantes sont stockées dans des volumes Docker nommés.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Problèmes courants
|
||||
|
||||
1. **Service ne démarre pas**
|
||||
```bash
|
||||
docker-compose logs <service_name>
|
||||
```
|
||||
|
||||
2. **Port déjà utilisé**
|
||||
```bash
|
||||
sudo netstat -tulpn | grep :8080
|
||||
```
|
||||
|
||||
3. **Problème de compilation**
|
||||
```bash
|
||||
docker-compose build --no-cache ihm_client
|
||||
```
|
||||
|
||||
### Logs de debug
|
||||
|
||||
Pour activer les logs de debug :
|
||||
|
||||
```bash
|
||||
# SDK relays
|
||||
export RUST_LOG=debug
|
||||
|
||||
# Interface utilisateur
|
||||
docker-compose logs -f ihm_client
|
||||
```
|
||||
|
||||
## Maintenance
|
||||
|
||||
### Mise à jour
|
||||
|
||||
```bash
|
||||
# Mettre à jour depuis le repository
|
||||
git pull origin main
|
||||
|
||||
# Reconstruire les services
|
||||
docker-compose build
|
||||
|
||||
# Redémarrer
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Sauvegarde
|
||||
|
||||
```bash
|
||||
# Sauvegarder les volumes
|
||||
docker run --rm -v 4nk_node_bitcoin_data:/data -v $(pwd):/backup alpine tar czf /backup/backup.tar.gz -C /data .
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
Pour toute question ou problème :
|
||||
|
||||
1. Vérifier les logs : `docker-compose logs`
|
||||
2. Consulter la documentation : `docs/`
|
||||
3. Créer une issue sur le repository Gitea
|
Loading…
x
Reference in New Issue
Block a user