docs: backend repo path, mock server and i18n layout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fabian @ Blax Software 2026-10-28 17:57:44 +01:00
parent 4af1f07e37
commit 4f97051d50
1 changed files with 7 additions and 2 deletions

View File

@ -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
```