Developed a fantasy cricket application where users can create teams and enter them into contests. The app will process the results based on real match outcomes and calculate the users' points.
- This project developed only the server side.
- Clone the repository SERVER -
git clone https://github.com/krishnaprasad45/Cricket11
- Install dependencies using
npm install
- Start the development server using
npm start
- Note: Secret values are protected in the .env file; it’s not accessible to you. Create your own .env file and run the project.
- Clean Architecture
- Node.js and Express.js
- MongoDB Atlas and Mongoose (Cloud Database and Schema modeling)
- TypeScript
- CORS (To securely communicate with resources from other domains)
- ESLint (To maintain consistent coding standards and identify potential errors)
- Error Handling Middleware - Handle and control errors more efficiently.
- Logging Middleware - Track Requests and Responses. It logs errors that occur in the application, making it easier to identify and fix issues.
- MongoDB Aggregation Pipeline - To sort, filter, add fields, and project in a single stage.
-
Users should create a team from the available players list. Every cricket team entry must have 11 players based on the following criteria:
Player Type Min Max Wicket Keeper 1 8 Batter 1 8 All Rounder 1 8 Bowler 1 8
Once the user has selected 11 players, they have to assign a captain and vice-captain for the team. The captain will give 2x points scored by them in the actual match. The vice-captain will give 1.5x points scored by them in the actual match.
Batting Points:
- Run: +1
- Boundary Bonus: +1
- Six Bonus: +2
- 30 Run Bonus: +4
- Half-century Bonus: +8
- Century Bonus: +16
- Dismissal for a Duck: -2 (Batter, Wicket-Keeper & All-Rounder only)
Bowling Points:
- Wicket (Excluding Run Out): +25
- Bonus (LBW / Bowled): +8
- 3 Wicket Bonus: +4
- 4 Wicket Bonus: +8
- 5 Wicket Bonus: +16
- Maiden Over: +12
Fielding Points:
- Catch: +8
- 3 Catch Bonus: +4
- Stumping: +12
- Run Out: +6
- Based on the match result and the players selected, users will get points. The user with the highest points will win. If multiple teams have the top score, they are also considered winners!
- Users can see the list of teams registered based on the rank and points earned.