Overview
Magic Chess has four parts. Only the program is trusted. The backend and app
Program reference
The magic_chess Anchor program (Anchor 1.1.2) lives in
MagicBlock integration
Magic Chess plays games on a MagicBlock Ephemeral Rollup
Backend
backend/ is a Fastify 5 + TypeScript service backed by PostgreSQL (Supabase
Frontend
frontend/ is a Next.js 15 app exported as static files (out/) and served by
Chess Engine
Magic Chess implements a complete FIDE-standard chess engine that runs entirely on-chain. Every rule is enforced in the Solana Virtual Machine — not just move recording, but full validation, simulation, and state transition. The engine lives in programs/magicchess/src/utils/chesslogic.rs (~680 lines) with the board state and type definitions in programs/magic_chess/src/state/.