How thisisnabi/leaderboard works
Project type and purpose
• This is a single microservice-style .NET application named “LeaderBoard.”
• It’s designed to consume two types of domain events (player scores and product sales), process them via a ScoreService, and presumably expose an HTTP API for querying leaderboard data.
File structure
• Top-level: standard .NET solution (.sln) with a single project under src/LeaderBoard.
• Program.cs + LeaderBoard.http (REST requests for manual testing) indicate it hosts an HTTP endpoint (likely a minimal API).
• Subscriptions/… directories hold two event consumers: one for PlayerScoreChangedEvent and one for SoldProductEvent.
• ScoreService.cs encapsulates business logic around updating and retrieving leaderboards.
• Models/ contains domain entities and comparers that define score types.
• appsettings.json + launchSettings.json indicate configurable endpoints (e.g., message broker connection, HTTP port).
README
• Minimal content (“# LeaderBoard”), so architecture must be inferred from code structure and naming conventions rather than existing documentation.
Elements
• Labels: “PlayerScore Producer,” “SoldProduct Producer,” “Message Broker,” “LeaderBoard Service,” “PlayerScoreChangedConsumer,” “SoldProductConsumer,” “ScoreService,” “HTTP API,” “Data Store,” “API Client.”
→ from producers to broker,
→ from broker to consumers,
→ from consumers to ScoreService,
→ from ScoreService to Data Store,
→ from API Client to HTTP API to ScoreService/Data Store.
Final advice
• Be very detailed and capture each subscription path separately.