Real-time multiplayer chess built with Next.js and Supabase. Create a game, share the link, and play live — with standard chess and Chess960 (Fischer Random) support.
- ♟️ Real-time multiplayer over Supabase Realtime
- 🎲 Standard chess and Chess960 (Fischer Random) variants
- 🔗 Shareable game links — no account required
- 📱 Mobile-friendly board with drag-and-drop
- 🕘 Move history, captured pieces, and game-status overlays
- Next.js (App Router) + React
- Supabase (Postgres + Realtime)
- chess.js for move validation
- Tailwind CSS
- Vitest for tests
bun installCreate a .env.local file in the project root:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-keyRun the SQL in docs/sql_table_init.md against your Supabase project to create the games and moves tables and enable Realtime.
Note: Make sure Row Level Security (RLS) policies are enabled on these tables, since the anon key is exposed to the client.
bun run devOpen http://localhost:3000 in your browser.
To test on mobile devices on your local network:
bun run dev:networkThen visit http://<your-machine-ip>:3000 from your device.
| Command | Description |
|---|---|
bun run dev |
Start the dev server |
bun run dev:network |
Start the dev server on all interfaces (for mobile testing) |
bun run build |
Build for production |
bun run start |
Start the production server |
bun run lint |
Run ESLint |
bun run test |
Run tests with Vitest |