feat: migrate frontend React 18 → Svelte 5 + SvelteKit
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s

Core logic portable (economy, balance, cosmetics, migrateSave) — zero rewrite.
136 tests green, identiques. Backend inchangé.

- Svelte 5 runes stores (game, auth, toast) remplacent Zustand
- SvelteKit adapter-static SPA (dist/ output, fallback index.html)
- Tailwind v4 conservé, design system .gp-* porté
- Transitions natives : slide, fly, scale, fade sur toute l'UI
- Sidebar tabbée (Production/Evolution/Collection) + CollapsiblePanel
- Mobile bottom sheet avec FAB toggle + backdrop blur
- Click particles réactifs Svelte (plus de DOM impératif)
- TadpoleSprite bounce + glow ring au clic
- Guide refait en accordéon, Achievements avec filtres
- a11y : focus-visible, Escape modals, aria-current, aria-labels
- CI/CD adapté (tests + build + rsync)
- Build 504K (vs ~1.2MB React)
This commit is contained in:
2026-03-28 20:03:21 +01:00
parent 3de0492631
commit f6bff6e389
125 changed files with 5323 additions and 10373 deletions

View File

@@ -9,29 +9,24 @@ echo "=== Clickerz deploy ==="
# 1. Pull latest
git pull --ff-only
# 2. Build frontend
echo "--- Building frontend..."
# 2. Build frontend (Svelte 5 + SvelteKit)
echo "--- Building frontend (Svelte)..."
cd Frontend
npm ci --production=false
npm ci
npx vitest run
npm run build
echo "--- Copying dist to /var/www/clickerz..."
sudo rm -rf /var/www/clickerz
sudo cp -r dist /var/www/clickerz
echo "--- Copying dist to /var/www/clickerz/frontend/dist..."
mkdir -p /var/www/clickerz/frontend/dist
rsync -a --delete dist/ /var/www/clickerz/frontend/dist/
cd ..
# 3. Backend deps
echo "--- Installing backend deps..."
cd Backend
npm ci --production
npm ci --omit=dev
cd ..
# 4. Run migrations
echo "--- Running DB migrations..."
cd Backend
npm run db:migrate
cd ..
# 5. Restart pm2
# 4. Restart pm2
echo "--- Restarting pm2..."
pm2 startOrRestart ecosystem.config.cjs --env production
pm2 save