# Projet personnel 2026 - Arena Battle
Application web de combat tour par tour. Le joueur se connecte, choisit un personnage et lance un duel 1v1 contre un adversaire. Le moteur de combat gère tours, sorts, buffs, debuffs, effets négatifs et journaux de combat.
Démo : http://162.19.76.60/
Identifiants (compte de test) : demo / P@ssw0rd
/api -> http://localhost:3000)Créer un fichier .env ou renommer le fichier .env.example dans server/:
NODE_ENV=dev
PORT=express_port
DATABASE_URL=postgres://user:password@localhost:5432/database
JWT_SECRET=jwt_secret
CSRF_SECRET=csrf_secret
cd server
npm install
npm run db:migrate:dev
npm run dev
cd client
npm install
npm run dev
Ouvrir http://localhost:5173
server: npm run db:migrate:dev (applique les migrations (créer / met à jour les tables)), npm run devclient: npm run dev, npm run build, npm run previewCSRF:
GET /api/csrfAuth:
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/logoutGET /api/auth/meSélection:
GET /api/initPOST /api/create-battleCombat:
GET /api/battle/:idGET /api/battle/:id/turn/PATCH /api/battle/:id/reduce-character-spells-cdPATCH /api/battle/:id/check-character-negative-effectPATCH /api/battle/:id/check-character-buffsPATCH /api/battle/:id/check-character-debuffsPATCH /api/battle/:id/passive-per-turnGET /api/battle/:id/determine-player-actionGET /api/battle/:id/determine-enemy-actionPATCH /api/battle/:id/character-use-spellPATCH /api/battle/:id/check-character-alive.
├─ client/ # Svelte + Vite (UI)
├─ server/ # Express + moteur de combat + Prisma
├─ conception/ # MCD / MLD / user stories
└─ README.md
conception/MCD.mdconception/MLD.mdconception/User_stories.md