# ๐ฎ MiniGame Specification
> **Version**: v1.0
> **Last Updated**: 2025-04-28
> **Author**: Sean
Axure Prototype Links:
- Frontend & Backend Mapping: https://f0snj7.axshare.com
- Backend Management: https://byrscb.axshare.com
---
# ๐ 1. Game Rules & UI Overview
---
## ๐๏ธ 1-1 Universal Entry - Mini Game Floating Button
- The Mini Game icon appears as a floating button on the platform's homepage.

- Clicking the icon opens the Mini Game main menu, displaying all active mini-games.

---
## ๐ก 1-2 Lucky Wheel
### Rules & Display
- Players click the **SPIN** button to place a bet. The wheel spins and stops at a prize segment, awarding the corresponding amount or multiplier.
- The bet amount is set in the backend and displayed in the bet area.
- Features include rules description, bet history lookup, a close button, spin animation, and winning animations.
### UI & Features
- SPIN Button & Bet Confirmation:

- Pointer landing on prize + reward trigger:

- Bet Amount Display:

- Rules Description Panel:


- Bet Record Panel:


- Close Mini Game Button:

- Spin Animation Demo:

- Winning Animation Demo:

---
## ๐งง 1-3 Red Envelope Rain
### Rules & Display
- Click **START** to trigger falling red envelopes.
- Clicking an envelope consumes a bet to open it and grants a random reward.
- Players can use **Auto Open** to open envelopes automatically.
- Each envelope requires a pre-set amount.
- Includes rules description, bet history, and close button.
### UI & Features
- Entry Screen (after pressing START):


- Reward Triggered from Clicking an Envelope:


- Auto Open Feature (random open):


- Rules Description Panel:


- Bet History Panel:


- Close Mini Game Button:

- Reward Animation Demo:

---
## ๐ฒ 1-4 Guess Big or Small
### Rules & Display
- Players select a bet amount and place bets on one of three areas: **Big**, **Small**, or **7**.
- After the countdown, betting closes and the dice roll animation plays.
- Winnings are calculated based on the result and odds.
- Features include repeat bet, double bet, cancel bet, and real-time results.
### Betting Flow
1. Select bet amount:

2. Select betting area (Big / Small / 7):

3. Confirm and submit bet:

---
### Additional Features
- Repeat previous bet (requires confirmation):


- Double previous bet (requires confirmation):


- Real-time results update (sliding left):

- Bet amount display & cancel button (X icon):

- Betting area UI:

- Mock Data Preview (number of bettors & amount):

- Menu Toggle Button:

- Bet Record Lookup:


- Rules Description Panel:


- Result Trend & History:


- Close Mini Game Button:

---
## ๐ฅ 1-5 Golden Egg Smash
### Rules & Display
- Each egg requires a pre-set bet to smash.
- Clicking a golden egg plays a crack animation and reveals a random reward.
- **Auto** will smash a random egg automatically.
- **Open All** smashes all unopened eggs in one click.
- Includes rules description, bet record lookup, and close functionality.
---
### UI & Features
- Display of amount required to open one egg:

- Open All button (smash all eggs at once):


- Auto Smash (open one random egg):

- Rules Description Panel:


- Bet Record Lookup Panel:


- Close Mini Game Button:

- Egg Cracking Animation:

- Winning Animation:

---
# ๐ ๏ธ 2. Backend Settings & Frontend Mapping
- Wireframe Reference: https://f0snj7.axshare.com
---
## ๐ก 2-1 Lucky Wheel Settings
| Item | Frontend Display | Backend Setting | Notes |
|:-----|:------------------|:----------------|:------|
| Number of Wheel Segments | Wheel layout | Prize configuration | Options: 4, 6, 8, 10, 12, 14, 16 |
| Bet Amount per Round | Displayed | Set "bet $" | Amount per spin |
| Prize Name | Not shown | For backend tagging only |
| Prize Value / Multiplier | Displayed on wheel | Choose either fixed value or multiplier |
| Win Probability | Not shown | Total must equal 100% |
---
### Backend UI Examples
- Wheel segment quantity settings:


- SPIN bet amount setup:

- Prize name for backend tagging:

- Set fixed prize amount per segment:

- Set multiplier per segment:

- When both are set, amount takes priority:

- Win probability settings (auto normalize to 100%):

---
## ๐งง 2-2 Red Envelope Rain Settings
| Item | Frontend Display | Backend Setting | Notes |
|:-----|:------------------|:----------------|:------|
| Bet Amount per Round | "Open $..." | Cost to open one envelope |
| Prize Name | Not shown | For backend tagging |
| Envelope Reward Amount | Shown when opened | Display winning amount |
| Quantity | Not shown | Limit on reward distribution |
| Win Probability | Not shown | Must total 100% |
---
### Backend UI Examples
- Set amount to open an envelope:

- Prize name setting:

- Reward amount display:

- Set reward distribution limit:

- Win probability (auto normalize):

---
## ๐ฒ 2-3 Guess Big or Small Settings
| Item | Frontend Display | Backend Setting | Notes |
|:-----|:------------------|:----------------|:------|
| Bet Amount Options | Bottom 6 buttons | Configurable amounts |
| Name: Big | Payout Rate | Linked to โBigโ bet area |
| Name: Small | Payout Rate | Linked to โSmallโ bet area |
| Name: 7 | Payout Rate | Linked to โ7โ bet area |
---
### Backend UI Examples
- 6 betting amount options:

- Default values shown if unset:

- Payout for "Big":

- Payout for "Small":

- Payout for "7":

---
## ๐ฅ 2-4 Golden Egg Settings
| Item | Frontend Display | Backend Setting | Notes |
|:-----|:------------------|:----------------|:------|
| Bet Amount per Round | "Open $..." | Cost per egg smash |
| Prize Name | Not shown | Backend label |
| Reward Amount | Displayed after smash | Shows winning amount |
| Win Probability | Not shown | Must total 100% |
---
### Backend UI Examples
- Set egg-opening cost:

- Prize name setting:

- Reward amount shown after smashing:

- Win probability (auto normalize):

---
# ๐ 3. Backend Management & Statistics
---
## ๐ Homepage โ Activity List & Statistics
- Wireframe Reference: https://byrscb.axshare.com
- Top Menu Functions:
- System Timezone Selection (GMT+0800, GMT+0700, GMT+0530)
- Refresh (click timestamp to update)
- Current Time (YYYY-MM-DD HH:MM:SS)
- Language Switch: Traditional Chinese, Simplified Chinese, English, Vietnamese
- Notifications
- Account Info / Logout

- Left Menu Options:
- Activity List
- Create New Activity
- Bonus Report
- Promo Wallet Query
- Bet Records
- Transaction Records
- Permissions Management

---
## ๐ Activity Overview Statistics
- Time Range: GMT+0800, 00:00:00 ~ 23:59:59
- Metrics Displayed:
- Daily Active Players
- Total Bet Amount
- Total Win/Loss
- Total Bonus Issued
- Net Profit/Loss

- Formula for Total Bonus Issued: Total bonuses given out based on activity rules for the day

---
## ๐ Activity Search & Filters
- Filter Conditions (left to right):
- Activity Name (custom)
- Activity Type (e.g., Lucky Wheel, Red Envelope Rain)
- Activity Status (All / Not Started / Ongoing / Ended)
- Activity Date Range

- Filtered Results: By default shows all. When filtered, only the selected results appear.

- List Sorting: Default is by start date (newest first). Click table headers to re-sort.

- Create New Activity Button:


- Copy Ended Activity:
- Only available for "Ended" status
- Opens activity detail view, then click "Confirm" at bottom to copy and start creating a new activity 

- Disable Ongoing Activity:
- Only available for "Ongoing" status
- Clicking "Disable" prompts confirmation popup
- Confirming changes status to "Ended", enabling copy again
- Cancel does nothing



---
## ๐ Create New Activity Settings
---
## 01 Basic Info
- **Activity Name**: Custom input
- **Activity Time Setting**:
- *Unlimited*: Only start time required
- *Fixed Duration*: Set both start and end times
- **Approval Method**:
- *Auto*: System automatically approves reward
- *Manual*: Player must manually claim and be reviewed

---
## 02 Participation Conditions
- **Entry Method**: Auto or Manual
- **Eligible Members**:
- All Members
- New Registrants (with start date)
- Specific Tier Groups (multi-select)
- Specific Agents (multi-select)
- **Reward Distribution**:
- No Reward
- Fixed Amount (with upper limit)
- **Custom List**: Import CSV file

- **CSV Format Example**:
- Column 1: Username
- Column 2: Bonus Amount

---
## 03 Player Filtering
- **Exclude Conditions**:
- Player Level
- Specific Agents
- Players already in an activity
- Inactive Members (with time range)
- CSV Blacklist Import

- **CSV Format Example**:
- Column 1: Agent
- Column 2: Username
- Column 3: Player Tier (choose one of three)

---
## 04 Game Rules
- **Participation Limits**:
- Unlimited Plays
- One-Time Only
- Recurring (Daily, Weekly, Monthly, with limit)
*(e.g., 2 times/week means from start time, player can join 2 times within 7 days)*

- **Game Settings**:
- Refer to previous backend setup by game type

---
## 05 Reward Expiration
- **Validity Period**:
- Never Expires
- Valid During Event
- Fixed Expiration Date

---
## 06 Completion Requirements
- **Validation Rules**:
1. Effective Bet Amount X times
2. Effective Bet Amount on Specific Platform X times

---
## 07 Description & Submission
- Add custom activity description.
- **Confirm Submission**: Save and activate.
- **Preview Activity**: View settings without saving.

---
# ๐ธ Bonus Report
---
## Filters
- Activity Name
- Activity Type (e.g., Lucky Wheel, Red Envelope Rain)
- Activity Date Range

---
## Report List Columns
- Activity Name
- Activity Type
- Activity Period
- Effective Bet
- Company Profit
- Number of Participants
- Event Cost
- Bonus Quantity
- Summary Section (bottom):
- Total Effective Bet
- Total Company Profit
- Total Event Cost
- Total Bonus Count

- Export to Excel available


---
# ๐ณ Promo Wallet Query
---
## Filters
- Member Account
- Wager Status (Achieved / Not Achieved)

---
## Report Columns
- Member Account
- Wallet Balance
- Required vs Current Wager
- Wager Status (Achieved / Not Achieved)
- Bottom Summary:
- Total Wallet Balance

- Export to Excel available

---
# ๐งพ Bet Record Query
---
## Filters
- Bet ID
- Member Account
- Activity Type
- Status (Settled / Unsettled)
- Settlement Time Range

---
## Report Columns
- Bet ID
- Settlement Time
- Activity Type
- Member Account
- Bet Amount
- Effective Bet
- Company Profit
- Bet Status
- Bottom Summary:
- Total Bet Amount
- Total Effective Bet
- Total Company Profit

- Export to Excel available


---
# ๐ฐ Transaction Record Query
---
## Filters
- Member Account
- Transaction Type (e.g., Bonus Added)
- Time Range
- Wager Status (Achieved / Not Achieved)

---
## Report Columns
- Member Account
- Transaction Type
- Transaction Time
- Amount
- Wager Requirement
- Wager Status

- Bottom Summary: Total Amount
- Export to Excel available


---
# ๐ก๏ธ Permission Management
---
## Filters
- Account
- Login IP
- Status (Enabled / Disabled)
- Login Time Range

---
## Account Management
- List Columns:
- Account
- Last Login Time
- Last Login IP
- Status
- Notes
- Action Buttons

- Add Account Button (popup for adding new user):

---
### Account Settings
- Fields in popup:
- Account Name (custom)
- Status: Enabled / Disabled
- Notes
- Permissions:
- Activity List: View / Create / Manage
- New Activity: View / Create
- Bonus Report: View / Export
- Promo Wallet Query: View / Export
- Bet Record Query: View / Export
- Transaction Record Query: View / Export
- Permission Management: View / Create / Manage

---
### Account Actions
- Disable Account:


- Enable Account:


- Edit Account:
- Same popup fields as above for editing
- Modify account name, notes, and permissions


---
# ๐ฏ End of Document
---