A real-time online chess app with private multiplayer rooms, built-in single-player AI, and multilingual SEO-ready pages.
- Private multiplayer rooms over WebSocket + Durable Objects
- Single-player mode with difficulty levels
- Expert difficulty defaults to
stockfish.wasmin Web Workers (automatic fallback to built-in TS engine) - In-app language switching (
en,zh,fr,es,ja) - PWA support (manifest + service worker + install prompt)
- Localized SEO entry pages and localized privacy pages
- Cloudflare Worker routing for app pages and realtime endpoints
- Frontend: React 19 + Vite + Tailwind CSS 4
- Chess engine/rules:
chess.js - Expert AI backend:
stockfish.wasm(default forexpertdifficulty) - Realtime/backend: Cloudflare Workers + Durable Objects + WebSocket
- Tests: Node test runner (
node --test) + TypeScript checks
src/: React app and client logicworker/: Cloudflare Worker and Durable Object servicetests/client/: frontend and config teststests/worker/: worker routing and protocol testspublic/: static assets, sitemap, robots, privacy pagesdocs/: migration and realtime protocol docs
- Node.js (LTS recommended)
- npm
- Cloudflare account (only required for deployment)
- Install dependencies:
npm install
- Start app locally:
npm run dev
The default dev flow runs Vite locally.
Copy .env.example to your local env file if needed and set values for your environment.
Optional realtime runtime config:
VITE_REALTIME_WS_URLVITE_REALTIME_WS_PATHS(default:/ws,/api/ws)VITE_REALTIME_MAX_RECONNECT_ATTEMPTS(default:8)VITE_RTC_ICE_SERVERS(JSON array; include TURN for production)
npm run dev: start local appnpm run build: production buildnpm run preview: preview built appnpm run test: run test suitenpm run lint: TypeScript type-check (tsc --noEmit)npm run worker:dev: run Cloudflare Worker locallynpm run worker:typegen: generate Worker typesnpm run worker:deploy: build and deploy Worker
Worker config is in wrangler.toml:
- Worker entry:
worker/src/index.ts - Durable Object:
RoomDurableObject - Static assets binding:
ASSETS->./dist
Typical deployment flow:
npm run build
npm run worker:deployLocalized app entry routes:
//zh//fr//es//ja/
Localized privacy routes:
/privacy//zh/privacy//fr/privacy//es/privacy//ja/privacy/
Sitemap and robots:
public/sitemap.xmlpublic/robots.txt
For privacy-related requests, contact:
contact@orangely.xyz
- The app uses the built-in TypeScript engine for
easy/medium/hard, and defaults tostockfish.wasmforexpert. - When a
stockfish.wasminit/search attempt fails, the worker automatically falls back to the TypeScript engine. - Worker telemetry events may include backend, timeout, and fallback diagnostics; they are technical signals and do not include chat/audio/video payloads.
docs/cloudflare-worker-plan.mddocs/cloudflare-realtime-protocol.md