Design an online Minesweeper platform for web and mobile users.
Requirements:
-
A signed-in user can start a new game with standard or custom board sizes and mine counts.
-
The first click must never hit a mine.
-
Users can reveal cells, place or remove flags, pause, resume, and finish a game.
-
Revealing an empty cell should automatically expand the connected zero-neighbor region.
-
The system should persist in-progress games.
-
The platform should maintain global and friends leaderboards for completed games.
-
Ranked games should be validated by the backend to reduce cheating.
-
Assume about 1 million monthly users, 50,000 daily active users, and up to 5,000 concurrent games. Target low-latency moves with roughly sub-100 ms perceived response time.
Discuss the functional requirements, APIs, data model, game-state management, storage, scaling approach, and anti-cheat trade-offs.