# CLAUDE.md — dev_malio (workspace racine) Dossier racine contenant tous les projets MALIO. Chaque projet a son propre `CLAUDE.md` avec les conventions détaillées. ## Projets | Projet | Description | Stack | Ports (API / Frontend / PG) | |--------|-------------|-------|----------------------------| | **Inventory** | Gestion d'inventaire industriel (machines, pièces, composants) | Symfony 8 + API Platform 4 + Nuxt 4 | 8081 / 3001 / 5433 | | **Lesstime** | Gestion de projet (tâches, time tracking, portail client) | Symfony 8 + API Platform 4 + Nuxt 4 | 8082 / 3002 / 5435 | | **SIRH** | Gestion RH (contrats, absences, heures, frais) | Symfony + API Platform + Nuxt 4 | — | | **Coltura** | CRM/ERP | Symfony 8 + API Platform 4 + Nuxt 4 | 8083 / 3004 / 5437 | | **Ferme** | Gestion exploitation agricole (réceptions, pesées, expéditions, bovins) | Symfony 8 + API Platform 4 + Nuxt 4 | — | | **infra-postgres** | Infrastructure PostgreSQL partagée (Docker) | PostgreSQL 16 Alpine | 5432 | > **sous-app/** — Dossier de sous-projets divers (scripts, outils, anciens prototypes). **Ignorer sauf demande explicite.** ## Stack commune Tous les projets applicatifs partagent : - **Backend** : PHP 8.4, Symfony 8, API Platform 4, Doctrine ORM, PostgreSQL 16 - **Frontend** : Nuxt 4 (SPA, SSR off), Vue 3 Composition API, TypeScript, Tailwind CSS - **Containers** : Docker Compose - **CI/CD** : Gitea (organisation MALIO-DEV) ### Différences notables | | Inventory | Lesstime | Coltura | SIRH | Ferme | |---|-----------|----------|---------|------|-------| | **Auth** | Session cookies | JWT HTTP-only cookie | JWT HTTP-only cookie | — | JWT (Lexik) | | **UI lib** | DaisyUI 5 | @malio/layer-ui | @malio/layer-ui | Tailwind custom | Tailwind + Zod | | **Frontend** | Submodule git | Dossier local | Dossier local | Dossier local | Dossier local | | **PDF** | — | — | — | — | Dompdf + Twig | | **i18n** | Non | @nuxtjs/i18n | @nuxtjs/i18n | Non (UI fixe FR) | @nuxtjs/i18n | | **MCP** | Non | Oui (25 tools STDIO+HTTP) | Non | Non | Non | ## Conventions partagées ### Commits (tous les projets) ``` () : ``` Espace obligatoire autour du `:`. Types : `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test` ### Commandes communes ```bash make start # Démarrer les containers make stop # Arrêter make test # PHPUnit make shell # Shell dans le container PHP make db-reset # Reset BDD make php-cs-fixer-allow-risky # Linter PHP ``` ### Règles - Toujours lire un fichier avant de le modifier - Reproduire le style existant du projet - Ne jamais committer sans demande explicite - Ne jamais force push sans confirmation - Ne jamais modifier la config git - PostgreSQL : noms de colonnes toujours en **minuscules** dans le SQL brut ## Infrastructure - **infra-postgres** : instance PostgreSQL partagée sur le port 5432, user unique `malio` - Les apps se connectent via `host.docker.internal:5432` ou via leur propre container PG - Backups : `pg_dumpall` avec rotation 7 jours (`infra-postgres/backup.sh`) ## Navigation rapide - Inventory : `Inventory/CLAUDE.md` - Lesstime : `Lesstime/CLAUDE.md` - SIRH : `SIRH/CLAUDE.md` - Coltura : `Coltura/CLAUDE.md` - Ferme : pas de CLAUDE.md dédié (à créer si besoin) - Infra PG : `infra-postgres/CLAUDE.md` ## Langue - UI des apps : français - Communication utilisateur : français - Code (variables, commentaires) : anglais