From ec421f2537a3f0b8cb8a737804c2069fc9e512c0 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 28 Oct 2026 19:26:16 +0100 Subject: [PATCH] docs: backend by default, mock on request, how sockets authenticate Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index b957d43..f460667 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,9 @@ This is the Nuxt client for a browser strategy game in the style of Tribal Wars. ## Mock server -Until the backend serves the WS API, runtime config `MOCK_SERVER` (on by default) swaps the `ws` singleton and login for `app/mock/`: an in-browser fake that answers the same intents with the payloads in `app/types/game.ts`, finishes build orders on timers, and pushes `village:updated`. Its numbers and rules are placeholders, not game design. Run against a real backend with `NUXT_PUBLIC_MOCK_SERVER=false`, and delete `app/mock/` once nothing needs it. +The client talks to the real backend by default (`server-village.localhost.at` locally; the server's `.env` points the static build at `server-village.blax.at`). For UI work without a backend, `NUXT_PUBLIC_MOCK_SERVER=true` swaps the `ws` singleton and login for `app/mock/`: an in-browser fake that answers the same intents with the payloads in `app/types/game.ts`, finishes build orders on timers, and pushes `village:updated`. Its numbers and rules are placeholders, not game design; the backend is the source of truth. Delete `app/mock/` once nothing needs it. + +Every `ws.send` carries the bearer token as `authtoken` (added in `app/utils/networking.ts`): that is how the WS server authenticates a socket. ## Task tracking: Taiga board `village-politics`