diff --git a/CLAUDE.md b/CLAUDE.md index a40d8bc..6ff44c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -92,8 +92,13 @@ load-bearing, not style preferences: - Stats/badges/standings are "write once, read many": computed and persisted once (e.g. at match end), never recomputed on every page open. - Live match scouting: only the scoring user writes; everyone else reads already-saved data. -- CSI league data is synced periodically server-side into a local table; the app only ever reads - from the internal DB, never the CSI site directly. +- CSI league data is currently a **hardcoded placeholder** array in `src/lib/crapp-data.ts` + (`classifica`, `storicoMatch`), explicitly marked "(demo)" in the UI — no real sync exists yet, + this is planned/open work, not an existing pattern to copy. +- A scouted match result (`ScoutMatch`, from `scout.tsx` / `scout-store.ts`) is saved **only to + the scoring device's `localStorage`** (key `crapp-scout-v1`), never to Supabase — only the + in-progress resume state goes to the `scout_live` table. So today a match result is not shared + across devices/users at all. - Push notifications only for high-value events (convocations, training/match reminders, ball-duty turn, final result) — no chat/photo/video features. diff --git a/mem/features/cloud-efficienza.md b/mem/features/cloud-efficienza.md index a33330d..66e449f 100644 --- a/mem/features/cloud-efficienza.md +++ b/mem/features/cloud-efficienza.md @@ -8,7 +8,7 @@ type: feature - Dopo una mutazione aggiornare la cache con `setQueryData`, non `invalidateQueries` (evita riletture). - Scout live: scrive solo l'utente che segna; gli altri leggono dati già salvati. - Statistiche, badge e classifiche: "write once, read many" — calcolate e salvate una volta a fine partita, mai ricalcolate a ogni apertura pagina. -- Dati CSI: sincronizzazione periodica server-side salvata su tabella locale; l'app legge solo dal database interno. +- Dati CSI: al momento è un array hardcoded in `src/lib/crapp-data.ts`, marcato "(demo)" in UI — nessun sync reale, da implementare. Anche il risultato di una partita scoutata (`ScoutMatch`) oggi vive solo nel `localStorage` del dispositivo di chi scouta, non su Supabase. - Push solo per eventi importanti: convocazioni, promemoria allenamento/partita, turno palloni, esito finale. - Niente foto/video/chat o funzionalità pesanti. - Schema target: team_id, eventi, presenze, azioni_scout, statistiche_aggregate, classifica_csi, notifiche, con indici sui campi di filtro/relazione.