Commit Graph

4 Commits

Author SHA1 Message Date
79ac1b0659 feat: multi-tab sync — save on blur, reload from server on focus
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 19s
- On blur: immediate save to server (no 30s wait)
- On focus: fetch server save, load if newer than local
- Handles multi-browser scenario (laptop → desktop)
2026-03-24 14:43:58 +01:00
8ce54bfb03 feat: server-authoritative save — wait for server before game starts
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 18s
- Store starts in ready:false — no game actions until authority loaded
- useSaveSync signals serverLoaded (success, empty, or unreachable)
- GameSync orchestrates: logged in → wait server, guest → localStorage
- Home shows loading screen until ready
- localStorage = cache only, server = authority for logged-in users
2026-03-24 14:30:53 +01:00
91d1616dd7 feat: PKCE auth + CI/CD deploy
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 25s
- Frontend: PKCE flow (oauth.js, api.js centralized, cookie-based AuthContext)
- Backend: token introspection, cookies httpOnly, refresh endpoint
- Replaced localStorage JWT with httpOnly session cookies
- useSaveSync migrated to cookie auth
- cookie-parser added
- Gitea CI workflow (vps-runner pattern)
2026-03-24 13:01:15 +01:00
a52746ed0c feat(sprint1-step3b): backend save system + anti-cheat + données rattrapées
- game_saves table + migration 002 (JSON state, anti-cheat metadata)
- saveControllers.js : load/save avec validation delta ressources (750k/s × 1.1)
- GameSaveManager : upsert MySQL ON DUPLICATE KEY UPDATE
- useSaveSync hook : auto-save 30s + keepalive beforeunload + guest fallback
- save-validation.test.ts : 8 tests anti-cheat
- economy.ts : arbre d'évolution 5 nœuds + prestige ADN (rattrapage step 2)
- economy.test.ts : +40 tests (évolution tree, multipliers, start bonus)
- GDD + SPRINT1.md : docs sprint complètes
- Rethème data : shop.json, Achievements.json, Cookie, Legal (rattrapage step 1)
2026-03-20 13:40:16 +01:00