From cab556ede4ec8373560bcd689bac05077320b115 Mon Sep 17 00:00:00 2001 From: "claude (duplicate_chess)" Date: Tue, 19 May 2026 18:11:53 -0400 Subject: [PATCH] docs: record live deploy under chess.sethpc.xyz/duplicate/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md: phase moves from "local sandbox" to deployed; adds the operations recipe (tar pipe to /var/www/duplicate-chess on Caddy CT 600). DECISIONS.md: supersedes the "Deployment deferred" entry with the chosen architecture — Caddy handle_path serving the static build under the chess.sethpc.xyz origin, rather than a separate subdomain or a Fastify static mount. --- CLAUDE.md | 24 +++++++++++++++++++++--- DECISIONS.md | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b148f8a..7c41a39 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,10 +27,16 @@ inventor's own point is that it cannot be understood from prose alone. ## Current State -- **Phase:** v1 **implemented and merged to `main`** — the engine and the compass - UI are complete. Not yet manually browser-tested. +- **Phase:** v1 **implemented, merged, and deployed** (2026-05-19) as a third + game-mode card ("under development") on `chess.sethpc.xyz`. The engine and the + compass UI are complete; not yet manually browser-tested by Seth. - **Repo:** `git.sethpc.xyz/Seth/duplicate_chess` (`main`). -- **Deploy target:** n/a — runs locally (`pnpm install && pnpm dev`). +- **Live URL:** https://chess.sethpc.xyz/duplicate/ — static bundle on Caddy CT 600 + at `/var/www/duplicate-chess/`. Independent of the blind_chess server (CT 690); + duplicate redeploys never restart blind_chess. Vite is built with + `base: '/duplicate/'`; the Caddy `chess.sethpc.xyz` block has a + `handle_path /duplicate/*` that strips the prefix and serves static files. +- **Local dev:** `pnpm install && pnpm dev`. - **Stack:** Vite + Svelte 5 + TypeScript, `chess.js`. Single package; engine in `src/engine/` (pure, DOM-free; 27 vitest tests passing), UI in `src/lib/`. - **Commands:** `pnpm dev` (run) · `pnpm build` · `pnpm test` (engine) · @@ -41,6 +47,18 @@ inventor's own point is that it cannot be understood from prose alone. keep); `deserialize` trusts the `player` field on replay; move log has no round numbers. See the latest handoff in `.claude/handoffs/`. +## Operations + +- **Health:** `curl https://chess.sethpc.xyz/duplicate/` returns the served `index.html`. +- **Redeploy** (after a `pnpm build`): + ``` + cd dist && tar -cf - . | ssh root@192.168.0.185 \ + 'cd /var/www/duplicate-chess && rm -rf assets favicon.svg icons.svg index.html && tar -xf -' + ``` + No Caddy reload needed for content changes; `file_server` serves live from disk. +- **Caddy config:** the `chess.sethpc.xyz` block in `/etc/caddy/Caddyfile` on CT 600 + (192.168.0.185). The `handle_path /duplicate/*` sub-block governs this app. + ## Conventions - Inherits homelab conventions from `~/bin/CLAUDE.md` (gitea CLI, conventional diff --git a/DECISIONS.md b/DECISIONS.md index a65ab0e..4ec3f2a 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -27,5 +27,5 @@ Format: `YYYY-MM-DD: ` 2026-05-19: AI opponents — deferred; the sandbox is operator-driven. 2026-05-19: Free position editor — rejected for v1; play-from-start + history scrubbing keeps every shown position reachable by legal play, preserving the "every board is real chess" invariant. 2026-05-19: Counter-rotating pieces upright on the diamonds — rejected; pieces rotate with their board so each player's army faces their seat (the point of the compass). -2026-05-19: Deployment behind Caddy — deferred; v1 runs locally, the static build can be hosted later trivially. +2026-05-19: Deployment behind Caddy — deferred; v1 runs locally, the static build can be hosted later trivially. **Superseded 2026-05-19 (later same day):** deployed under `chess.sethpc.xyz/duplicate/` as a 3rd "under development" card on the blind_chess landing. Vite built with `base: '/duplicate/'`; Caddy `handle_path /duplicate/*` strips the prefix and serves `/var/www/duplicate-chess/` on CT 600. Chosen over a separate subdomain so Andrew sees both games from one URL, and over a Fastify static mount so duplicate redeploys never restart blind_chess. 2026-05-19: A separate "dual view" of the on-move player's two boards — rejected; the compass is the whole UI, with the triple-highlight happening directly on it.