Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions realtimeBidding-aayush/pwd.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
## 1. Introduction

### **1.1. Product Vision**
To create a real-time, interactive online bidding platform that replicates the excitement and mechanics of an IPL-style player auction. The platform will allow users to observe auctions, team administrators to bid on players, and a main administrator to manage the entire process.

### **1.2. Goal**
The primary goal is to provide a seamless and engaging experience for all user types, ensuring the bidding process is transparent, fair, and efficient.

## 2. User Roles and Permissions

### **2.1. Normal User**
* **Permissions:**
* View active and upcoming auctions.
* View player profiles, including stats and bidding history.
* View team rosters and wallet information.
* No bidding capabilities.

### **2.2. Team Admin**
* **Permissions:**
* All permissions of a Normal User.
* **Place bids** on players during an active auction.
* View their team's current wallet balance and transaction history.
* View their team's roster of acquired players.

### **2.3. Main Admin**
* **Permissions:**
* All permissions of a Team Admin.
* **Start and end auctions** for individual players.
* **Finalize a bid** and confirm the winning team.
* **Add new players** to the auction pool, including their base price and profile details.
* **Manage team wallets**, including adding or deducting funds.
* View and manage all team rosters.
* View a complete history of all auctions.

---

## 3. Functional Requirements

### **3.1. Auction Management**
* The Main Admin must be able to create a new auction session and add players to it.
* The system must display a real-time countdown for each player's bidding round.
* Bids must be registered instantly and displayed to all users in real-time.
* The platform must prevent bids from being placed after the timer expires.
* The Main Admin must be able to pause or cancel an ongoing auction.

### **3.2. Bidding Process**
* Team Admins can only bid when the bidding is open.
* The minimum bid increment must be pre-defined.
* The system must validate bids against the team's available wallet balance.
* The system must display the current highest bid and the highest bidder's team name.
* Upon a bid being finalized, the player's price must be deducted from the winning team's wallet, and the player must be added to their roster.

### **3.3. Bid Finalization Logic**
* **Bid Closure:** When the 10-minute timer for a player's auction expires, bidding automatically closes.
* **Player Status - Sold:** If a bid was placed, the system identifies the highest bid, marks the player as **"Sold"**, deducts the amount from the winning team's wallet, and adds the player to their roster. The Main Admin can review and finalize this sale.
* **Player Status - Unsold:** If no bids were placed, the system marks the player as **"Unsold"** and adds them to a dedicated "Unsold" list.

### **3.4. Wallet and Player Management**
* Each team must have a unique wallet with a pre-defined starting value.
* The Main Admin must have a dashboard to manage all team wallets, including adding or subtracting funds.
* The Main Admin must be able to add new players with their name, position, skills, and a base price.

---

## 4. Non-Functional Requirements

### **4.1. Performance**
* The bidding platform must handle real-time data updates without delay, which will require technologies like **WebSockets**.
* The system must be able to support a large number of concurrent users.

### **4.2. Security**
* User data, especially wallet information, must be secure.
* The platform must have a robust authentication system for all user roles.

### **4.3. Usability (UI/UX)**
* The user interface must be intuitive and easy to navigate for all user types.
* The bidding process must be clear, with a prominent display of the timer, current bid, and bidder.

---

## 5. Screen Flow and Design

### **5.1. Pre-Auction State Screens**
* **Main Lobby Screen:** Shows a list of all players available for auction, their base prices, and their team affiliations (if any).
* **Main Admin Pre-Auction Screen:** The Main Admin sees the same list but also has options to **add new players**, set the auction order, and initiate the auction for a specific player.

### **5.2. Player Profile Screen**
This screen provides detailed information about a single player.
* **Header:** Player's name, photo, and current status.
* **Player Details:** Image, personal info, base price, and key skills.
* **Auction History:** Displays the live countdown, current highest bid, and the bidding team.
* **Finalized Status:** Shows the winning team and final bid amount after the auction.

### **5.3. Team Profile Screen**
This screen provides a comprehensive view of a specific team.
* **Header:** Team logo and name.
* **Team Summary:** Wallet balance and count of acquired players.
* **Team Roster:** A list of all players acquired by the team.
* **Transaction History:** A chronological list of all money spent and gained.

### **5.4. Post-Auction State Screens**
* **Final Rosters Screen:** All users can see the final roster of every team, including the players acquired and the total amount spent.
* **Unsold Players Screen:** A dedicated list of all players who did not receive any bids.
* **Main Admin Post-Auction Screen:** The Main Admin can choose to re-list unsold players for a "mini-auction" or close the event. They can also export the final results.

### **5.5. User-Specific Screens**
* **Normal User Dashboard:** Displays the player currently up for auction, a live timer, and a list of upcoming players.
* **Team Admin Dashboard:** Similar to the Normal User dashboard, but with an added **"Place Bid"** button and a summary of their team's status.
* **Main Admin Dashboard:** A comprehensive control panel with a view of the current auction, admin controls to **finalize bids**, and an overview of all teams and players.
109 changes: 109 additions & 0 deletions realtimeBidding-aayush/screenDetail.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
### **1. Normal User Screens**

**1.1. Pre-Auction Lobby**
* **Header:** Platform Logo, "IPL Auction" title.
* **Main Content:**
* **"Up Next" Section:**
* Displays the name, photo, and base price of the player who will be auctioned next.
* A "Players Queue" list shows the next few players in line.
* **"Auction Players" List:**
* A scrollable and searchable list of all players available for auction.
* Each player entry includes: Player photo, Name, Base Price, and a small tag indicating their status (e.g., "Available," "Unsold").
* **"Teams" List:**
* A list of all participating teams. Each entry shows the team logo, name, and current wallet balance.

**1.2. Live Auction Screen**
* **Header:** Platform Logo, Live Auction title.
* **Main Bidding Area:**
* **Player Card:**
* Large photo of the player.
* Player Name, Country, and Role (e.g., Batsman, Bowler).
* **Base Price:** The starting price.
* **Live Bid Information:**
* **Current Bid:** A large, prominent number showing the current highest bid amount.
* **Bidding Team:** The logo and name of the team that placed the current highest bid.
* **Live Countdown Timer:** A real-time countdown clock (e.g., 09:45) showing the time remaining for the bid.
* **Right Sidebar:**
* **Live Bid Feed:** A chronological list of all bids placed, showing the team name and bid amount.
* **Teams' Wallet Status:** A real-time leaderboard of all teams, displaying their logo and current wallet balance.

**1.3. Player Profile Screen**
* **Header:** Player's Name.
* **Main Content:**
* **Player Image:** A large, high-resolution photo.
* **Information Panel:**
* **Personal Info:** Name, Age, Country.
* **Skills:** Primary role (e.g., All-rounder), and a brief description of their strengths.
* **Auction Status:** "Sold" or "Unsold."
* **Final Bid Details:** If sold, displays the winning team's name and the final bid amount.
* **Detailed Stats:** (Optional but recommended) A table or list of key performance metrics (e.g., Matches Played, Runs, Wickets).

---

### **2. Team Admin Screens**

**2.1. Main Dashboard (Combines Live Auction and My Team)**
* **Header:** Team Logo, Team Name, and a large display of the **Team Wallet Balance**.
* **Main Content:**
* **Live Auction Player:** Same as the Normal User's live screen, but with a crucial addition:
* **"Place Bid" Section:**
* A button to "Bid [Next Bid Amount]." The amount should be pre-calculated based on the last bid + a minimum increment.
* A message indicating if the team has sufficient funds ("You have enough funds") or not ("Insufficient funds").
* **My Team Roster:**
* A list of all players acquired by this specific team.
* Each player entry shows: Player photo, Name, Role, and the price at which they were bought.

**2.2. Transaction History Screen**
* **Header:** Team Logo, Team Name.
* **Main Content:**
* **Wallet Summary:** Current Balance, Total Money Spent, and Total Money Remaining.
* **Transaction Log:**
* A table with columns: **Player Name, Bid Amount, Transaction Type (Buy/Deduct), and Date/Time.**

---

### **3. Main Admin Screens**

**3.1. Main Control Panel**
* **Header:** "Main Admin Dashboard," Platform Logo.
* **Key Metrics:**
* **Overall Progress:** Total players listed, players sold, players unsold.
* **Financial Summary:** Total money spent by all teams, total money remaining across all teams.
* **Live Auction Management:**
* **Current Player:** Displays the player currently up for auction with a large card.
* **Control Buttons:**
* **"Start Bidding":** Begins the 10-minute timer for the current player.
* **"Finalize Bid":** Confirms the sale to the highest bidder.
* **"Move to Unsold":** Manually ends the bidding and moves the player to the unsold list.
* **"Pause/Resume Auction":** Allows for a break.
* **"Next Player":** Moves to the next player in the queue.
* **Quick Links:** Buttons to navigate to other management screens.

**3.2. Player Management Screen**
* **Header:** "Manage Players."
* **Main Content:**
* **"Add New Player" Section:**
* Input fields for: **Player Name (text), Country (dropdown), Role (dropdown), Base Price (number), and Player Photo (file upload).**
* A **"Save Player"** button.
* **Player List Table:**
* A table with columns: **Player Name, Base Price, Current Status (e.g., "Available," "Sold," "Unsold"), and Actions.**
* **Actions:** "Edit" and "Delete" buttons for each player entry.

**3.3. Team Management Screen**
* **Header:** "Manage Teams."
* **Main Content:**
* **Team List Table:**
* A table with columns: **Team Name, Current Wallet Balance, and Actions.**
* **Actions:**
* **"Add/Deduct Funds" button:** Opens a modal with an input field to enter a value.
* **"View Roster" button:** Navigates to the team's profile.
* **"Add New Team" Section:**
* Input fields for: **Team Name (text), Wallet Initial Value (number), and Team Logo (file upload).**
* A **"Create Team"** button.

**3.4. Auction History and Reports**
* **Header:** "Auction Reports."
* **Main Content:**
* **Sold Players List:** A table showing all sold players with details: **Player Name, Winning Team, Final Bid Price.**
* **Unsold Players List:** A table showing all unsold players with details: **Player Name, Base Price, Reason for Unsold (e.g., No bids received).**
* **Final Roster Report:** A downloadable report (e.g., CSV, PDF) summarizing the final roster and total spending for each team.
Loading