| Requirement | Version |
|---|---|
| Node.js | 22 or later |
| pnpm | 10 or later |
| Git | Any recent version |
git clone https://github.com/chessvision-org/chess-vision.git
cd chess-vision
pnpm install
The install step runs husky install through the prepare script, wiring up pre-commit and commit-message hooks. In CI environments, set HUSKY=0 to skip hook installation.
pnpm dev
Vite serves the application on http://localhost:3000 with hot module replacement.
pnpm validate # typecheck + lint + format check + tests
All four must pass before opening a pull request. CI runs the same command.
Individual commands:
pnpm typecheck # tsc --noEmit
pnpm lint # ESLint --max-warnings=0
pnpm format:check # Prettier check
pnpm test # node --test
pnpm build # Vite build + prerender → dist/
pnpm preview # serve dist/ locally
The build runs Vite followed by a Puppeteer-based prerender step. Vendor chunks are split manually:
vendor-reactvendor-iconsvendor-motionvendor-dndvendor-supabase# Production
docker compose up --build -d web # http://localhost:3000
# Development with HMR
docker compose --profile dev up --build dev # http://localhost:5173
Copy .env.example to .env.local and fill in the values:
cp .env.example .env.local
| Variable | Required | Purpose |
|---|---|---|
VITE_SUPABASE_URL |
For auth/sync | Supabase project URL |
VITE_SUPABASE_ANON_KEY |
For auth/sync | Supabase anon key |
The application runs fully without Supabase — auth and cloud sync features are disabled when these are absent.
@/* → src/*
@hooks → src/shared/hooks
@app-types → src/shared/types
pnpm build:analyze
Opens an interactive bundle treemap via vite-bundle-visualizer.