Replace the previous base image 'oven/bun:latest' with 'dhi.io/bun:1-debian13-dev'.
This updates the underlying OS to Debian 13 and pins the Bun version for better consistency.
Refactor the Dockerfile to separate dependency installation and type
generation from the runtime environment.
Changes:
- Moved `bun prisma generate` to the build phase to ensure type definitions
are created during image build rather than at runtime.
- Updated the ENTRYPOINT to run `bun prisma migrate deploy` before starting
the application. This ensures database migrations are applied automatically
upon container startup, supporting production deployments with incremental
schema changes.
- Added missing newline at the end of the file for compliance.
This change ensures that the application handles schema updates safely in
production without requiring a separate migration step outside the container.
Introduces WebSocket connectivity for live data updates and a new subscription model for events.
Key changes:
- Integrated WebSocketService to handle open, message, and close events via the /ws endpoint.
- Added EventSubscribeService APIs to manage user subscriptions to specific events (matchId) via REST endpoints (`/api/subscribe-event` and `/api/subscribe-event/:matchId`).
- Implemented custom message protocol (JSON format) for WebSocket communication with defined topics (ONLINE_MEMBER_CHANGE, etc.).
- Updated database schema to include the `EventSubs` model for storing subscriptions.
- Refactored Dockerfile to use `bun prisma db push` for database migrations on startup.
- UI Updates:
- Replaced the Rate component in FavButton with Star icons for better UX.
- Adjusted layout of FavButton to be absolute positioned.
- Added debounce to ClubSummary data fetching.
- Removed unused `isMobile` import from ClubSummary.
- Utilities: Added helper functions `toCustomMessage` and `fromCustomMessage` for parsing WebSocket messages.
- Add Prisma code generation in Dockerfile build step.
- Implement instant state updates for favoriting players via store hooks.
- Enhance 'FavPlayersPage' with:
- New "Sync to cloud" and "Clear local favorites" actions.
- Updated tabs showing counts for local vs. account favorites.
- Auto-detection of view mode based on authentication status.
- Add auto-login support in 'UserCenter' triggered by query parameter `autoSignIn=true`.