Design CricInfo
| Difficulty: Hard | Source: awesome-low-level-design |
Requirements
- Cricket match, team, player, live score info
- View schedules and results
- Search matches, teams, players
- Detailed match info: scorecard, commentary, stats
- Real-time live score updates
- Handle concurrent access
- Scalable for large volume
- Extensible
Class Diagram

Classes, Interfaces and Enumerations
| Class/Interface | Description |
|---|---|
| Match | Id, title, venue, start time, teams, status, scorecard |
| Team | Id, name, player list |
| Player | Id, name, role |
| Scorecard | Team scores, list of innings |
| Innings | Id, batting/bowling team, list of overs |
| Over | List of balls |
| Ball | Ball number, bowler, batsman, result |
| MatchStatus | Enum: scheduled, in progress, completed, abandoned |
| MatchService | Singleton |
| ScorecardService | Singleton |
Design Patterns Used
| Pattern | Application |
|---|---|
| Singleton | MatchService manages all match data centrally; ScorecardService handles scorecard updates as a single coordination point |
Code Implementations
| Language | Source Code |
|---|---|
| Java | View on GitHub |
| Python | View on GitHub |
| C++ | View on GitHub |
| C# | View on GitHub |
| Go | View on GitHub |