Commit Graph

13 Commits

Author SHA1 Message Date
Jaume Garriga Maestre
9e6cc91a16 feat(admin): per-player stats drill-down from admin panel
All checks were successful
CI · Test & Deploy / Playwright tests (push) Successful in 1m50s
CI · Test & Deploy / Deploy to VPS (push) Successful in 21s
Security · npm audit / npm audit (push) Successful in 9m28s
2026-05-15 09:26:09 +02:00
Jaume Garriga Maestre
288a000953 feat: enhanced stats — streak, hard comarques, evolution, group comparison, per-question tracking
All checks were successful
CI · Test & Deploy / Playwright tests (push) Successful in 1m54s
CI · Test & Deploy / Deploy to VPS (push) Successful in 20s
- BD: ADD COLUMN filter_group on sessions; CREATE TABLE session_answers (per-question detail)
- server.js: POST /api/sessions accepts filter_group + answers array; GET stats returns
  totalSeconds, currentStreak, avgPct+evolution per level (1-8), hardComarques, groupStats
- index.html: sessionAnswers[] tracking in L2/L4/L5/L6/L7/L8; saveSession sends new fields;
  loadStats rewritten with streak badge, 4-box stats grid, sparklines on level bars,
  hard comarques section and group performance section
2026-05-15 09:06:41 +02:00
Jaume Garriga Maestre
fa39d50e7e fix: rename browser tab title to 'Les Comarques de Catalunya' 2026-05-13 22:33:47 +02:00
Jaume Garriga Maestre
b9404dd5b2 feat: add Level 8 Trencaclosques (drag-and-drop puzzle)
- Blind base map (grey slots for all comarques)
- Shuffled tray at the bottom with each comarca's shape + name
- Drag-and-drop with pointer events (works on touch + mouse)
- Hit test: SVG isPointInFill (precise) + 65px center fallback for small comarques
- Correct placement: comarca snaps to map with color + label
- Wrong drop: piece shakes and returns to tray (counts errors)
- Score = total pieces - errors; stars via showResult(8)
- Respects active group filter (same piece count as other map levels)
2026-05-13 22:29:45 +02:00
Jaume Garriga Maestre
6a85e97fd1 fix: change map legend from 'Comarques de muntanya' to 'Comarques en estudi' 2026-05-13 21:36:34 +02:00
Jaume Garriga Maestre
a3bb02f202 feat: add 'Litoral' coastal comarca group filter
- Add coastal:true flag to 12 littoral comarques (Alt Empordà → Montsià)
- Add 'coastal' key to getActiveComarques() filter logic
- Add '🏖️ Litoral' chip to GROUP_DEFS (12 comarques de costa)
2026-05-13 21:28:05 +02:00
Jaume Garriga Maestre
4e3a3b4393 feat: add zoom controls to map levels 5 and 6
- Add +/−/⊠ zoom buttons overlay on the SVG map container
- Implement viewBox-based zoom (1×–8×) centered on map midpoint
- Add drag-to-pan when zoomed in (pointer events, ignores comarca clicks)
- Add pinch-to-zoom gesture support for touch devices
- Zoom resets to full view at the start of each new game
2026-05-06 13:03:34 +02:00
Jaume Garriga Maestre
0a9bdd72cc feat: add Lluçanès and Moianès SVG paths to the map
- Add comarca-paths.js entries for Lluçanès (OSM relation 15803523, 40 pts)
  and Moianès (TopoJSON dts_comarques_cat_2025, 121 pts)
- Remove noMap:true flag from both comarques so they appear in all levels
  including Level 5 (map), Level 6 (blind map) and Level 7 (Milionari)
2026-05-06 12:55:48 +02:00
Jaume Garriga Maestre
71d16a916f feat: add Lluçanès comarca, add 'interior' group filter with 21 comarques d'interior 2026-05-06 11:51:03 +02:00
Jaume Garriga Maestre
a94a88c886 fix: add level 6 and 7 to LEVEL_NAMES, LEVEL_ICONS and stats bar rows 2026-05-04 11:27:34 +02:00
Jaume Garriga Maestre
63df11b843 feat: add Level 7 Millionaire quiz with SVG comarca preview and 4-option A/B/C/D format 2026-05-04 11:22:12 +02:00
Jaume Garriga Maestre
1e6a180a3a fix: Moianès noMap flag, fix Selva and Segrià name mismatches, hide tooltip in blind map mode 2026-05-02 00:18:38 +02:00
Jaume Garriga Maestre
3f251d6dc2 feat: app educativa comarques de Catalunya v3
- 6 nivells de dificultat (flashcards, tria, uneix, escriu, mapa, mapa cec)
- Registre de jugadors sense contrasenya (nom + emoji avatar)
- Backend Node.js + Express + PostgreSQL (pg)
- Mapa SVG interactiu amb dades GeoJSON reals (ICGC)
- Filtre de comarques per jugador (muntanya, BCN, GI, LL, T, totes)
- Estadistiques per nivell guardades a PostgreSQL
- Panel d'administrador amb PIN
- Manual integrat per a nens de 10-12 anys
- Mode offline (fallback sense backend)
- Deploy: Docker + Nginx + Let's Encrypt a Oracle Cloud ARM
2026-05-02 00:15:30 +02:00