diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..fae79b5 --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,20 @@ +# Architecture - SDK Relay + +## Composants +- Service Rust WebSocket relay + intégration Bitcoin/BlindBit. + +## Dépendances +- `bitcoin` (RPC/ZMQ), `blindbit-proxy`, `sdk_storage`. + +## Réseau et ports +- WS: `0.0.0.0:8090` (exposé derrière Nginx `wss://dev4.4nkweb.com/ws/`). + +## Variables d’environnement (centralisées) +- `SDK_RELAY_*` depuis `lecoffre_node/.env.master`. + +## Monitoring +- Healthcheck avec progression IBD/attentes. +- Logs centralisés Loki/Grafana (SDK Services). + +## Notes +- Démarre après Bitcoin et BlindBit. diff --git a/docs/DEPLOIEMENT.md b/docs/DEPLOIEMENT.md new file mode 100644 index 0000000..371e6e7 --- /dev/null +++ b/docs/DEPLOIEMENT.md @@ -0,0 +1,21 @@ +# Déploiement - SDK Relay + +## Préparation +- Branche `ext`. +- `SDK_RELAY_*` dans `lecoffre_node/.env.master`. +- Accès `bitcoin` RPC/ZMQ et `blindbit-proxy`. + +## Déploiement (orchestrateur) +```bash +cd /home/debian/4NK_env/lecoffre_node +./scripts/start.sh | cat +./scripts/validate-deployment.sh | cat +``` + +## Vérifications +- WS: `wss://dev4.4nkweb.com/ws/`. +- `./scripts/monitor-progress.sh | cat` (attente IBD/BlindBit). + +## Règles +- Pas de compose direct. +- Push `ext` sans CI si pas de binaire à reconstruire. diff --git a/docs/FLUX.md b/docs/FLUX.md new file mode 100644 index 0000000..65bedb3 --- /dev/null +++ b/docs/FLUX.md @@ -0,0 +1,6 @@ +# Description des Flux - SDK Relay + +## Flux principaux +1. Bitcoin (RPC/ZMQ) → Relay (indexation, signaux IBD). +2. BlindBit → Relay (résolution secrets SP). +3. Clients WS ↔ Relay (évènements NewTx, notifications). diff --git a/docs/FONCTIONNEL.md b/docs/FONCTIONNEL.md new file mode 100644 index 0000000..aaa67bd --- /dev/null +++ b/docs/FONCTIONNEL.md @@ -0,0 +1,13 @@ +# Description Fonctionnelle - SDK Relay + +## Objectif +Assurer le relais temps réel WebSocket et l’orchestration des évènements blockchain (Bitcoin/BlindBit) pour les services applicatifs. + +## Parcours clés +- Abonnement clients WS. +- Relais d’évènements (nouveaux blocs, transactions, notifications NewTx). +- Attente synchronisation Bitcoin et disponibilité BlindBit avant diffusion. + +## Résultats attendus +- Canal temps réel fiable. +- Mise en file d’attente/retente en cas d’indisponibilité dépendances. diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md new file mode 100644 index 0000000..bdcd8df --- /dev/null +++ b/docs/INSTALLATION.md @@ -0,0 +1,24 @@ +# Installation - SDK Relay + +## Prérequis +- Dépôts sous `/home/debian/4NK_env` (branche `ext`). +- Docker/Compose. +- Variables `SDK_RELAY_*` dans `lecoffre_node/.env.master`. + +## Configuration +- Pas de `.env` local. +- Vérifier accès `bitcoin` (RPC/ZMQ) et `blindbit-proxy`. + +## Démarrage (orchestrateur) +```bash +cd /home/debian/4NK_env/lecoffre_node +./scripts/start.sh | cat +``` + +## Vérifications +- WS: `wss://dev4.4nkweb.com/ws/` +- Health: scripts `monitor-progress.sh`, `logs-with-progress.sh`. + +## Notes +- Démarre après Bitcoin et BlindBit. +- CI via tag `ext`. diff --git a/docs/QUALITE.md b/docs/QUALITE.md new file mode 100644 index 0000000..1f87fb7 --- /dev/null +++ b/docs/QUALITE.md @@ -0,0 +1,6 @@ +# Qualité Logicielle - SDK Relay + +- Lint/format: Rustfmt/Clippy. +- Tests: unitaires, intégration WS, tests de charge. +- Performance: backpressure WS, gestion erreurs. +- Observabilité: logs structurés, métriques si dispo. diff --git a/docs/SECURITE.md b/docs/SECURITE.md new file mode 100644 index 0000000..38430a9 --- /dev/null +++ b/docs/SECURITE.md @@ -0,0 +1,6 @@ +# Sécurité - SDK Relay + +- Aucune clé ou secret en dur. +- Accès Bitcoin RPC/ZMQ sécurisés sur réseau interne Docker. +- Validation stricte des messages WS. +- Journaux sans secrets. diff --git a/docs/TECHNIQUE.md b/docs/TECHNIQUE.md new file mode 100644 index 0000000..93572a8 --- /dev/null +++ b/docs/TECHNIQUE.md @@ -0,0 +1,19 @@ +# Description Technique - SDK Relay + +## Tech stack +- Rust, WebSocket server. + +## Configuration +- Variables `SDK_RELAY_*` via `lecoffre_node/.env.master`. +- Connexion Bitcoin (RPC/ZMQ), BlindBit URL. + +## Interfaces +- WS `0.0.0.0:8090` (derrière Nginx). + +## Sécurité +- Aucun secret en dur. +- Validation stricte des messages. + +## Observabilité +- Healthcheck avec progression. +- Logs Loki/Grafana. diff --git a/docs/TODO.md b/docs/TODO.md new file mode 100644 index 0000000..b3577a3 --- /dev/null +++ b/docs/TODO.md @@ -0,0 +1,6 @@ +# TODO - SDK Relay + +- Vérifier connexion Bitcoin (RPC/ZMQ) et BlindBit. +- Tester WebSocket public via Nginx. +- Valider healthchecks et progression IBD. +- Surveiller logs et mettre en place alertes Grafana.