From 4f97051d5057d5ac1a35d13472b15554bacf84ec Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 28 Oct 2026 17:57:44 +0100 Subject: [PATCH] docs: backend repo path, mock server and i18n layout Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 415bd26..4ec0fd3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Village Politics: frontend -This is the Nuxt client for a browser strategy game in the style of Tribal Wars. It runs on the web first and may ship on Steam later, wrapped in Electron or Tauri. The backend, its architecture, and the roadmap live in `../game-village-politics`. Read `../game-village-politics/docs/architecture.md` before you add a feature. +This is the Nuxt client for a browser strategy game in the style of Tribal Wars. It runs on the web first and may ship on Steam later, wrapped in Electron or Tauri. The backend, its architecture, and the roadmap live in `../game-village-politics-backend`. Read `../game-village-politics-backend/docs/architecture.md` before you add a feature. ## Rules @@ -8,7 +8,11 @@ This is the Nuxt client for a browser strategy game in the style of Tribal Wars. - **`ssr: false` for every target**, so one static build serves both the web and Steam. Code must not rely on Nuxt server routes or SSR-only APIs. - **Transport** is WS-first through the `ws` singleton from `@blax-software/networking`, the same as learn-atc. HTTP is only for login and register, which return the bearer token. Load the `blax-websockets` skill before you write `ws.send` or `ws.listen` code. - **Plain UI until M7 (city view)**: tables, lists, forms, and no styling work. Keep components small and typed, with state in composables (`useVillage`, `useWorld`). -- All user-facing text goes through i18n keys, with `en` as the first locale. +- All user-facing text goes through i18n keys, with `en` as the first locale. Sources are `i18n/locales/` and `i18n/pages/` (`@blax-software/i18n` layout); register a new page file in `i18n/messageloader.ts`. + +## 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. ## Task tracking: Taiga board `village-politics` @@ -20,6 +24,7 @@ Every deliverable has a card on the Taiga board `village-politics` (one epic per pnpm install pnpm dev # https://village.localhost.at pnpm typecheck +pnpm i18n:check # fails on missing keys pnpm generate # static build for web and Steam ```