lila-web
Next.js web client for the Lila chess scaffold - local, engine, and online play with an agent-readiness surface.
Overview
lila-web is the browser front end of the Lila chess scaffold ("lila" is the
lichess codename). It renders the board, move list, and replay controls, and
supports hot-seat local play, play against a computer engine with adjustable
skill, and online play against another human with optional video chat. It
talks to the sibling lila-server backend for game state and online play,
and ships an agent-readiness surface (llms.txt site index, a read-only MCP
server, and /.well-known protocol discovery artifacts).
Stack
- Next.js (App Router) + React 19, bundled with Turbopack
- Effect v4 for typed effects/domain logic
@repo/chess-ui(board UI) and@repo/chess-domain(rules) workspace packages, pluschess.jscanvas-confettifor celebrations- Vitest for tests, oxlint for linting
Online features need apps/lila-server (default http://localhost:3030, override with
NEXT_PUBLIC_LILA_API). Start it alongside lila-web for local dev.
Develop
pnpm -F lila-web dev # next dev --turbopack --port 3031
pnpm -F lila-web lint # oxlint src/
pnpm -F lila-web check-types # tsc --noEmit --incrementalTest
pnpm -F lila-web test # vitest (watch)
pnpm -F lila-web test:ci # vitest run + junit reportBuild & deploy
pnpm -F lila-web build # next build --turbopack
pnpm -F lila-web start # next start --port 3031Deployed on Vercel (albertonline-org-lila-web) at
lila-web.albertonline.org. The online
features need apps/lila-server, which has no production host yet, so the
deployed client is UI-only where the server is required.
Structure
src/app/- App Router routes:/(home),/play(local board),/play/online/[joinCode](online),/mcp(MCP server),/api/agent/well-known/[...seg](discovery artifacts)src/components/- board views, move list, replay controls, video chatsrc/lib/- online client, replay/FEN history, guest id helperssrc/proxy.ts- middleware adding agent-discovery Link headers and Markdown content negotiationpublic/-llms.txt,robots.txt,sitemap.xml,auth.md
See the apps overview and the monorepo overview.