Skip to content

feat: SQL Chess — playable chess with SQL query panel, guest mode, invite links & GitHub Pages CI/CD#1

Merged
Devn913 merged 2 commits intomainfrom
copilot/integrate-ci-cd-and-deploy
Apr 20, 2026
Merged

feat: SQL Chess — playable chess with SQL query panel, guest mode, invite links & GitHub Pages CI/CD#1
Devn913 merged 2 commits intomainfrom
copilot/integrate-ci-cd-and-deploy

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

Builds the entire SQL Chess application from scratch (repo was previously empty). Every chess move is translated into real SQL statements in real time, with an optional SQL panel alongside the board.

Core App

  • index.html — single-page app: chess board, SQL panel, New Game / Guest / Invite modals, pawn-promotion dialog, toast notifications
  • css/style.css — dark-themed responsive layout; board highlights (selection, valid moves, last move, check), SQL syntax colouring, modal animations
  • js/app.js — chess.js engine integration, click-to-move with full rule enforcement (castling, en passant, promotion, check/checkmate/stalemate), SQL generation per move, invite URL encoding, undo/flip board
  • vendor/chess.min.js — chess.js v0.10.3 vendored locally (no CDN dependency)

SQL Panel

Each move generates contextually correct SQL against a 3-table schema (chess_game, chess_piece, chess_move). Special moves get special treatment:

-- Capture: White pawn d4 ✕ e5
DELETE FROM chess_piece WHERE game_id = '...' AND position = 'e5' AND color = 'black';
UPDATE chess_piece SET position = 'e5' WHERE game_id = '...' AND position = 'd4' AND color = 'white';

-- Kingside castle
UPDATE chess_piece SET position = 'g1' WHERE ... -- king
UPDATE chess_piece SET position = 'f1' WHERE ... -- rook

Panel is toggleable; "Copy All" exports the full session SQL.

Guest Mode & Invite

  • Guest mode — no login, click "Play as Guest" to start immediately
  • Invite link — encodes full game state (PGN) as base64 in the URL query string; recipient opens the link and continues the exact same game
https://devn913.github.io/SQL_Chess/?w=Alice&b=Bob&sql=1&pgn=MS4gZTQ=

CI/CD

  • .github/workflows/deploy.ymlvalidate job runs html-validate on every push/PR to main; deploy job publishes to GitHub Pages on push to main (requires Pages to be enabled in repo Settings → Pages → Source → GitHub Actions)

Screenshot

SQL Chess — board with SQL panel

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.jsdelivr.net
    • Triggering command: /usr/bin/curl curl -s REDACTED -o /home/REDACTED/work/SQL_Chess/SQL_Chess/vendor/chess.min.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Create a chess that lets you play chess, and in the right you will see a SQL Query, simply we will play chess with SQL. There's should be option to choose without sql as well. The chess should have option to play as guest, it can invite people and then when clicked it should generate a URL to invite. For now Integerate CI/CD and deploy it on github pages live

Copilot AI changed the title [WIP] Integrate CI/CD and deploy chess game on GitHub Pages feat: SQL Chess — playable chess with SQL query panel, guest mode, invite links & GitHub Pages CI/CD Apr 20, 2026
Copilot AI requested a review from Devn913 April 20, 2026 12:53
@Devn913 Devn913 marked this pull request as ready for review April 20, 2026 17:40
@Devn913 Devn913 merged commit dbf6dbc into main Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants