docs: add architecture, installation, deployment, functional, technical, flows, quality, security, TODO [skip ci]

This commit is contained in:
dev4 2025-09-22 07:31:59 +00:00
parent f9154d6b23
commit 44aab5bf75
9 changed files with 133 additions and 0 deletions

21
docs/ARCHITECTURE.md Normal file
View File

@ -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 denvironnement (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`.

23
docs/DEPLOIEMENT.md Normal file
View File

@ -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.

7
docs/FLUX.md Normal file
View File

@ -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.

17
docs/FONCTIONNEL.md Normal file
View File

@ -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.

28
docs/INSTALLATION.md Normal file
View File

@ -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.

6
docs/QUALITE.md Normal file
View File

@ -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.

6
docs/SECURITE.md Normal file
View File

@ -0,0 +1,6 @@
# Sécurité - LeCoffre Back Mini
- Secrets via `.env.master` (IDNOT, STRIPE, MAILCHIMP, OVH).
- Validation des entrées, contrôle daccès.
- Journalisation sans données sensibles.
- Exposition via Nginx, pas de ports directs.

19
docs/TECHNIQUE.md Normal file
View File

@ -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.

6
docs/TODO.md Normal file
View File

@ -0,0 +1,6 @@
# TODO - LeCoffre Back Mini
- Vérifier routes `/api/*` exposées via Nginx.
- Tester intégrations IdNot/Stripe/MailChimp/OVH.
- Sassurer de lordre de démarrage (après relay).
- Valider logs Loki/Grafana.