# 🔧 DĂ©pannage Rapide - Veza Integration ## ✅ ProblĂšmes RĂ©solus ### 1. Migration SQL `050_data_validation_constraints.sql` ❌ → ✅ **ProblĂšme**: `syntax error at or near "NOT"` - PostgreSQL ne supporte pas `IF NOT EXISTS` avec `ADD CONSTRAINT` **Solution**: Migration corrigĂ©e pour utiliser des blocs `DO $$` (comme dans `930_add_missing_foreign_keys.sql`) **Status**: ✅ **CORRIGÉ** --- ### 2. Port Redis OccupĂ© ❌ → ✅ **ProblĂšme**: `address already in use` sur port 6379 **Causes possibles**: - Service Redis systĂšme actif (`systemctl status redis`) - Container Docker Redis dĂ©jĂ  en cours d'exĂ©cution **Solutions**: **Option A: ArrĂȘter le service Redis systĂšme** (RecommandĂ©) ```bash # VĂ©rifier si Redis systĂšme est actif systemctl status redis # ArrĂȘter le service sudo systemctl stop redis # Optionnel: DĂ©sactiver au dĂ©marrage sudo systemctl disable redis ``` **Option B: ArrĂȘter le container Docker Redis** ```bash # ArrĂȘter l'instance existante docker stop veza_redis # RedĂ©marrer via docker-compose docker compose up -d redis ``` **VĂ©rification**: ```bash # VĂ©rifier que le port est libre ss -tlnp | grep 6379 # VĂ©rifier les containers docker compose ps ``` **Status**: ✅ **RÉSOLU** --- ## 🚀 DĂ©marrage Rapide (AprĂšs Corrections) ### Option 1: Backend + Frontend Seulement (RecommandĂ© pour tests) ```bash # Terminal 1: Infrastructure make infra-up # Terminal 2: Backend cd veza-backend-api go run cmd/api/main.go # Terminal 3: Frontend cd apps/web npm run dev ``` **URLs**: - Frontend: http://localhost:3000 - Backend: http://localhost:8080 - Swagger: http://localhost:8080/docs --- ### Option 2: Tout-en-un (avec Makefile) ```bash # Ignorer les erreurs Rust (non bloquant) make dev 2>&1 | grep -v "libsqlite3-sys" ``` **Note**: Les erreurs Rust (chat-server, stream-server) ne bloquent pas l'intĂ©gration backend/frontend. --- ## ⚙ Configuration Backend Le fichier `.env` a Ă©tĂ© créé automatiquement dans `veza-backend-api/.env`: ```bash APP_ENV=development JWT_SECRET=dev-secret-key-minimum-32-characters-long-for-testing DATABASE_URL=postgres://veza:password@localhost:5432/veza?sslmode=disable REDIS_URL=redis://localhost:6379 CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173 APP_PORT=8080 LOG_LEVEL=INFO ``` --- ## đŸ§Ș Test Rapide ```bash # 1. VĂ©rifier infrastructure docker compose ps # 2. VĂ©rifier backend curl http://localhost:8080/health # 3. VĂ©rifier frontend curl http://localhost:3000 # 4. Ouvrir dans navigateur open http://localhost:3000 ``` --- ## 🐛 ProblĂšmes Connus (Non Bloquants) ### Erreur Rust `libsqlite3-sys` **Message**: `failed to select a version for libsqlite3-sys` **Impact**: ⚠ **NON BLOQUANT** - Les serveurs Rust (chat, stream) ne sont pas nĂ©cessaires pour tester l'intĂ©gration backend/frontend. **Solution**: Ignorer cette erreur ou corriger les dĂ©pendances Rust sĂ©parĂ©ment. --- ### Go Version (air) **Message**: `requires go >= 1.25 (running go 1.24.10)` **Impact**: ⚠ **NON BLOQUANT** - Le backend dĂ©marre avec `go run` mĂȘme sans `air`. **Solution**: Utiliser `go run cmd/api/main.go` au lieu de `air`. --- ## ✅ Checklist Avant Test - [x] Migration SQL corrigĂ©e - [x] Redis dĂ©marrĂ© - [x] Backend `.env` configurĂ© - [ ] Backend dĂ©marrĂ© (port 8080) - [ ] Frontend dĂ©marrĂ© (port 3000) - [ ] Test dans navigateur --- **Guide complet**: Voir `GUIDE_DEMARRAGE_INTEGRATION.md`