How moshang-ax/lottery works
Lottery is a Vue-based annual-dinner raffle with an Express data service. The workflow initializes participants and prize configuration, presents them in a 3D name-ball interface, runs draws and supports redraw/reset, then saves and exports results. The graph includes the documented persistence and Excel capabilities. Some API-to-server wiring is not visible in the supplied excerpts, so that relationship is marked unverified.
Main entry points: App.vue Vue app · engine.js 3D draw engine · store.js Draw state · server.js Express service
Components 16
Raffle interface
- Vue app
product/src/App.vue - Draw controls
product/src/components/ControlPanel.vue - Prize display
product/src/components/PrizeBar.vue - Status bubbles
product/src/components/QipaoList.vue - Music control
product/src/components/MusicControl.vue - Star background
product/src/components/StarCanvas.vue
Draw runtime
- 3D draw engine
product/src/lottery/engine.js - Draw state
product/src/lottery/store.js - Prize settings
product/src/lottery/config.js
Data service
- API client
product/src/api/index.js - Express service
server/server.js - Prize configuration
server/config.js
Lottery records
- Excel and persistence
server/help.js - Participant workbook
server/data/users.xlsx - Exported results
server/抽奖结果.xlsx
Other components
- Organizer
Connections 19
- Organizer → Draw controls: operates
product/src/components/ControlPanel.vue - Vue app → 3D draw engine: boots
product/src/App.vue - Vue app → Draw controls: renders
product/src/App.vue - Vue app → Prize display: renders
product/src/App.vue - Vue app → Status bubbles: renders
product/src/App.vue - Vue app → Music control: renders
product/src/App.vue - Vue app → Star background: renders
product/src/App.vue - Draw controls → 3D draw engine: dispatches actions
product/src/components/ControlPanel.vue - 3D draw engine → Draw state: updates
product/src/lottery/engine.js - 3D draw engine → Prize settings: reads
product/src/lottery/engine.js - 3D draw engine → API client: requests data
product/src/lottery/engine.js - Prize display → Draw state: reads
product/src/components/PrizeBar.vue - Status bubbles → Draw state: reads
product/src/components/QipaoList.vue - Music control → Draw state: posts alerts
product/src/components/MusicControl.vue - API client → Express service: calls service
- Express service → Prize configuration: loads
server/server.js - Express service → Excel and persistence: loads and saves
server/server.js - Excel and persistence → Participant workbook: reads workbook
server/help.js - Excel and persistence → Exported results: writes workbook
server/help.js