Sol.College

Structure lesson (licence does not allow quoting code)

Checkmate

Original
SendArcade/Checkmate
SuperStack fork
Blockchains/Checkmate @ 33b5b32
Stars
0
Last push (original)
2025-09-21
Languages
TypeScript, Rust, MDX, JavaScript, CSS
Detected stack
@solana/kitAnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://checkmate-docs.vercel.app

Architecture

194 source files. By extension: .ts ×104, .tsx ×63, .rs ×21, .js ×6.

Top-level directorySource files
apps142
packages51
scripts1

On-chain programs: packages/program/programs/chess

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
cancel_gameCancelGamepackages/program/programs/chess/src/lib.rs:70
join_gameJoinGamepackages/program/programs/chess/src/lib.rs:74
forfeit_gameForfeitGamepackages/program/programs/chess/src/lib.rs:78
offer_drawOfferDrawpackages/program/programs/chess/src/lib.rs:82
reject_drawRejectDrawpackages/program/programs/chess/src/lib.rs:86
accept_drawAcceptDrawpackages/program/programs/chess/src/lib.rs:90
claim_winningsClaimWinningspackages/program/programs/chess/src/lib.rs:103
handlerRejectDrawpackages/program/programs/chess/src/instructions/reject_draw.rs:56
handlerClaimWinningspackages/program/programs/chess/src/instructions/claim_winnings.rs:239
handlerAcceptDrawpackages/program/programs/chess/src/instructions/accept_draw.rs:60
handlerOfferDrawpackages/program/programs/chess/src/instructions/offer_draw.rs:58
handlerCancelGamepackages/program/programs/chess/src/instructions/cancel_game.rs:92
handlerForfeitGamepackages/program/programs/chess/src/instructions/forfeit_game.rs:50
handlerJoinGamepackages/program/programs/chess/src/instructions/join_game.rs:102

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
packages/program/tests/utils/setup.tsKeypair, PublicKey, Program, SystemProgram, Connection, ComputeBudgetProgram
packages/program/tests/utils/accounts.tsPublicKey, Keypair, Program, findProgramAddressSync, SystemProgram, getAssociatedTokenAddressSync
packages/program/tests/utils/token.tsKeypair, PublicKey, Connection, Transaction, sendAndConfirmTransaction, createMint
packages/program/tests/utils/transactions.tsPublicKey, Program, Keypair, Connection, getAssociatedTokenAddressSync, SystemProgram
packages/program/tests/createGame.test.tsPublicKey, SystemProgram, Keypair, findProgramAddressSync, Program, Connection
packages/program/tests/joinGame.test.tsPublicKey, SystemProgram, Keypair, Program, Transaction
packages/program/tests/utils/pda.tsPublicKey, findProgramAddressSync
packages/program/tests/cancelGame.test.tsSystemProgram, PublicKey, Keypair, Program, Connection
packages/program/tests/integrator.test.tsKeypair, SystemProgram, PublicKey, Program, Connection, Transaction
packages/program/programs/chess/src/state/game.rsPubkey
packages/program/tests/makeMove.test.tsTransaction, PublicKey, Keypair, Program, ComputeBudgetProgram
packages/program/tests/claim.test.tsgetAssociatedTokenAddressSync, PublicKey, SystemProgram, Program, Connection

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/checkmate/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
.npm run dev
.npm run build
.npm run test
.npm run lint
packages/sdknpm run start
packages/sdknpm run build
packages/sdknpm run test
packages/sdknpm run lint
packages/programnpm run lint
apps/indexernpm run dev
apps/indexernpm run build
apps/indexernpm run test
apps/indexernpm run lint
apps/docsnpm run dev
apps/docsnpm run start
apps/docsnpm run build

What you could build from it