Commit Graph

9 Commits

Author SHA1 Message Date
ed8cf87d4e feat: Sprint 3 — Prestige Loop endless
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 35s
- Migration saves: saveVersion pattern + migrateSave lazy (v1→v2)
- Formule ADN rebalancée: log10 + clamp min 1 + cap bonus ×4
- Prestige Experience: modal fullscreen, preview ADN, stats run, best run
- Arbre V2: 25 nœuds, 3 capstones, post-capstones repeatables (scaling par tranche)
- Convergence évolutif Alpha→Omega (tier system)
- Reset arbre: 1 gratuit/prestige, payant linéaire au-delà
- Milestones prestige: 8 paliers (1→100), cosmétiques exclusifs, bonus gameplay
- balance.ts: constantes centralisées pour playtest
- 136 tests green, 0 regression
2026-03-28 18:24:24 +01:00
8cc9fdaa62 fix: 500ms delay on focus reload — wait for other tab's blur save
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 17s
2026-03-24 14:51:38 +01:00
3145758747 fix: guard ALL saves behind ready — never save DEFAULT_STATE to server
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 17s
Root cause: on refresh, store starts with DEFAULT_STATE (resources: 0).
Blur/interval/unload handlers saved this zero state before server load.
Fix: every save path checks useGameStore.getState().ready before writing.
2026-03-24 14:47:23 +01:00
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
307feb711f feat(sprint1-step5): migration Tailwind v4 + Zustand — suppression WildCoinContext
- Install tailwindcss @tailwindcss/vite zustand
- useGameStore.ts : Zustand store wrappant economy.ts (tick, click, buy, prestige, buyNode, loadFromServer)
- GameTick.tsx : composant timer 1s
- GeneratorShop.tsx : boutique générateurs Tailwind (remplace Amelioration.jsx)
- EvolutionTree, PrestigePanel, MilestoneBar : rewrite Zustand + Tailwind
- Hud.jsx : rewrite Zustand + Tailwind (suppression Hud.scss)
- BoutiqueCard, Achievements : migrés vers Zustand
- Supprimé : WildCoin/ (4 fichiers), timer/Timer.jsx, useEconomy.ts, Hud.scss
- WildCoinProvider retiré de main.jsx
2026-03-20 13:40:51 +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
c69da320cc feat(sprint1-step2): core economy TS + useEconomy hook (lazy calc) + 13 tests vitest 2026-03-17 06:36:51 +01:00