Lucky Spin — House of Legends
Documented: 2026-05-11 Doc Status: Excellent | ✓ All 6 checks passedOverview
Guests can spin a wheel for a chance to win comp items (free drinks, discounts). One spin per guest per visit.Spin Flow
Guest visits Photo Wall or Minigames section, sees the “Lucky Spin” prompt, and taps “Spin Now” button. The spin animation plays (using framer-motion), lands on a prize, which is revealed with celebration, and the comp item is added to the order or discount is applied.Tables
Prize Types
| Type | Description | Example |
|---|---|---|
MENU_ITEM | Free menu item | Free Cocktail |
DISCOUNT | Percentage off bill | 10% off |
Weight System
Higher weight = more likely to land on that prize. Example config:| Prize | Type | Weight |
|---|---|---|
| Free Cocktail | MENU_ITEM | 30 |
| 5% Off | DISCOUNT | 25 |
| 10% Off | DISCOUNT | 20 |
| Free Dessert | MENU_ITEM | 15 |
| 15% Off | DISCOUNT | 10 |
Components
| Component | Purpose |
|---|---|
spin-wheel.tsx | Animated wheel (framer-motion) |
spin-trigger.tsx | ”Spin Now” button |
spin-result.tsx | Prize reveal modal |
spin-history.tsx | Guest’s spin results |
Backend Functions
| Function | Purpose |
|---|---|
minigames.spin | Process spin, select prize |
minigames.getSpinResult | Get guest’s spin result |
minigames.getPrizes | Get available prizes |
minigames.applySpinPrize | Apply comp to order |
Animation
Wheel spin uses framer-motion:animate-spinwith custom easing- Random duration 3-5 seconds
- Lands on prize based on server-side selection (not client random)