mancala/docs/specs/quarkus-backend/tasks.md
Halit Aksoy 0c112eb716 feat(backend): serve the WebSocket protocol and the HTTP API
RtmtServer ports the WebSocket protocol (auth handshake, sockets per
user, ping) and runs on the game loop; the websockets-next endpoint at /
only forwards socket events. The HTTP routes, CORS and the access log
match the Express app. Backend wires everything and restores live games
before handling socket events. End-to-end tests play games over real
sockets against Postgres and Valkey.
2026-10-16 11:33:07 +03:00

1.5 KiB

Quarkus backend: tasks

Work through the tasks in order; each ends with its tests passing and a commit. Tick a task when it is committed.

  • 1. Spec: requirements, design and tasks.
  • 2. Project and engine: Maven project in apps/backend-quarkus (Quarkus 3.40, Java 25); the engine port with unit tests; scripts/record-engine-games.js and the parity test (R2).
  • 3. Models, game loop and auth: the wire types and the shared ObjectMapper; GameLoop, Scheduler, ManualScheduler; KeycloakTokenVerifier with unit tests.
  • 4. Game logic: GameStore, MatchMaker, GameClocks, GameSerialization, GameRecorder, GameManager, GameClockScheduler, LiveGames, PublicIds, CrashLog; the in-memory fakes and the ported unit tests.
  • 5. Storage: migrations and their runner, PostgresGameHistoryRepository, GameHistoryService, ValkeyLiveGameStore, ValkeyCache; integration tests with Dev Services.
  • 6. WebSocket and HTTP: RtmtServer with unit tests, RtmtEndpoint, the HTTP resources, Backend wiring and startup, configuration; @QuarkusTests for the API and the WebSocket.
  • 7. Replace the Node backend: move the project to apps/backend, Dockerfile, .dockerignore, compose, remove the Node sources; build the image.
  • 8. End to end and docs: the Chrome tests from design.md against the local stack; README.md, apps/backend/README.md, AGENTS.md, TODO.md.