Commit Graph

65 Commits

Author SHA1 Message Date
empty
83bc4da3cc fix(admin): add award to musicTrack type 2026-02-04 00:34:41 +08:00
empty
bd62dff06a feat(admin): add award sound effect button 2026-02-04 00:33:03 +08:00
empty
baacee50e6 fix(admin): show program name in single line with ellipsis 2026-02-04 00:04:09 +08:00
empty
69c789ba9d fix(admin): improve mobile layout for program config section 2026-02-04 00:01:51 +08:00
empty
0f484f63d4 docs: add CLAUDE.md with deployment guide 2026-02-04 00:00:25 +08:00
empty
307811886b fix(admin): add votes and stamps fields when creating new program 2026-02-03 23:55:27 +08:00
empty
92d560445e fix(admin): add performer and remark fields to programs type 2026-02-03 23:54:37 +08:00
empty
7fea6b8578 feat(admin): enhance program config with CRUD and reorder
- Change "结果展示" to "投票结果" in global controls
- Add program edit modal with name, team, performer, remark fields
- Add move up/down buttons for program reordering
- Add delete program with confirmation
- Add "添加节目" button for creating new programs
- Add responsive styles for mobile view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:52:29 +08:00
empty
83bf1d3a43 chore: sync various improvements and fixes
- Update gitignore and serena config
- Improve connection and voting stores
- Enhance admin routes and socket handling
- Update client-screen views
- Add auth middleware

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:31:38 +08:00
empty
39caecdd95 fix(mobile): update progress ring hint text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:29:42 +08:00
empty
19b7823d42 fix(mobile): add horizontal scroll hint to award selection step
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:22:01 +08:00
empty
a27134b82e feat(mobile): add voting status step to onboarding tour
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:20:03 +08:00
empty
7e15fcb377 fix(mobile): adjust onboarding tooltip width to prevent button wrapping
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:17:19 +08:00
empty
655f77ec3e fix(mobile): prevent onboarding tooltip from overflowing screen
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:12:44 +08:00
empty
65b153e5df feat(mobile): add onboarding tour for voting page
- Add OnboardingTour component with step-by-step guidance
- Add useOnboarding composable for state management
- Reset onboarding on logout for re-viewing
- 4 steps: welcome, award selection, program voting, progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:09:02 +08:00
empty
eee34916b0 fix(mobile): replace title with voting status in header
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:40:30 +08:00
empty
6ccc571be2 refactor(mobile): simplify header to single row layout
- Left: username + logout button (stacked)
- Center: page title
- Right: larger progress ring (56px)
- Remove connection status (shown in WeChat navbar)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:37:15 +08:00
empty
8ab575b14a feat(mobile): redesign vote page header layout
- Move username to top-left position
- Center the page title
- Move logout button to bottom-left
- Show connection status with latency on top-right

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:32:22 +08:00
empty
8f21ff6fd9 fix: add missing prisma utility file
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:29:02 +08:00
empty
406a5afa33 feat(server): add Program and Award database models
- Add Program and Award tables to Prisma schema
- Update program-config.service to support database with JSON fallback
- Update ProgramCard.vue display logic for dynamic teamName/performer
- Add seed script to import data from JSON config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:26:47 +08:00
empty
b5fa4c7086 chore: add WeChat MP domain verification file
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:00:52 +08:00
empty
9f94f362d4 chore: add wechatMp config for MP OAuth
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:38:06 +08:00
empty
7a3b9a3694 chore: add missing auth utils and public routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:35:04 +08:00
empty
9b11f99fed feat: implement WeChat MP OAuth login
- Add wechat-mp.service.ts for MP web authorization
- Add wechat-mp.routes.ts with /api/mp endpoints
- Update EntryQRCode.vue to show H5 URL QR code
- Update HomeView.vue with WeChat auth detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:33:32 +08:00
empty
b53e732ffa docs: update documentation for WeChat OAuth login
- README.md: update scan login section to reflect WeChat OAuth flow
- DEPLOY.md: add WeChat environment variables configuration
- 联调测试方案.md: update test case A01 for new login flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:36:03 +08:00
empty
2cb9032187 feat: update login flow and add firework effects
- Update mobile HomeView to show WeChat scan login instructions
- Remove manual name/department input form from mobile client
- Add firework particle effects to big screen background
- Remove department field from login flow types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:18:03 +08:00
a40c8b6045 Merge pull request 'feat: add WeChat environment variables to docker-compose' (#4) from feat/add-wechat-env-config into main
Reviewed-on: #4
2026-02-03 14:55:34 +08:00
f2161c68da feat: add WeChat environment variables to docker-compose
## Changes

### Docker Compose Configuration
- Add WECHAT_APP_ID environment variable to server service
- Add WECHAT_APP_SECRET environment variable to server service
- Add WECHAT_REDIRECT_URI environment variable to server service

## Purpose
Enable WeChat Open Platform QR code login functionality by passing
WeChat credentials from .env file to the server container.

## Testing
- All containers started successfully
- Server loaded configuration correctly
- WeChat login endpoints are now available

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 14:48:04 +08:00
empty
3246479643 feat: integrate WeChat Open Platform QR code login
- Add WeChat service for OAuth2 authentication flow
- Add WeChat routes (/api/wechat/login, /api/wechat/callback)
- Add WeChat types for login state and responses
- Update EntryQRCode component to support WeChat login
- Add WeChat config options (appId, appSecret, redirectUri)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:38:54 +08:00
5d7bf74101 Merge pull request 'feat: update program configuration with actual program names' (#3) from feat/update-program-names into main
Reviewed-on: #3
2026-02-03 13:45:30 +08:00
197cd7ca29 Merge pull request 'fix/deployment-and-database-integration' (#2) from fix/deployment-and-database-integration into main
Reviewed-on: #2
2026-02-03 13:45:10 +08:00
c09dbfbd3d feat: update program configuration with actual program names
## Changes

### Program Configuration
- Update programs.json with actual program names:
  - 节目一:青苹果乐园
  - 节目二:五百年桑田沧海
  - 节目三:我的中国心
  - 节目四:萍聚
  - 节目五:追光而行,共赴新程
  - 节目六:粉红色的回忆
  - 节目七:敬业狂想曲

### Dockerfile Update
- Add config directory copy to Dockerfile
- Ensure program configuration is included in production build

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:56:31 +08:00
84838928e3 feat: update program configuration with actual program names
## Changes

### Program Configuration
- Update programs.json with actual program names:
  - 节目一:青苹果乐园
  - 节目二:五百年桑田沧海
  - 节目三:我的中国心
  - 节目四:萍聚
  - 节目五:追光而行,共赴新程
  - 节目六:粉红色的回忆
  - 节目七:敬业狂想曲

### Dockerfile Update
- Add config directory copy to Dockerfile
- Ensure program configuration is included in production build

## Testing
- Configuration loaded successfully (7 programs, 7 awards)
- Server restarted and verified config loading

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:52:03 +08:00
296f6e09f8 fix: add MySQL database and fix deployment issues
## Changes

### Database Integration
- Add MySQL 8.0 service to docker-compose.yml
- Configure DATABASE_URL environment variable for server
- Add health check for MySQL service
- Create mysql_data volume for data persistence

### Dockerfile Improvements
- Generate Prisma Client in builder stage
- Copy Prisma Client from correct pnpm workspace location
- Ensure Prisma Client is available in production container

### Client-Mobile Fixes
- Remove deprecated StampDock.vue component
- Fix voting store API usage in VotingPage.vue
- Add type assertion for userTickets in connection.ts
- Add remark property to AwardConfig interface in voting.ts

## Testing
- All containers start successfully
- Database connection established
- Redis connection working
- 94 participants restored from Redis
- Vote data synced (20 votes)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:46:51 +08:00
empty
e211bb2130 feat: add lottery results display page
- Add LOTTERY_RESULTS system phase
- Add /screen/lottery-results route
- Add LotteryResultsView component
- Add database connection management (db.ts)
- Update DrawResult schema to remove User relation
- Add awardIcon field to VoteResultsView

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:13:28 +08:00
empty
57cbaa5728 fix: broadcast state change after redraw current round
Add emit('stateChange') to notify frontend clients when
lottery round is redrawn, so UI updates correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:05:39 +08:00
empty
5ef68b1264 feat: make award statistics panel collapsible
- Convert stats-section to collapsible details element
- Add expand/collapse indicator (▶/▼)
- Save screen space on mobile devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:02:15 +08:00
empty
aba96f88df refactor: optimize data cleanup functions in director console
- Add redrawCurrentRound() method to clear current round winners
- Add /api/admin/lottery/redraw API endpoint
- Rename "重置" to "重置本轮" (reset current round state only)
- Add "重抽本轮" button (clear winners and allow re-draw)
- Rename "紧急操作" to "数据管理" with clearer button labels
- Change "高级清理" to collapsible "开发者选项"
- Update confirmation modal text for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:59:13 +08:00
empty
4a2f1e7c8a refactor: 优化导演控制台代码结构和用户体验
高优先级优化:
- 合并 REVEAL/COMPLETE 状态的重复代码模板

中优先级优化:
- 添加防抖函数 (debounce/debounceLeading) 防止按钮重复点击
- 投票控制按钮添加 500ms 防抖
- 抽奖控制按钮添加 500ms 防抖
- 新增 Toast 通知系统替代 alert
- 优化 API 错误反馈:loadPrizeConfig、loadParticipants、
  importParticipants、savePrizeConfig 现在显示 Toast 错误提示

低优先级优化:
- 新增实时奖项统计面板,显示各奖项投票 TOP3
- 添加奖项统计面板响应式样式
- 添加 Toast 动画和样式

其他:
- 添加 getAwardDisplayName 辅助函数
- 优化移动端适配
2026-01-29 00:28:19 +08:00
empty
5c5d0ad85c feat: 优化100人并发投票支持 + 修复奖项名称硬编码问题
服务端优化:
- Socket.IO 配置优化,支持高并发 WebSocket 连接
- 添加 connectTimeout、perMessageDeflate 等参数

压测脚本:
- 新增 vote-real-scenario.yaml 真实场景压测配置
- 支持 100人瞬间爆发、每人7票、不同投票速度模拟
- 添加随机延迟函数模拟真实用户行为
- 强制 WebSocket 传输避免 HTTP 连接限制

前端修复:
- 修复 PostcardItem、PostcardDisplay 奖项名称硬编码问题
- 组件现在从后端 awards 配置动态获取奖项名称
- 修复 LiveVotingView、AdminControl 传递 awards 数据
- 新增 gala 压测命令到 package.json

测试验证:
- 100人并发压测通过,成功率 100%
- P95 延迟 0.7ms,远低于 500ms 阈值
- 系统可稳定支持 3.3 倍现场负载
2026-01-29 00:09:03 +08:00
empty
2f8bf0d755 style: refine mobile voting dock film strip UI with seamless borders and improved text clarity 2026-01-28 22:42:59 +08:00
empty
d090c80e50 修复投票计数与状态同步,完善票据与戳显示
修复投票系统:禁止重复投票、恢复状态、同步大屏

完善投票流程与展示:计数准确、状态可恢复、样式统一
2026-01-28 21:37:05 +08:00
empty
66ca67c137 feat(server): 添加节目配置文件管理
- 新增 programs.json 配置文件
- 新增 ProgramConfigService 服务
- 新增节目配置 API 接口 (GET/PUT /api/admin/programs)
- 修改 AdminService 使用配置服务替代硬编码
- 添加单元测试
2026-01-28 13:55:03 +08:00
empty
a89d844f7b fix: add missing poolTag to default prize config
The default configuration was missing poolTag for all rounds,
causing the lottery to draw from all participants instead of
filtering by generation/zodiac tags when prizes.json fails to load.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:35:49 +08:00
2b34d14e96 Merge pull request #1
fix: production deployment improvements and configuration fixes
2026-01-26 17:21:38 +08:00
1e1563c5f5 Merge branch 'main' into fix/production-deployment-improvements 2026-01-26 17:17:51 +08:00
371f117064 fix: production deployment improvements and configuration fixes
## 主要改动

### 1. 修复二维码地址硬编码问题
- 将 MainDisplay.vue 中硬编码的移动端 URL 改为环境变量配置
- 添加 VITE_MOBILE_URL 环境变量支持
- 支持通过 .env 文件动态配置移动端地址

### 2. 修复音频文件路径问题
- 修正 display.ts 中音频文件路径,添加 /screen 前缀
- 修复 BGM、抽奖音效、胜利音效的加载路径

### 3. 修复 Docker 构建问题
- 添加中国 npm 镜像配置,解决构建超时问题
- 修复缺失的 tsconfig.base.json 文件拷贝
- 修复 Redis 环境变量配置(REDIS_HOST/REDIS_PORT)
- 添加 Lua 脚本文件拷贝到生产容器

### 4. 修复前端路由和资源加载
- 添加 Vite base path 配置 (/screen/)
- 修复 Vue Router base path 配置
- 修正 Caddyfile 路由顺序,确保 /screen 路径优先匹配

### 5. 修复 TypeScript 编译错误
- LuckyDrawView.vue: 添加 round 属性类型定义
- ProgramCard.vue: 添加非空断言处理

### 6. 修复 SCSS 变量问题
- 替换未定义的 SCSS 变量为硬编码颜色值
- 修复 VoteView、ConnectionStatus、HomeView、ScanLoginView 中的样式问题

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 16:59:02 +08:00
empty
5290141fda docs: add comprehensive README.md
- Project overview and features
- Tech stack documentation
- Project structure
- Quick start guide
- Deployment instructions
- Design specifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 01:13:29 +08:00
empty
4d621b5901 feat: replace Nginx with Caddy for automatic SSL management
- Add Caddyfile with automatic HTTPS configuration
- Add Dockerfile.caddy for frontend build with Caddy
- Update docker-compose.yml to use Caddy service
- Update DEPLOY.md with simplified deployment instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:28:15 +08:00
empty
11e5754d05 feat: add audio files for lottery and BGM
- bgm.mp3 - background music
- lottery.mp3 - lottery spinning music
- fanfare.mp3 - winner celebration sound

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:26:01 +08:00