# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Règles de travail - Soit concis - Ne fais rien sans validation utilisateur ## Project Overview SOGOMS (Service Oriented GO MicroServices) - plateforme SaaS modulaire, multi-tenant, configurable. **Principes:** modularité (1 feature = 1 binaire Go), configuration YAML, multi-tenant natif, un container avec plusieurs processus supervisés. ## Architecture | Binaire | Rôle | Port/Socket | |---------|------|-------------| | **sogoctl** | Superviseur PID 1, health checks, scaling | TCP :9000 | | **sogoway** | Gateway HTTP, auth JWT, routing | TCP :8080 | | **sogorch** | Orchestrateur scénarios YAML | Unix socket | | **sogoms-db** | Accès MariaDB | Unix socket | | **sogoms-pdf** | Génération PDF | Unix socket | | **sogoms-email** | Envoi emails | Unix socket | | **sogoms-storage** | Gestion fichiers | Unix socket | **Flux:** Client → Nginx(:443) → Sogoway(:8080) → Sogorch → Sogoms-* ## Structure ``` cmd/{sogoctl,sogoway,sogorch}/main.go cmd/sogoms/{db,pdf,email,storage}/main.go internal/{protocol,pool,config,scenario,auth,registry}/ config/{sogoctl,sogoway}.yaml config/{tenants,routes,scenarios}/*.yaml ``` ## Communication Unix socket JSON length-prefixed (4 bytes length + JSON payload). ## Dépendances net/http standard (Go 1.22+), go-yaml/v3, go-sql-driver/mysql, chromedp (PDF)