Files
rolld/rolld_backend
kerboul 5c98f1638a feat: stats + chat + frontend pages (Stats, Chat, NavBar)
Backend:
- StatsManager.js: JSON persistence, leaderboard, rate-limit 1/5s
- ChatManager.js: 200-msg buffer, JSON persistence
- index.js: routes GET/POST /stats, /chat/history, /chat/send (Zod validation)
- ArenaRoom.js: chat handler broadcasts to room + persists via ChatManager

Unity:
- StatsTracker.cs: distance, maxSpeed, jumps, bumps, checkpoints, raceTime tracking
- ChatUI.cs: F3 toggle, bottom-right panel, polling 3s, unread badge
- NetworkManager.cs: SendChatMessage() + OnMessage<ChatUI.ChatMessage>(chat)
- CheckpointSystem.cs: RegisterCheckpoint/Finish hooks
- PlayerController.cs: RegisterJump/Bump hooks, physics rebalance, billboard fix
- GameHUD.cs: LocalRaceTimer, SetTotalRounds, OnRoundStart signature fix
- GameManager.cs: spectator cam reconnect fix

Frontend:
- NavBar.jsx: fixed top nav, Accueil/Stats/Chat/Jouer
- App.jsx: page state (home/play/stats/chat) + NavBar
- StatsPage.jsx: 6-tab leaderboard, auto-refresh 30s
- ChatPage.jsx: polling 3s, localStorage name, Enter to send

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 18:33:06 +02:00
..

ROLL'D Backend

Monorepo backend pour le jeu ROLL'D — architecture microservices.

Services

Service Port Stack Description
auth 3001 Node.js + Express Authentification & sessions
game 2567 Node.js + Colyseus Serveur de jeu temps réel
stats 8000 Python + FastAPI Statistiques & analytics

Infrastructure

Service Port Description
postgres 5432 Base de données
redis 6379 Cache / PubSub

Quickstart

# Lancer tout l'environnement de dev
docker compose up --build

# Un seul service
docker compose up auth

# Dev sans Docker
cd auth && npm install && npm run dev
cd game && npm install && npm run dev
cd stats && pip install -r requirements.txt && uvicorn app.main:app --reload

Structure

├── auth/           # Service d'authentification
│   ├── Dockerfile
│   ├── package.json
│   └── src/
├── game/           # Serveur Colyseus
│   ├── Dockerfile
│   ├── package.json
│   └── src/
├── stats/          # Service de statistiques
│   ├── Dockerfile
│   ├── requirements.txt
│   └── app/
└── docker-compose.yml