Skip to content

Rewrite chess-api in TypeScript with clean game API + timed clocks#15

Open
rudi-rudi-rudi wants to merge 59 commits into
anzemur:masterfrom
rudi-rudi-rudi:rewrite/v2-alpha
Open

Rewrite chess-api in TypeScript with clean game API + timed clocks#15
rudi-rudi-rudi wants to merge 59 commits into
anzemur:masterfrom
rudi-rudi-rudi:rewrite/v2-alpha

Conversation

@rudi-rudi-rudi
Copy link
Copy Markdown

Summary

This PR fully replaces the legacy API with a clean TypeScript implementation focused on a general-purpose chess game API.

What changed

  • Removed legacy v1 code paths and old Mongo/highscore architecture
  • Introduced a clean game-centric API:
    • POST /v2/games
    • GET /v2/games/:id
    • DELETE /v2/games/:id
    • GET /v2/games/:id/moves?from=e2
    • POST /v2/games/:id/moves
    • POST /v2/games/:id/ai-move
    • POST /v2/games/:id/resign
  • Added support for:
    • player-vs-player
    • player-vs-engine (simple built-in move chooser)
    • timed games with clocks + increment + timeout handling
  • Modernized stack:
    • Fastify
    • chess.js (latest line)
    • TypeScript

Notes

  • This is a foundational rewrite; persistence/auth/OpenAPI/tests can be layered in follow-up PRs.
  • Current in-memory store is intentional for clean API reset and easier iteration.

Anze Mur added 30 commits February 22, 2026 19:08
Anze Mur added 29 commits February 22, 2026 22:55
@lilBunnyRabbit
Copy link
Copy Markdown

I don't like where this project is heading with all the "AI" changes...

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