33800 Docs

← Retour

Task: Fix NeedFinder Dashboard + Documentation Architecture

Date: 15-01-2026 Status: TERMINE Duree: ~2h

Contexte

Le dashboard needfinder.html sur o2switch affichait 0 besoins alors que l'API en contient 359.

Problemes identifies

1. Endpoint /api/needs manquant

Le script generate-needfinder.sh appelait /api/needs?limit=200 mais cet endpoint n'existait pas dans needfinder.

Solution: Ajoute dans /tmp/needfinder/src/index.ts:

2. Confusion architecture (URL API)

J'avais initialement change l'URL en publique pensant que le script tournait sur o2switch.

Correction: Le script generate-needfinder.sh tourne sur PVE (via cron), pas sur o2switch. L'URL interne http://192.168.1.51:5200 est correcte car PVE a acces au reseau local.

3. CLAUDE.md desynchronise

Ma memoire indiquait que le dashboard etait sur nginx local (dashboard.33800.nowhere84.com). En realite, le dashboard principal est maintenant sur o2switch (dashboard.nowhere84.com).

Solution: Mis a jour CLAUDE.md section "Monitoring Dashboard"

Fichiers modifies

Fichier Modification
/tmp/needfinder/src/index.ts Ajoute endpoint /api/needs
/stock_8to/33800-stack/monitoring/generate-needfinder.sh URL interne conservee (script sur PVE)
/stock_8to/33800-stack/claude/CLAUDE.md Section dashboard + architecture o2switch complete
o2switch:~/dashboard.nowhere84.com/needfinder.html Regenere via git push (359 besoins)

Deploiements

  1. needfinder pousse sur GitLab develop → webhook CI/CD → rebuild container (dev-portainer)
  2. generate.sh execute sur PVE → genere HTML → git push o2switch → hook deploy

Resultat final

Dashboard https://dashboard.nowhere84.com/needfinder.html affiche:

Lecons apprises

IMPORTANT: Toujours verifier CLAUDE.md avant d'agir sur l'infrastructure. Les URLs, emplacements et architectures changent - la memoire doit suivre !

Points cles a retenir

  1. Dashboard = o2switch (https://dashboard.nowhere84.com)
  2. Scripts monitoring = PVE (collect.sh, generate.sh, generate-needfinder.sh)
  3. Flux : PVE cron → generate HTML → git push → o2switch hook deploy
  4. CLAUDE.md = source de verite pour architecture (survit a la compaction)