From 44aab5bf754e5d5e145fc91c8ed2ece97dad27a5 Mon Sep 17 00:00:00 2001 From: dev4 Date: Mon, 22 Sep 2025 07:31:59 +0000 Subject: [PATCH] docs: add architecture, installation, deployment, functional, technical, flows, quality, security, TODO [skip ci] --- docs/ARCHITECTURE.md | 21 +++++++++++++++++++++ docs/DEPLOIEMENT.md | 23 +++++++++++++++++++++++ docs/FLUX.md | 7 +++++++ docs/FONCTIONNEL.md | 17 +++++++++++++++++ docs/INSTALLATION.md | 28 ++++++++++++++++++++++++++++ docs/QUALITE.md | 6 ++++++ docs/SECURITE.md | 6 ++++++ docs/TECHNIQUE.md | 19 +++++++++++++++++++ docs/TODO.md | 6 ++++++ 9 files changed, 133 insertions(+) create mode 100644 docs/ARCHITECTURE.md create mode 100644 docs/DEPLOIEMENT.md create mode 100644 docs/FLUX.md create mode 100644 docs/FONCTIONNEL.md create mode 100644 docs/INSTALLATION.md create mode 100644 docs/QUALITE.md create mode 100644 docs/SECURITE.md create mode 100644 docs/TECHNIQUE.md create mode 100644 docs/TODO.md diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..5cf628a --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,21 @@ +# Architecture - LeCoffre Back Mini + +## Composants +- API REST Node.js. +- Connexions: IdNot, Stripe, MailChimp, OVH SMS. + +## Dépendances +- `sdk_relay` (lecture événements), `sdk_signer` (signature flux), `bitcoin`/`blindbit` indirectes via relay. + +## Réseau et ports +- Exposé derrière Nginx: `https://dev4.4nkweb.com/api/`. + +## Variables d’environnement (centralisées) +- `IDNOT_*`, `STRIPE_*`, `MAILCHIMP_*`, `OVH_*`, `API_BASE_URL` depuis `lecoffre_node/.env.master`. + +## Monitoring +- Healthcheck informatif. +- Logs centralisés Loki/Grafana (Backend Services). + +## Notes +- Respect du démarrage après `sdk_relay`. diff --git a/docs/DEPLOIEMENT.md b/docs/DEPLOIEMENT.md new file mode 100644 index 0000000..6fd7983 --- /dev/null +++ b/docs/DEPLOIEMENT.md @@ -0,0 +1,23 @@ +# Déploiement - LeCoffre Back Mini + +## Préparation +- Branche `ext`. +- Variables `IDNOT_*`, `STRIPE_*`, `MAILCHIMP_*`, `OVH_*` dans `lecoffre_node/.env.master`. + +## Déploiement (orchestrateur) +```bash +cd /home/debian/4NK_env/lecoffre_node +./scripts/start.sh | cat +./scripts/validate-deployment.sh | cat +``` + +## Vérifications +```bash +curl -sS https://dev4.4nkweb.com/api/health | jq . +``` +- Dashboards Grafana Backend. + +## Règles +- Pas de compose direct. +- Démarrer après `sdk_relay` (géré par scripts). +- Push sur `ext` sans CI si docs/config only. diff --git a/docs/FLUX.md b/docs/FLUX.md new file mode 100644 index 0000000..85cf901 --- /dev/null +++ b/docs/FLUX.md @@ -0,0 +1,7 @@ +# Description des Flux - LeCoffre Back Mini + +## Flux principaux +1. Login notaire: Front → IdNot → Back → session. +2. Création dossier: Back → MailChimp (email) → Client. +3. Validation: Client → Back → OVH SMS → Back. +4. Paiement: Back → Stripe → Back. diff --git a/docs/FONCTIONNEL.md b/docs/FONCTIONNEL.md new file mode 100644 index 0000000..92237d0 --- /dev/null +++ b/docs/FONCTIONNEL.md @@ -0,0 +1,17 @@ +# Description Fonctionnelle - LeCoffre Back Mini + +## Objectif +Exposer les API nécessaires aux parcours LeCoffre (Notaires/Clients) et aux intégrations (IdNot, Stripe, MailChimp, OVH SMS). + +## Parcours clés +- Login Notaire: redirection IdNot et validation. +- Création et gestion de dossier: création client, envoi e-mail (MailChimp), SMS (OVH), suivi statut. +- Validation paiement Stripe si applicable. + +## Rôles +- Notaire: crée/partage/valide dossiers. +- Client: reçoit lien magique, confirme code SMS, accède au dossier. + +## Résultats attendus +- API stables, statuts cohérents. +- Journaux complets et traçables. diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md new file mode 100644 index 0000000..edeab58 --- /dev/null +++ b/docs/INSTALLATION.md @@ -0,0 +1,28 @@ +# Installation - LeCoffre Back Mini + +## Prérequis +- Dépôts clonés sous `/home/debian/4NK_env` (branche `ext`). +- Docker/Compose. +- Variables centralisées dans `lecoffre_node/.env.master` (`IDNOT_*`, `STRIPE_*`, `MAILCHIMP_*`, `OVH_*`). + +## Configuration +- Pas de `.env` local. +- Vérifier `API_BASE_URL`, dépendances réseaux via Nginx. + +## Démarrage (orchestrateur) +```bash +cd /home/debian/4NK_env/lecoffre_node +./scripts/start.sh | cat +``` + +## Endpoints +- `https://dev4.4nkweb.com/api/` + +## Tests rapides +```bash +curl -sS https://dev4.4nkweb.com/api/health | jq . +``` + +## Notes +- Démarrage après `sdk_relay`. +- Ne pas déclencher de CI localement; utiliser tag `ext` via CI centralisée si build d'image requis. diff --git a/docs/QUALITE.md b/docs/QUALITE.md new file mode 100644 index 0000000..abc9dd0 --- /dev/null +++ b/docs/QUALITE.md @@ -0,0 +1,6 @@ +# Qualité Logicielle - LeCoffre Back Mini + +- Lint/format: config du dépôt. +- Tests: unitaires et intégration (IdNot, Stripe, MailChimp, OVH). +- Performance: endpoints critiques monitorés. +- Observabilité: logs structurés, traces corrélées. diff --git a/docs/SECURITE.md b/docs/SECURITE.md new file mode 100644 index 0000000..7ab5c86 --- /dev/null +++ b/docs/SECURITE.md @@ -0,0 +1,6 @@ +# Sécurité - LeCoffre Back Mini + +- Secrets via `.env.master` (IDNOT, STRIPE, MAILCHIMP, OVH). +- Validation des entrées, contrôle d’accès. +- Journalisation sans données sensibles. +- Exposition via Nginx, pas de ports directs. diff --git a/docs/TECHNIQUE.md b/docs/TECHNIQUE.md new file mode 100644 index 0000000..b3584ea --- /dev/null +++ b/docs/TECHNIQUE.md @@ -0,0 +1,19 @@ +# Description Technique - LeCoffre Back Mini + +## Tech stack +- Node.js 19, Express. + +## Configuration +- Variables via `lecoffre_node/.env.master`: `IDNOT_*`, `STRIPE_*`, `MAILCHIMP_*`, `OVH_*`, `API_BASE_URL`. + +## Interfaces +- REST `/api/` exposé via Nginx. +- Intégrations externes (IdNot/Stripe/MailChimp/OVH). + +## Sécurité +- Pas de secrets commités. +- Entrées validées, CORS strict via Nginx. + +## Observabilité +- Healthcheck. +- Logs Loki/Grafana. diff --git a/docs/TODO.md b/docs/TODO.md new file mode 100644 index 0000000..0b0e569 --- /dev/null +++ b/docs/TODO.md @@ -0,0 +1,6 @@ +# TODO - LeCoffre Back Mini + +- Vérifier routes `/api/*` exposées via Nginx. +- Tester intégrations IdNot/Stripe/MailChimp/OVH. +- S’assurer de l’ordre de démarrage (après relay). +- Valider logs Loki/Grafana.