my-kaiqiuwang/__test__
kyuuseiryuu c70aeda412 feat(auth): add Kaiqiu account binding and update WebSocket architecture
- Add `UserBind` model to Prisma schema for linking Logto and Kaiqiu user IDs.
- Implement `/api/account/bind` endpoint (GET/PUT) to handle Kaiqiu account binding and retrieval.
- Refactor `KaiqiuService` to include a `login` method that performs browser automation-like login on kaiqiuwang.cc using `cheerio` and `fetch`.
- Update `UserCenter` page to include a new `BindKaiqiuAccount` component.
- Restructure `WebSocketService`:
  - Change from a simple global connection map to a per-user client tracking system (`#userClients`).
  - Update topic naming conventions (e.g., `ONLINE_MEMBER_CHANGE` -> `MEMBER_CHANGE`).
  - Add client-side broadcast capabilities for user-specific events like `MY_CLIENT_ONLINE`.
  - Add support for dynamic subscription handling (SUB/UNSUB) via WebSocket messages.
- Update `verifyLogtoToken` to accept either `Headers` or a raw token string for flexibility in WebSocket auth.
- Minor fixes: typo corrections in `WSTopic` enum and commented out debug logs.

BREAKING CHANGE: WebSocket payload structure has changed.
The `ws.data` property now contains a `WsPaylaod` object with a `user` field (previously it was a JSON string of the JWT payload).
The `WSTopic` names have been updated (e.g., `ONLINE_MEMBER_CHANGE` is now `MEMBER_CHANGE`), requiring updates to any client code subscribing to these topics.
2026-03-18 01:18:34 +09:00
..
data fix(global) .gitkeep 2026-01-29 22:14:39 +09:00
fav-dao.test.ts feat: implement user favorite player system with Logto sync 2026-03-09 10:16:27 +09:00
kaiqiu-login.test.ts feat(auth): add Kaiqiu account binding and update WebSocket architecture 2026-03-18 01:18:34 +09:00
kaiqiu.test.ts feat(app): split game selector and implement club detail page 2026-03-13 10:27:05 +09:00
redis.test.ts feat: add current-score grouping flow with cached uid score API 2026-02-26 00:13:37 +09:00
utils.load-html.test.ts refactor(utils): split shared helpers and server scraping modules 2026-02-26 00:26:25 +09:00
utils.test.ts refactor(utils): split shared helpers and server scraping modules 2026-02-26 00:26:25 +09:00
xcxapi.test.ts init 2026-01-29 22:00:49 +09:00