Add the Sokko TCG collectible card mini-game

Add the server-backed card game: Discord login, recharging pack openings,
album, trades, gifts, stardust shop, campaign codes and its administration,
stored in SQLite and disabled in production until configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 17:47:35 +01:00
parent 243465720f
commit 5ce35cd7ba
193 changed files with 12159 additions and 28 deletions

View file

@ -19,6 +19,7 @@ not bugs, missing scenarios or a percentage of work remaining.
| React lifecycle, shared editing and navigation | `e2e/editor-lifecycle.spec.js`, `inline-edit.spec.js`, `form-reorder.spec.js`, `shell-behavior.spec.js`, `session-state.spec.js` |
| Public data loading, retry and stale responses | `e2e/app-data.spec.js` |
| HTTP cache policy of the delivered Node server | `tests/server-cache.test.mjs`; production E2E remains responsible for stale bundle recovery |
| Sokko TCG ownership, recharge, idempotence, transfers, campaign codes and backup/restore | `tests/nebula-cards.test.mjs`, `tests/nebula-cards-api.test.mjs`, then `e2e/nebula-cards.spec.js` against the delivered Node API and a temporary SQLite database |
| Shared reorder policy and module order | `e2e/grouped-reorder.spec.js`, `module-order.spec.js` |
| Toolbox creation, import/export, text exchange | `e2e/toolbox.spec.js`, `text-exchange.spec.js`; Node toolbox module tests |
| Links: creation, copy, category removal preserving links, deletion and reload | `e2e/basic-tools.spec.js` |
@ -55,13 +56,24 @@ change affects persisted data, imports, user interaction or delivery.
## Validation Layers
- `npm run check:cards` est le gate d'itération de Sokko TCG. Il exécute le
lint ciblé, les tests Node du catalogue, des règles, de l'API, des sauvegardes
et des données publiques, puis le build et les deux parcours Cards contre le
serveur Node avec une base SQLite temporaire. Il n'exécute pas les E2E des
toolboxes et des guides.
- `npm test` runs Node tests for pure logic, data contracts, architecture guards
and the direct `server.mjs` cache test. The latter opens a local ephemeral port.
- `npm run test:e2e` uses Vite in development and therefore includes React
`StrictMode`; it validates interactive behavior against source modules.
`npm run check:full` lui réserve le port 4181 pour ne pas réutiliser une
instance personnelle éventuellement ouverte sur 5173.
- `npm run test:e2e:production` rebuilds the client and exercises the Vite
Preview result. It catches build-only behavior and stale-bundle recovery, but
does not run the Node static server or the production proxy.
- `npm run test:e2e:cards` construit l'application puis lance `server.mjs` avec
une base SQLite temporaire, la connexion de test et Sokko TCG activé. Il
valide la reprise d'ouverture, l'album, l'administration et le layout à
768 px sans utiliser une API simulée.
- `tests/server-cache.test.mjs` exercises the HTTP policy implemented by
`server.mjs`. It does not prove headers added or replaced by the public proxy.
- Public `curl` checks after deployment validate the delivered origin and remain
@ -84,3 +96,5 @@ and Beads task. Keep historical results dated instead of presenting them as a
current run. Close only the task whose acceptance criteria were actually met.
Do not introduce visual snapshots solely to prove that a page loads.
Keep detailed command logs outside tracked source and report concise results.
Pour les itérations exclusivement limitées à Sokko TCG, `check:cards` suffit
jusqu'à la demande explicite de pré-push, qui rétablit `check:full` comme gate.