Game Lifecycle:
- Game start and end times.
- Lock betting 9 minutes before the game ends.
- Generate a report after the game ends (win/loss).
- Admin inputs winning number(s).
Bet History and Reports:
- Day-wise bet history for users.
- Total amount spent, winnings, and balance tracking.
Bet Management:
- One game allows users to place multiple numbers inside one bet.
- Each number is associated with
fAmount
and/orsAmount
. - Total bet calculation for all selected numbers.
- Minimum and maximum bet limits per game.
Backend
- Models: User, Game, Bet.
- Routes: User Routes, Game Routes, Bet Routes, Admin Routes.
- Controllers:
UserController
: Handles user-related functionality (authentication, profile, etc.).GameController
: Manages games and their types.BetController
: Handles placing and updating bets.AdminController
: Handles admin tasks (e.g., setting winning numbers, generating reports).
Pages:
- Home: Show available games and their types.
- Game: Select numbers and place bets.
- Profile: User profile, balance, and history.
- Admin Dashboard: Manage games, set winning numbers, and generate reports.
Components:
- Header, Footer, Sidebar.
- Bet Form: For selecting numbers and placing bets.
- Bet Table: Displays all placed bets.
- History Table: Shows past bets with win/loss details.
- Admin Game Controls: For managing games and entering winning numbers.